Using HRMS APIs in Forms 6i

I am trying to build a custom Form that modifies inserts or modifies data in the Oracle HRMS system. To do this I thought the APIs would be the best tool because they would preserve the integrity of the system as a last guard if all of my checks on the data failed to catch something.
I am having problems implementing this idea. I have what essentially amount to wrapper functions that take the dataset I am dealing with and send it off through the various APIs needed to place it in the propper location. Insertion of new data is compiling ok, but when I try to compile a package with a procedure in it that utalizes and update (HR_PERSON_API.UPDATE_US_PERSON) I get the following error:
Implementation Restriction: 'HR_API.G_NUMBER':
Cannot directly access remote package variable or cursor
To simplify the problem I took the procedure out of the program unit in the form and made it a stand alone and also stripped it down to just the bare minimum passing in dummy data most of the time and only using local variables rather than objects. I end up with the following code:
procedure update_person is
start_date date;
end_date date;
full_name varchar2(300);
comment_id number;
comb_warning boolean;
ass_warning boolean;
pay_warning boolean;
emp_number varchar2(200);
object_version number;
begin
object_version := 10;
emp_number := 1210;
hr_person_api.update_us_person(
p_effective_date => to_date('02-apr-2006', 'dd-mon-yyy'),
     p_datetrack_update_mode => 'UPDATE',
     p_person_id => 2852,
     p_object_version_number => object_version,
     p_employee_number => emp_number,
     p_effective_start_date => start_date,
     p_effective_end_date => end_date,
     p_full_name => full_name,
     p_comment_id => comment_id,
     p_name_combination_warning => comb_warning,
     p_assign_payroll_warning => ass_warning,
     p_orig_hire_warning => pay_warning
end;
This gives me the error from above. If I try to create the same procedure in the database itself using a utility like TOAD and the same information to log in to the database I get no such compile error and only get errors when I run the procedure as all the values are dummy and don't actually map to anything.
Information on my version of forms builder, the db, and the application:
Forms [32 Bit] Version 6.0.8.27.0
RDBMS : 9.2.0.6.0
Oracle Applications : 11.5.8
Forms Server
Oracle Forms Version : 6.0.8.25.2
Application Object Library : 11.5.0
I have literaly been on this same problem the entire day and anyone that can help me I would reall apreciate it. At this point I am at a loss. I suspect either I am making the call to the API incorrectly, or it is simply not possible to do what I am trying to do. I hope I am just doing something wrong because as I understood it, one of the points of the API was to allow custom forms to do validated insertion of data.
thanks for any help
Andrew

Your approach of using published APIs is absolutely the best / supported mechanism to propgramatically enter data into HRMS.
This is a long-known issue when calling APIs from Forms - you are not supplying values for all of the parameters that this API exposes, thus the package defaults will be evaluated but these fail over a RPC call.
To work around simply supply all the API parameters with a value to avoid defaulting. So, for those that you do not actually wish to set you can set up a local constant(s) within the form, defined with the same definition as hr_api.g_number, g_varchar2 etc (check the db package specification for these), and pass them explicitly in your call together with those that you are setting currently.

Similar Messages

  • Image not displayed in pdf generated using Java API for Forms service

    Hi,
    I am creating a pdf document using Java API for Forms Service.
    I am able to generate the pdf but the images are not visible in the generated pdf.
    The image relative path is coming in the xml as defined below. The images are stored dynamically in the Livecycle repository each time a request is fired with unique name before the xml is generated.
    <imageURI xfa:contentType="image/png" href="../Images/logo.png"></imageURI>
    Not sure if I need to specify specify specific URI values that are required to render a form with image.
    The same thing is working when I generate pdf document using Java API for Output Service.
    As, I need to generate interactive form, I have to use Forms service to generate pdfs.
    Any help will be highly appreciated.
    Thanks.

    Below is the code snippet:
                //Create a FormsServiceClient object
                FormsServiceClient formsClient = new FormsServiceClient(myFactory);
                //Specify URI values that are required to render a form
                URLSpec uriValues = new URLSpec();
                                  // Template location contains the whole rpository path for the form
                uriValues.setContentRootURI(templateLocation);
               // The base URL where form resources such as images and scripts are located.  Whole Image path is passed in BaseUrl in the http format.
                      String baseLocation = repositoryPath.concat(serviceName).concat(imagesPath);   
                                  uriValues.setBaseURL(baseLocation);                                        
                // Set run-time options using a PDFFormRenderSpec instance
                PDFFormRenderSpec pdfFormRenderSpec = new PDFFormRenderSpec();
                pdfFormRenderSpec.setCacheEnabled(new Boolean(true));           
                pdfFormRenderSpec.setAcrobatVersion(com.adobe.livecycle.formsservice.client.AcrobatVersio n.Acrobat_8);
                                  //Invoke the renderPDFForm method and write the
                //results to a client web browser
                String tempTemplateName =templateName;
                FormsResult formOut = formsClient.renderPDFForm(tempTemplateName,
                                              inXMDataTransformed,pdfFormRenderSpec,uriValues,null);
                //Create a Document object that stores form data
                Document outputDocument = formOut.getOutputContent();
                InputStream inputStream = outputDocument.getInputStream();

  • How to use Win_Api_Shell api in forms 6i.

    hi all,
    I don't know how to use apis' in forms. Can u help me please?
    sankar

    Hi,
    The "What's New" release notes is somewhat misleading. However, what was released in SP2 is a framework called Custom Data Provider framework which has extension points for a developer to build new plug-ins which can facilitate in accessing different data sources. I suggest you reading:
    http://help.sap.com/businessobject/product_guides/boexir31SP2/en/xi31_sp2_cdp_dev_en.pdf
    You can visit posting at:
    /people/ted.ueda/blog/2009/08/07/web-intelligence-rich-client-custom-data-provider-plug-in--tracking-forest-fires
    Regards
    Sumitesh

  • Which HRMS API can be used to hire a Contact?

    In either 11i and/or R12.1.3, who knows which HRMS API(s) can be used to hire a contact? That is, a "person" that exists in the system but is not an ex-employee, e.g., someone's spouse, or child. This is a person that exists in PER_ALL_PEOPLE_F, with a SYSTEM_PERSON_TYPE of OTHER. We are not using iRec or any applicant functionality, so I cannot create an application for the Contact and then hire the Applicant. Instead, my requirement is to directly hire the Contact.
    I am using the following APIs for other scenarios, but haven't figured out the Contact hire yet:
    HR_EMPLOYEE_API.CREATE_US_EMPLOYEE - using this API for brand new hires that do not currently exist in the database
    HR_EMPLOYEE_API.RE_HIRE_EX_EMPLOYEE - using this API for rehiring ex-employees that already exist as a person in the database
    One more note, I am able to accomplish this task with no problems from the front-end, so I expect there must be a way to do the same from the back-end.
    e.g.,
    1) Navigate to Person Form
    2) Find Contact
    3) Change Action to "Create Employment"
    4) Choose Person Type "Employee"
    5) Save, which successfully hires the Contact and creates the employee record
    Please help!
    Thanks,
    Jason Genovese

    Ahhh! I just took another look Clives suggestion for using at HR_EMPLOYEE_API.HIRE_INTO_JOB. While the Oracle iRep only shows the 1 HIRE_INTO_JOB procedure, a look in the database at the package uncovers a second, overloaded, HIRE_INTO_JOB procedure that should address my requirement. I believe this will work, but I'll test this out and post back with my results. Here are excerpts from the 2 signatures. The second (new) overloaded procedure should work:
    -- |------------------------------< hire_into_job >---------------------------|
    -- {Start Of Comments}
    * This API hires an applicant as an employee.
    * This API converts a person of type Applicant to a person of type Employee
    * (EMP).
    * <p><b>Prerequisites</b><br>
    * The applicant must exist in the relevant business group and must have an
    * applicant assignment with the assignment status Accepted. If person_type_id
    * is supplied, it must have a corresponding system person type of EMP and must
    * be active in the same business group as the applicant being changed to
    * employee.
    * <p><b>Post Success</b><br>
    * The applicant has been successfully hired as an employee with a default
    * employee assignment.
    * <p><b>Post Failure</b><br>
    * The applicant is not hired as an employee and an error is raised.
    -- {End Of Comments}
    PROCEDURE hire_into_job
    (p_validate IN BOOLEAN DEFAULT FALSE
    ,p_effective_date IN DATE
    ,p_person_id IN NUMBER
    ,p_object_version_number IN OUT NOCOPY NUMBER
    ,p_employee_number IN OUT NOCOPY VARCHAR2
    ,p_datetrack_update_mode IN VARCHAR2 DEFAULT NULL
    ,p_person_type_id IN NUMBER DEFAULT NULL
    ,p_national_identifier IN VARCHAR2 DEFAULT NULL
    ,p_per_information7 IN VARCHAR2 DEFAULT NULL --3414274
    ,p_effective_start_date OUT NOCOPY DATE
    ,p_effective_end_date OUT NOCOPY DATE
    ,p_assign_payroll_warning OUT NOCOPY BOOLEAN
    ,p_orig_hire_warning OUT NOCOPY BOOLEAN
    -- |----------------------------< hire_into_job - new >------------------------|
    -- {Start Of Comments}
    -- Description:
    -- This business process converts a person of type EX_APL, EX_EMP or OTHER to a type of EMP.
    -- This is achieved by:
    -- o Setting the person type to EMP
    -- o Creating a period of service
    -- o Creating a default employee assignment
    -- o Repopulating the security lists
    -- Post Success:
    -- The API updates the person and application and set the following out
    -- parameters:
    -- Name Type Description
    -- p_per_object_version_number number If p_validate is false, set to
    -- the new version number of the
    -- person record. If p_validate is
    -- true, set to the value passed in.
    -- p_employee_number number If p_validate is false, set to the
    -- employee number of the person. If
    -- p_validate is true, set to the
    -- value passed in.
    -- p_assignment_id number If p_validate is false, set to the
    -- assignment_id for the person.
    -- p_effective_start_date date If p_validate is false, set to
    -- the effective start date of the
    -- updated person record. If
    -- p_validate is true, set to null.
    -- p_effective_end_date date If p_validate is false, set to
    -- the effective end date of the
    -- updated person record. If
    -- p_validate is true, set to null.
    -- p_assign_payroll_warning boolean Set to true if the person's date of
    -- birth has not been set. Set to
    -- false if the date of birth has been
    -- entered. Indicates if it will be
    -- possible to set the payroll
    -- component on any of this person's
    -- assignments.
    -- p_orig_hire_warning boolean Set to true if the original date of
    -- hire is not null and the person
    -- type is not EMP, EMP_APL, EX_EMP or
    -- EX_EMP_APL.
    -- Post Failure:
    -- The API does not update the person and period of service and raises an error.
    -- Access Status:
    -- Public.
    -- {End Of Comments}
    PROCEDURE hire_into_job
    (p_validate IN BOOLEAN DEFAULT FALSE
    ,p_effective_date IN DATE
    ,p_person_id IN NUMBER
    ,p_object_version_number IN OUT NOCOPY NUMBER
    ,p_employee_number IN OUT NOCOPY VARCHAR2
    ,p_datetrack_update_mode IN VARCHAR2 DEFAULT NULL
    ,p_person_type_id IN NUMBER DEFAULT NULL
    ,p_national_identifier IN VARCHAR2 DEFAULT NULL
    ,p_per_information7 IN VARCHAR2 DEFAULT NULL --3414274
    ,p_assignment_id OUT NOCOPY NUMBER -- Bug#3919096
    ,p_effective_start_date OUT NOCOPY DATE
    ,p_effective_end_date OUT NOCOPY DATE
    ,p_assign_payroll_warning OUT NOCOPY BOOLEAN
    ,p_orig_hire_warning OUT NOCOPY BOOLEAN
    );

  • font color=red Create/Modify forms and triggers through C++ using OPEN API

    <font color=red>
    Dear brothers/sisters<font color=darkblue>
    <br><br>
    Please help us to find the linking problem.
    <br>
    We have to add PRE-FORM trigger to many FMBies. We have thousants of FMBies. So opening one by one is difficult. For this we are using OPEN API and BORLAND C++. We have coppied all header files from D:\orant\FORMS60\API.
    But there is a link error. Here is the snippet.
    <br>
    <font color=red>
    <br>#include <stdio.h>
    <br>#include <stdlib.h>
    <br>#include <malloc.h>
    <br>#include <d2fctx.h> /* Forms API context */
    <br>#include <d2ffmd.h> /* Form module header file */
    <br>int main (int argc, char *argv[])
    <br>{
    <br>d2fctxa ctx_attr;
    <br>d2fctx *ctx;
    <br>d2ffmd *form;
    <br>text *form_name;
    <br>/* Check arguments */
    <br>if ( argc != 2 )
    <br>{
    <br>fprintf(stderr, "USAGE: %s <filename>\n", argv[0]);
    <br>exit(1);
    <br>}
    <br>/* Create Forms API context */
    <br>ctx_attr.mask_d2fctxa = (ub4)0;
    <br>if ( d2fctxcr_Create(&ctx, &ctx_attr) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error creating Forms API context\n");
    <br>exit(1);
    <br>}
    <br>/* Load the form module into memory */
    <br>if ( d2ffmdld_Load(ctx, &form, argv[1], FALSE) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Failed to load form module: %s\n", argv[1]);
    <br>exit(1);
    <br>}
    <br>/* Get the name of the form module */
    <br>if ( d2ffmdg_name(ctx, form, &form_name) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error getting the name of the form module\n");
    <br>}
    <br>else
    <br>{
    <br>/* Print the name of the form, then free it */
    <br>printf ("The name of the form is %s\n", form_name);
    <br>free(form_name);
    <br>}
    <br>/* Destroy the in-memory form */
    <br>if ( d2ffmdde_Destroy(ctx, form) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error destroying form module\n");
    <br>}
    <br>/* Close the API and destroy context */
    <br>d2fctxde_Destroy(ctx);
    <br>return 0;
    <br>}
    <br>
    <font color=darkblue>
    <br>
    The compilation is success. But there is a link error. Please help us to find the problem.
    <br><br>
    Here is the error Message.
    <br>
    <font color=red>
    <br>Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    <br>FIRST.CPP:
    <br>Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
    <br>Error: Unresolved external '_d2fctxcr_Create' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2ffmdld_Load' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2ffmdgt_GetTextProp' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2fctxde_Destroy' referenced from D:\API\FIRST.OBJ
    <br><br>
    <font color=darkblue size=4>Could you please help us.......<br>

    <font color=red>
    Dear brothers/sisters<font color=darkblue>
    <br><br>
    Please help us to find the linking problem.
    <br>
    We have to add PRE-FORM trigger to many FMBies. We have thousants of FMBies. So opening one by one is difficult. For this we are using OPEN API and BORLAND C++. We have coppied all header files from D:\orant\FORMS60\API.
    But there is a link error. Here is the snippet.
    <br>
    <font color=red>
    <br>#include <stdio.h>
    <br>#include <stdlib.h>
    <br>#include <malloc.h>
    <br>#include <d2fctx.h> /* Forms API context */
    <br>#include <d2ffmd.h> /* Form module header file */
    <br>int main (int argc, char *argv[])
    <br>{
    <br>d2fctxa ctx_attr;
    <br>d2fctx *ctx;
    <br>d2ffmd *form;
    <br>text *form_name;
    <br>/* Check arguments */
    <br>if ( argc != 2 )
    <br>{
    <br>fprintf(stderr, "USAGE: %s <filename>\n", argv[0]);
    <br>exit(1);
    <br>}
    <br>/* Create Forms API context */
    <br>ctx_attr.mask_d2fctxa = (ub4)0;
    <br>if ( d2fctxcr_Create(&ctx, &ctx_attr) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error creating Forms API context\n");
    <br>exit(1);
    <br>}
    <br>/* Load the form module into memory */
    <br>if ( d2ffmdld_Load(ctx, &form, argv[1], FALSE) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Failed to load form module: %s\n", argv[1]);
    <br>exit(1);
    <br>}
    <br>/* Get the name of the form module */
    <br>if ( d2ffmdg_name(ctx, form, &form_name) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error getting the name of the form module\n");
    <br>}
    <br>else
    <br>{
    <br>/* Print the name of the form, then free it */
    <br>printf ("The name of the form is %s\n", form_name);
    <br>free(form_name);
    <br>}
    <br>/* Destroy the in-memory form */
    <br>if ( d2ffmdde_Destroy(ctx, form) != D2FS_SUCCESS )
    <br>{
    <br>fprintf(stderr, "Error destroying form module\n");
    <br>}
    <br>/* Close the API and destroy context */
    <br>d2fctxde_Destroy(ctx);
    <br>return 0;
    <br>}
    <br>
    <font color=darkblue>
    <br>
    The compilation is success. But there is a link error. Please help us to find the problem.
    <br><br>
    Here is the error Message.
    <br>
    <font color=red>
    <br>Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    <br>FIRST.CPP:
    <br>Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
    <br>Error: Unresolved external '_d2fctxcr_Create' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2ffmdld_Load' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2ffmdgt_GetTextProp' referenced from D:\API\FIRST.OBJ
    <br>Error: Unresolved external '_d2fctxde_Destroy' referenced from D:\API\FIRST.OBJ
    <br><br>
    <font color=darkblue size=4>Could you please help us.......<br>

  • Copy data from a UDO form to Goods Receipt PO using UI API

    Hi, all
    I tried to copy data from a UDO form to Goods Receipt PO using UI API through following codes.
    It works fine while copying to a Item-type Goods Receipt PO.
    But when the doctype is set to service, I got errors.
    I use for-loop to copy two items, Description and LineTotal, into the matrix of Goods Receipt PO form, but both failed.
    any suggestion?
    Edited by: Chao-Yi Wu on Aug 25, 2009 5:50 AM

    Hi  Chao-Yi Wu ,
    SBO_Application.ActivateMenuItem("2306")
    Dim oFormGR As SAPbouiCOM.Form = SBO_Application.Forms.ActiveForm
    Dim omtxIQC, omtxGR As SAPbouiCOM.Matrix
    Dim oedIQC, oedGR, oed As SAPbouiCOM.EditText
    Dim ocbIQC, ocbGR As SAPbouiCOM.ComboBox
    oFormGR.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE
    oedIQC = oFormIQC.Items.Item("13").Specific
    oedGR = oFormGR.Items.Item("4").Specific
    oedGR.Value = oedIQC.Value
    oedIQC = oFormIQC.Items.Item("21").Specific
    oedGR = oFormGR.Items.Item("24").Specific
    oedGR.Value = oedIQC.Value
    oedIQC = oFormIQC.Items.Item("edComments").Specific
    oedGR = oFormGR.Items.Item("16").Specific
    oed = oFormIQC.Items.Item("3").Specific
    oedGR.Value = oedIQC.Value + ", Goods Recript PO:" + oed.Value
    ocbIQC = oFormIQC.Items.Item("cbDocType").Specific
    ocbGR = oFormGR.Items.Item("3").Specific
    If ocbIQC.Selected.Value = "I" Then
         ocbGR.Select(0, SAPbouiCOM.BoSearchKey.psk_Index)
    Else
         ocbGR.Select(1, SAPbouiCOM.BoSearchKey.psk_Index)
    End If
    omtxIQC = oFormIQC.Items.Item("mtx_0").Specific
    For i As Integer = 1 To omtxIQC.RowCount
    omtxGR = oFormGR.Items.Item("38").Specific
           If ocbIQC.Selected.Value = "I" Then
                oedIQC = omtxIQC.Columns.Item("c_ItemCode").Cells.Item(i).Specific
                oedGR = omtxGR.Columns.Item("1").Cells.Item(i).Specific
                oedGR.String = oedIQC.String
                oedIQC = omtxIQC.Columns.Item("c_AQty").Cells.Item(i).Specific
                oedGR = omtxGR.Columns.Item("11").Cells.Item(i).Specific
                oedGR.String = oedIQC.String
                oedIQC = omtxIQC.Columns.Item("col_19").Cells.Item(i).Specific
                oedGR = omtxGR.Columns.Item("14").Cells.Item(i).Specific
                oedGR.String = oedIQC.String
       Else  
    omtxGR = oFormGR.Items.Item("39").Specific
               oedIQC = omtxIQC.Columns.Item("c_Descrp").Cells.Item(i).Specific
               oedGR = omtxGR.Columns.Item("1").Cells.Item(i).Specific
               oedGR.String = oedIQC.String
               oedIQC = omtxIQC.Columns.Item("col_16").Cells.Item(i).Specific
               oedGR = omtxGR.Columns.Item("12").Cells.Item(i).Specific
               oedGR.String = oedIQC.String
      End If
                Next
    for items the matrix is 38 and for service the matrix is 39
    Rgds
    Micheal

  • Creating form using OIM API

    Hi
    can anyone help me in creatig a form and assigning it to a resource object.
    please tell what all should i mention in the map which is to be passed to createForm() method.
    Thank you

    Hi all
    what attributes i need to to map to create a from using OIM API
    createForm Method?
    I have tried with this but did not work:The form is getting created , i.e I am seeing an entry in DB.
    At the same time I am aslo getting an exception which is whown below:
    formMap.put("Structure Utility.Table Name", "SAM");
              formMap.put("Structure Utility.Description", "TESTING API USAGE FOR FORM");
    The Exceptions I get are :
    Thor.API.Exceptions.tcInvalidNameException
         at com.thortech.xl.ejb.beansimpl.tcFormDefinitionOperationsBean.createForm(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormDefinitionOperationsBean.createForm(Unknown Source)
         at com.thortech.xl.ejb.beans.tcFormDefinitionOperationsSession.createForm(Unknown Source)
    09:05:13,772 ERROR [DATABASE] Class/Method: tcDataBase/writeStatement encounter
    some problems: ORA-02089: COMMIT is not allowed in a subordinate session
    java.sql.SQLException: ORA-02089: COMMIT is not allowed in a subordinate session
    09:05:13,819 ERROR [ADAPTERS] Event: Adding Columns to SDC. has encountered an error.
    09:05:13,819 ERROR [SERVER] Class/Method: tcDataObj/runEvent Error :EVT Fatal Rejection Occured
    09:05:13,819 ERROR [APIS] Class/Method: tcFormDefinitionOperationsBean/createForm encounter some problems: maoErrors:Error Adding Column.
    How can i resolve this?
    When and where can I view the form that I have created?
    Thank you

  • URGENT:How can we submit a web page containing form using Java API?

    Dear Friends,
    I want to submit a form to a form action page resides in a web site. Then I need to get the response of the same.
    Is there any way to do this automatically by using Java API.
    Does java.net have anything?
    Thanks in advance
    Sarath

    Have you looked at a package called httpunit.
    http://httpunit.sourceforge.net/
    This allows form submission, Javascript, cookies etc.

  • Cannot connect to Admin Api Endpoint, using Authentication token obtained form Windows Auth Site

    Hi, I'm trying to connect to "AdminAPI" site, using Windows Authentication using REST API, but i always get the following error.
    user is not authorized to access the management service
    I also wrote a powershell script that gets the token from windows auth site, and connects to AdminAPi site, it works fine natively, when i run in ISE, but when i execute the same PS script using C# in my custom resource provider, it gives the same above
    error.
    How should i go about it? please help?
    string EnvironmentToUse = "https://localhost";
    string domainName = "//";
    string userName = "***";
    string password = "***@123";
    string adminApiEndpoint = "https://localhost:30004";
    ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(delegate { return true; });
    string windowsAuthSiteEndPoint = EnvironmentToUse + ":30072";
    string token = TokenIssuer.GetWindowsAuthToken(windowsAuthSiteEndPoint, domainName, userName, password, true);
    var myAdminClient = new AdminManagementClient(new Uri(adminApiEndpoint), token);
    var u = await myAdminClient.ListUsersAsync(new Query { });
    PS Script:
    $AdminURI = "https://localhost:30004";
    $AuthSite = "https://localhost:30072/";
    $ClientRealm = "https://localhost:30091/";
    $Credential = Get-Credential
    $Token = Get-MgmtSvcToken -Type Windows –AuthenticationSite "https://localhost:30072/" -ClientRealm "http://azureservices/AdminSite" -User $Credential -DisableCertificateValidation
    $Token
    $users = Get-MgmtSvcUser -AdminUri "https://localhost:30004/" -Token $Token -DisableCertificateValidation;

    The user context you are executing the script/cmdlets needs to be added as an administrator into WAP, or else you won't be authorized.
    To add a new user to WAP Admin, see the following PS example:
    Add-MgmtSvcAdminUser -Principal <string> -Server <string>
    -kn
    Kristian (Virtualization and some coffee: http://kristiannese.blogspot.com )

  • Unable to display double values in Excel sheet using JExcel API

    Hi
    I am writing code to generate report in the form of Excel Sheet using JExcel API.
    Everything is going fine but whenever I want to put some double values in a cell it is only showing 2 decimal places. My problem is "I want to show upto five decimal places".
    Any kind of reply might help me lot.
    Thank U.

    If you enable the submit zero option, it still happens? This is a new feature on the display tabl
    #NumericZero Enhancements
    To display a numeric zero in place of an error message, you can enter #NumericZero in any of the three Replacement text fields. When you use the #NumericZero option:
    · Excel formatting for the cell is retained.
    · All calculations with dependency on the cell will compute correctly and will take the value of this cell as zero.
    · This numeric zero is for display only. When you submit, the zero value is NOT submitted back to the data source.
    You cannot set display strings for cells that contain an invalid member or dimension name (metadata error). Metadata errors produce standard descriptive error messages.
    Errors are prioritized in the following order from highest to lowest. The error message for a higher-priority error takes precedence over that for a lower-priority error.
    1. (Highest) Metadata errors
    2. #No access
    3. #Invalid/Meaningless
    4. #No data\Missing

  • Can I use external APIs to authenticate users?

    I have been asked to develop a lightswitch application either as desktop client or HTML client. Now I am confused about the authentication
    mechanism in LightSwitch, and it leads a question: Can I authenticate my users from an external website or application?  
    For the HTML client, I have been thinking that whether I could use external APIs like Facebook Login API to authenticate my users? If I could, the code should be JavaScript, then where should I put it, and how can I configure my LS application?
    For the desktop client, same question, if I could identify my users by pulling some user information from an external website, what kind of code/Programming Language shall I use? 

    Hey ConnorTx!
    This is not supported out of the box.
    For in-browser desktop applications, you can hack around this by setting up the social media credentials, then redirecting to your desktop application while passing the self-encrypted credentials.  I explained this workaround in
    this article.
    I don't have enough production experience with HTML apps yet.  However when you use Forms authentication, I suspect you can simply fill in the IPrincipal on the HttpContext.Current, then redirect to your HTML app, and the LightSwitch Forms Auth mechanism
    would pick up your principal as valid credentials.  I wish I had time to show you some code for this, would make a great blog post :/
    Keep rocking LS!
    Jan
    It's your story - time to switch on the innovation.||About me||LightSwitch blog

  • File Upload using PRC API's

    Guys,
    I am trying to upload a new document using PRC API's. Below is required code snippet that i am using.
    IRemoteDocument remoteDoc = documentManager.createRemoteDocument(folderID,dataSourceID,document.getPath()); remoteDoc.setOverrideName(document.getName()); remoteDoc.setOverrideDescription(document.getDescription()); remoteDoc.setType("http://www.plumtree.com/dtm/mime", document.getFileType());int docID = -1;docID = remoteDoc.save();
    dataSourceID - ID of my file upload datasource , document - is my java object which has all the document related properties such as , name , description , MIME type of document etc..Below is different document path's(scenarios) that I have triedc:\work\sample.txt\\servername\work\sample.txthttp:\\appserver:7001\appName\uploadfiles\sample.txt
    When I execute this code from my application i get a below error.
    com.plumtree.remote.prc.PortalException: null; nested exception is: java.rmi.RemoteException: Error in function PTDataSource.ImportDocument(vDocumentLocationBagAsXML == '<?xml version="1.0" encoding="ucs-2"?><PTBAG V="1.1" xml:space="preserve"><I N="PTC_DTM_SECT">1001</I><S N="PTC_DOC_ID">application/msword</S><S N="PTC_UNIQUE">\\PHUSEH-L33664.NA.novartis.net\work\sample.doc</S></PTBAG>', lDocumentTypeID == 100, pCard == com.plumtree.server.impl.directory.PTCard@c27b6f, bSummarize == false, pProvider == null): Error in function PTDataSource.ImportDocument (vDocumentLocationBagAsXML == <?xml version="1.0" encoding="ucs-2"?><PTBAG V="1.1" xml:space="preserve"><S N="PTC_DOC_ID">application/msword</S><I N="PTC_DTM_SECT">1001</I><S N="PTC_UNIQUE">\\PHUSEH-L33664.NA.novartis.net\work\sample.doc</S></PTBAG>, lDocumentTypeID == 100, pCard == com.plumtree.server.impl.directory.PTCard@c27b6f, bSummarize == false, pProvider == null): SOAP fault: faultcode='soapenv:Server.userException' faultstring='java.lang.NullPointerException' at com.plumtree.remote.prc.DocumentWrapper.save()
    Below is my environment.Plumtree is running on Weblogic 8.1 (Solaris OS) , ptupload webservice is running on weblogic8.1 solaris,My upload document portlet is running on weblogic 8.1 (Windows OS)
    If anyone has any working sample code please send it to my ID [email protected] or else please upload it here.Thank You ,
    Dan.

    make sure your modjk logs don't have any errors.
    Here's a peice out of my httpd.conf
    #ADDed Oct 15,2003, seemed to remove modjk error
    AddType multipart/form-data .gif .png  .jpg .peg .jpeg .jpeI used to get strange modjk logged errors.
    Also did you compile jk2 from source???
    com.oreilly.servlet --- cos
    http://www.servlets.com/cos/index.html
    http://www.servlets.com/cos/cos-05Nov2002.zip
    But if my bit shift is correct wouldn't my regular textfile upload be distored?From what I remember, the problem is something to do with logical AND or OR, with the bits. Apache receives it fine, passess it through jk, and and either the most sig or least gets lost. Image data is critical as every bit counts, text file, you may not notice it(white space), or every nTH file upload might fail.
    here are the version numbers of software I use, and have compiled all from source.
    apache-httpd-2.0.47
    tomcat-4.1.27
    jk2-connectors-2.0.2

  • Iterate through all the records in a table using Java API

    Hi All,
    What is the easiest way to iterate through all the records in a given table using Java API? I cannot find any methods that will return all records in a table and the only way I can use is to perform a free form search with a condition that is always true. The code works but is pretty ugly. Is there an alternative to this approach?
    Thanks!
    Kenny

    Hi Kenny,
    You can construct a new Search object with your table's code name, a new ResultSetDefinition object for your table and just execute this search using the GetResultSet method of CatalogData.
    Please look at the following code:
    Search search = new Search(<code name of your table>);
    ResultSetDefinition rsd = new ResultSetDefinition(<code name of your table>);
    rsd.AddField<code name of a field>);
    rsd.AddField(<code name of a field>);
    String sortField = <code name of your sort field>;
    boolean sortAscending = true;
    int page = 0; //page number
    A2iResultSet rs = <your CatalogData object>.GetResultSet(search, rsd, sortField, sortAscending, page);
    for (int i = 0; i < rs.GetRecordCount(); i++)
        Value fieldValue = rs.GetValueAt(i, <code name of a field>);
    Hope this helps,
    Nir
    PS - I really recommend you to start using the new API, as it is much more efficient and straight-forward.

  • Add user to sharepoint group using REST API

    I am trying to add a user to sharepoint group with following code
    serviceUrl= Appweb + "/_api/SP.AppContextSite(@target)/web/sitegroups("+GroupId+")/users?@target='host web'";
        $.ajax({
            url: serviceUrl,
            type: "POST",
            contentType: "application/json; charset=utf-8",
            dataType: 'json',
            body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|'+email }",
      headers: {"accept":"application/json;odata=verbose",
        "content-type": "application/json;odata=verbose",
        "X-RequestDigest":$("#__REQUESTDIGEST").val()
        async: false,
      success: function (data) {
               alert('success');
      error: function (data) {
                 alert('fail');
    The request goes to error function. Response of the request is Microsoft.SharePoint.Client.InvalidClientQueryException and message is A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was
    expected
    I tried the sample from following link but fail it
    https://msdn.microsoft.com/en-us/library/office/dn531432.aspx

    Hi,
    Per my understanding, you might want to add an user to a SharePoint group in host web from a SharePoint Hosted App using REST API.
    Here is a working demo for your reference:
    var hostweburl;
    var appweburl;
    $(document).ready(function () {
    //Get the URI decoded URLs.
    hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
    // Resources are in URLs in the form:
    // web_url/_layouts/15/resource
    var scriptbase = hostweburl + "/_layouts/15/";
    // SP.RequestExecutor.js to make cross-domain requests
    $.getScript(scriptbase + "SP.RequestExecutor.js", loadPage);
    // Utilities
    // Retrieve a query string value.
    // For production purposes you may want to use a library to handle the query string.
    function getQueryStringParameter(paramToRetrieve)
    var params = document.URL.split("?")[1].split("&");
    for (var i = 0; i < params.length; i = i + 1)
    var singleParam = params[i].split("=");
    if (singleParam[0] == paramToRetrieve) return singleParam[1];
    function addUsersInGroup() {
    var executor;
    // Initialize the RequestExecutor with the app web URL.
    executor = new SP.RequestExecutor(appweburl);
    executor.executeAsync({
    url: appweburl + "/_api/SP.AppContextSite(@target)/web/sitegroups(8)/users?@target='" + hostweburl + "'",
    method: "POST",
    contentType: "application/json; charset=utf-8",
    dataType: 'json',
    body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|[email protected]'}",
    headers: {
    "Accept": "application/json; odata=verbose",
    "content-type": "application/json;odata=verbose",
    "X-RequestDigest":$("#__REQUESTDIGEST").val()
    success: addUsersInGroupSuccessHandler,
    error: addUsersInGroupErrorHandler
    function addUsersInGroupSuccessHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    function addUsersInGroupErrorHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected].

  • How to build a small application using Java API

    Hai expertise,
         I want to retreive MDM repository info using JAVA API, i am following these blogs:
    /people/andreas.seifried/blog/2006/03/26/performing-free-form-searches-with-mdm-java-api
    /people/udi.katz/blog/2005/08/21/retrieving-data-from-mdm-server-using-the-mdm-java-api
    /people/udi.katz/blog/2005/07/17/mdm-connectivity-to-java-application
    <b>where to get the jar and sda files to build the application??
    In Developer Studio.. Windows -> Preferences -> Java -> Classpath variables. Is this the only place where we need to give the jar file path??
    Are there any other configurations to do(except setting container variable to MDM4J jar file) to connect my java application to MDM repository???</b>
    Regards,
    Chand.

    Hi Govada,
    (1)You need to add the MDM4j and other JAR files at:-
    right click on project -> Java Build Path -> Libraries -> Add External JARs
    (2)If the project is Web Dynpro project one
    then right click on project -> Web Dynpro Reference -> Library Reference -> and add sap.com/com.sap.mdm.tech.mdm4j
    Are you using JAVA API 1 or 2???
    Thanking you
    Namrata Dixit

Maybe you are looking for

  • 10.1.0.5 Patch for Oracle Application Server 10g Release 1

    Hi Guys, Does anyone know what is the patch number for 10.1.0.5 Patch for Oracle Application Server 10g Release 1? This is a Oracle Application Server and not Oracle Database server. I tried searching on Metalink but not able to find it. Thanks in ad

  • Vlvindex

    Setting up a 5.2 server to handle Solaris naming services. I was going through my old notes for 5.1. So far things have gone pretty well, but I'm not sure what's up with the vlvindex stuff. First I added the following LDIF excerpt: ---cut---- dn: cn=

  • Search: standard field as search criteria

    Hello, I have problem because of a search component within the webclient ui framework (background SAP Solution Manager). Background: There is a ui search component to search for change documents (which are plain entries within the table crmd_orderadm

  • CacheAsBitmap question --- nested MovieClips

    I have a MovieClip which is a base (defined by a custom class) holding a bunch of loaders, holders, etc. After the whole MovieClip is built up I have a startDrag being called for the onPress event. Changing the base MovieClip (the one that is actuall

  • Lumia 920 Wireless Car Charger?

    Technically, I'm not part of the Nokia community yet, as I don't have my Lumia in hand. But, I am getting the 920 on December 1st. I am ridiculously excited! But onto my question, has anyone heard or read anywhere that Nokia is developing a wireless