Oracle API from SQR

Hi
I am trying to call an Oracle API from an SQR report running in PeopleSoft 8.1.
The code I am using is shown below:
begin-sql
declare
      LN_PERSON_ID NUMBER;;
      LN_ASSIGNMENT_ID  NUMBER;;
      LN_PER_OBJECT_VERSION_NUMBER NUMBER(9);;
      LN_ASG_OBJECT_VERSION_NUMBER NUMBER(9);;
      LD_PER_EFFECTIVE_START_DATE  DATE;;
      LD_PER_EFFECTIVE_END_DATE DATE;;
      LV_FULL_NAME VARCHAR(80);;
      LN_PER_COMMENT_ID NUMBER;;
      LN_ASSIGNMENT_SEQUENCE NUMBER;;
      LV_ASSIGNMENT_NUMBER VARCHAR(30);;
      LB_NAME_COMBINATION_WARNING BOOLEAN;;
      LB_ASSIGN_PAYROLL_WARNING BOOLEAN;;
      LB_ORIG_HIRE_WARNING BOOLEAN;;
      LN_EMPLID VARCHAR(6);;
         lv_err_code VARCHAR(1000);;
          lv_err_msg VARCHAR(1000);;
begin
             LN_EMPLID := $Emplid;;
            HR_EMPLOYEE_API.CREATE_EMPLOYEE@OPAYR(
            p_validate => FALSE           
            ,p_hire_date                    => to_date($Effdt, 'dd-mon-yyyy')
            ,p_business_group_id            => 83
            ,p_last_name                    => $Last-Name
            ,p_sex                          => $Sex
            ,P_FIRST_NAME                   => $First_Name
            ,P_MARITAL_STATUS               => $Mar-Status
            ,P_MIDDLE_NAMES                 => $Middle-Name
            ,P_NATIONAL_IDENTIFIER          => $National-Id 
            ,P_TITLE                        => $Prefix  
            ,P_PER_INFORMATION1             => $Tax_Reference-No 
            ,P_PER_INFORMATION2             => $Passport-Number
            ,P_PER_INFORMATION4             => $Ethnic-Group
            ,P_ORIGINAL_DATE_OF_HIRE        => to_date($Effdt, 'dd-mon-yyyy')
            ,p_date_of_birth                => to_date($Birthdate, 'dd-mon-yyyy')
            ,p_attribute1                   => $Nc-Legacy-Company
            ,p_person_type_id               => 1145
!---OUTPUTS           
            ,p_employee_number              =>   LN_EMPLID
            ,p_person_id                    => LN_PERSON_ID
            ,p_assignment_id                => LN_ASSIGNMENT_ID
            ,p_per_object_version_number    => LN_PER_OBJECT_VERSION_NUMBER
            ,p_asg_object_version_number    => LN_ASG_OBJECT_VERSION_NUMBER
            ,p_per_effective_start_date     => LD_PER_EFFECTIVE_START_DATE
            ,p_per_effective_end_date       => LD_PER_EFFECTIVE_END_DATE
            ,p_full_name                    => LV_FULL_NAME 
            ,p_per_comment_id               => LN_PER_COMMENT_ID
            ,p_assignment_sequence          => LN_ASSIGNMENT_SEQUENCE
            ,p_assignment_number            => LV_ASSIGNMENT_NUMBER
            ,p_name_combination_warning     => LB_NAME_COMBINATION_WARNING
            ,p_assign_payroll_warning       => LB_ASSIGN_PAYROLL_WARNING
exception
    when others then
   lv_err_code := sqlcode;;
   lv_err_msg := sqlerrm;;   
  raise_application_error(-20000,'API ERROR '||lv_err_code||' on '||lv_err_msg);;
end;;
end-sql
End-Procedure I cannot ge this to work correctly. It seems as if the PL/SQL embedded in the Begin-sql is not parsing the variables. The error recevied is:
Start of Program Oracle Payslip Interface
(SQR 5528) ORACLE OCIStmtExecute error 20000 in cursor 23:
ORA-20000: API ERROR -20001 on ORA-20001: HR_ZA_MAND_SEG_RACE:
ORA-06512: at "APPS.HR_EMPLOYEE_API", line 1019
ORA-06512: at "APPS.HR_EMPLOYEE_API", line 1186
ORA-06512: at line 1
This error refers to the value assigned to P_PER_INFORMATION4. I have confrimed that there is a valid value in the $Ethnic-Group variable but this value does not seem to be parsing to the PL/SQL. Any assistance would be greatly appreciated.
Regards
Muhammad

The NLS language parameter needs tobe set for this session.
The following line fo code was used:
dbms_session.set_nls('NLS_LANGUAGE', '''AMERICAN''');;

Similar Messages

  • Calling Oracle API from controller

    Hi,
    I need to call a Public API from controller.
    API procedure is having 85 parameters,but only few are manadatory. can someone tell me whether i need to pass all the parameters with default values or null or is there anyway i can pass only required parameters.

    Hi,
    import oracle.jdbc.OracleCallableStatement;
    import oracle.jdbc.OracleTypes;
    You create a callable statement like,
    OracleCallableStatement callableStatement = null;
    String callStr = " BEGIN mypackage_pkg.add_ite, "+
    "(p_organization_id => :1, " +
    " p_batch_id => :2, " +
    " p_reason_code => :3, " +
    " x_msg_count => :4); "+
    " END; ";
    callableStatement = (OracleCallableStatement)getOADBTransaction().createCallableStatement(addWriteOffItem,1);
    //Set in and out variables like,
    callableStatement.setNUMBER(1, organizationId);
    callableStatement.setNUMBER(2, batchId);
    callableStatement.setString(3, reasonCode);
    callableStatement.registerOutParameter(4,OracleTypes.VARCHAR,255);
    //Then execute the stmt
    callableStatement.execute();
    resultMessage = (String)callableStatement.getString(4);
    The code should be inside the try catch block.
    Thanks,
    With regards,
    Kali.
    OSSI.

  • CSD_RULE_MATCH_FAILED-calling service request api from oracle apps adapter

    We are doing integration between Siebel and Oracle Apps. When a service request is created on Siebel we are passing that in Oracle Apps using Oracle Apps adapter which is calling a custom API which is doing all the validations and in turn is calling a public api for service request creation. There are two types of service requests - Field Service and Depot Repair. For Field Service we are able to successfully insert the data on Oracle Apps, but for Depot Repair we are getting an error 'CSD CSD_RULE_MATCH_FAILED' from the standard API.
    We have checked the setup and found it is proper. We invoked the pl/sql API from sql developer and we are able to insert the data. So we are facing this issue only when calling the api from oracle apps adapter.
    In the invoke call we have set these properties -
    jca.apps.RespApplication
    jca.apps.Responsibility
    jca.apps.Username
    Based on our analysis till now it is looking like a security context setup issue, but we are not really sure what properties to set.
    Any help in getting this through will be greatly appreciated.
    Thanks,
    Shantanu

    Hi Vijay,
    We have created the apps adapter with default settings as 'apps' user and set the properties Responsibility, RespApplication, Username of <invoke>. Other than that no other settings has been changed.
    Are we missing anything?
    This adapter is able to hit the database in case of 'Field Service' but it is failing for 'Depot Repair'.
    Edited by: 927382 on Apr 13, 2012 2:19 AM

  • Can we invoke oracle API's from Webservice

    Hi,
    I have a requirement to invoke some oracle Api's like submitting a concurrent request etc, from a webservice.
    Is that possible? If yes, How can we do that.
    Thanks & Regards
    Puja

    Is it possible to publish a service for the api's and call this service from your own webservice by use of a webserviceproxy?
    or build some sort of composite bpel service, which calls the api's by use of a database-adapter.

  • Running Oracle seeded API from Custom Schema

    Hi All
    I have a custom schema and I need to call a Oracle standard API from this schema. When I try to initialize the session using fnd_global.apps_initialize I get the following error:
    ORA-00942: table or view does not exist
    ORA-06512: at "APPS.FND_CORE_LOG", line 25
    ORA-06512: at "APPS.FND_GLOBAL", line 104
    ORA-06512: at "APPS.FND_GLOBAL", line 1620
    ORA-06512: at "APPS.FND_GLOBAL", line 2170
    ORA-06512: at "APPS.FND_GLOBAL", line 2312
    ORA-06512: at "APPS.FND_GLOBAL", line 2250
    ORA-06512: at line 2
    I understand that this is an issue with GRANTS. However I have granted the EXECUTE ANY PROCEDURE and SELECT on all the underlying tables of this oracle package.
    Has anybody faced a similar situation. Any help would be greatly appreciated.
    Thank You.
    Jyoti
    Edited by: user646763 on Oct 3, 2010 11:49 PM
    Edited by: user646763 on Oct 3, 2010 11:51 PM

    Hi,
    I understand that this is an issue with GRANTS. However I have granted the EXECUTE ANY PROCEDURE and SELECT on all the underlying tables of this oracle package.The error "ORA-00942: table or view does not exist" indicates that the custom schema owner cannot select from the underlying tables. Please review the packages code again and make sure that your custom user has select privileges (or check if any public synonym needs to be created).
    See eTRM website for details about those packages and the relevant tables -- http://etrm.oracle.com
    Thanks,
    Hussein

  • Calling OLE API from Oracle Stored Procedure

    An application that I need to intergate with exposes only the OLE API. How can I invoke these OLE APIs from Oracle stored procedure? Do I need any special/ additional Oracle components? Can you please help. Any links to examples would be very helpful. Thanks.

    If what you mean by Oracle stored procedures is pl/sql then yes.
    You can create a "wrapper" this way:
    CREATE OR REPLACE FUNCTION xmlXform
    in_mapUrl IN VARCHAR2,
    in_inputUrl IN VARCHAR2
    RETURN VARCHAR2
    AS
    LANGUAGE JAVA NAME
    'com.yourcompany.xml2any.xform(java.lang.String,java.lang.String)
    RETURN java.lang.String';
    Then load the java as:
    loadjava -user youruser/youruserpasswd -resolve -verbose lib/xmlparserv2.jar classes/com/yourcompany/xform.class classes/com/yourcompany/xml2any.class
    The java, given the correct permissions, can do anything java can do including communicate with outside applications.
    Is this the "best" way... depends on what you are trying to accomplish.

  • Population of Oracle DBs from XML?

    Forgive me if I haven't fully understood Oracle's new XML parser
    for Java, but is it possible to >>directly<< populate an Oracle
    database from an XML file or do you have to use the Java parser.
    As a developer using Delphi it would be most useful to have a
    generic XML to table converter build into Oracle. As far as I
    can see the only way at the moment to do this is throgh the Java
    VM. Correct me if I'm wrong.
    Any comments on this thread would be most appreciated.
    Ian Simpson
    Appsco Software Ltd.
    Aberdeen, Scotland.
    null

    Thanks a lot for the quick response!
    Ian
    Oracle XML Team wrote:
    : Hi Ian,
    : You can do it in a variety of ways. One is to use the XML SQL
    : utility which supports insertion of canonical documents into
    : tables/views. This calls the parser underneath to parse the
    : document and insert it into tables.
    : If instead you want to process the XML documents and do
    : insertions yourself into different tables/views, then you need
    : to use the parser. (there are java,C and C++ versions
    : available), parse the document and insert the values. The
    parser
    : works off on any XML document and gives you an API to process
    : the document i.e. walk the document tree, reach a particular
    : node etc..
    : The other option is the use of IFS to process XML documents
    and
    : insert them into appropriate tables/views.
    : Thx
    : Oracle XML team
    : Ian Simpson (guest) wrote:
    : : Forgive me if I haven't fully understood Oracle's new XML
    : parser
    : : for Java, but is it possible to >>directly<< populate an
    : Oracle
    : : database from an XML file or do you have to use the Java
    : parser.
    : : As a developer using Delphi it would be most useful to have
    a
    : : generic XML to table converter build into Oracle. As far as
    I
    : : can see the only way at the moment to do this is throgh the
    : Java
    : : VM. Correct me if I'm wrong.
    : : Any comments on this thread would be most appreciated.
    : : Ian Simpson
    : : Appsco Software Ltd.
    : : Aberdeen, Scotland.
    : Oracle Technology Network
    : http://technet.oracle.com
    null

  • Issue in invoking process order API from SOA

    Hi All,
    I am working on creating sales order in oracle Apps from Oracle SOA using Apps Adapter.
    I have used OE_ORDER_PUB.Process order API to create the sales order.I am also sending the org_id,reponsibility,username properties in Invoke activity.
    When I invoke the API ,I am getiing SQL Exception- invalid name pattern.
    The error payload is as follows.
    <fault>
    <bpelFault>
    <faultType>0</faultType>
    <bindingFault>
    <part name="summary">
    <summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'ESOA_SOprj' failed due to: Interaction processing error. Error while processing the execution of the APPS.XX_BPEL_ESOA_SOPRJ.OE_ORDER_PUB$PROCESS_ORDER API interaction. An error occurred while processing the interaction for invoking the APPS.XX_BPEL_ESOA_SOPRJ.OE_ORDER_PUB$PROCESS_ORDER API. *Cause: java.sql.SQLException: invalid name pattern: APPS.OE_ORDER_PUB_HEX54139X39X496 Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD.* This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-17074" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary>
    </part>
    <part name="detail">
    <detail>invalid name pattern: APPS.OE_ORDER_PUB_HEX54139X39X496</detail>
    </part>
    <part name="code">
    <code>17074</code>
    </part>
    </bindingFault>
    </bpelFault>
    </fault>
    I also checked the oracle Apps database where there is no error in APPS.OE_ORDER_PUB_HEX54139X39X496 object.
    Kindly give your suggestions.
    regards,
    Goutam

    Did you get this to work?
    I checked the
    $INST_TOP/logs/ora/10.1.3/opmn/oafm_default_group_1/oafmstd.err file.
    Found the oracle.tip.adapter.db.sp.AbstractStoredProcedure execute was
    the next line was the
    <::Outbound><oracle.tip.adapter.db.sp.AbstractStoredProcedure execute> Bindings [P_ORG_ID=>NUMBER(null), P_OPERATING_UNIT=>VARCHAR2(null), P_API_VERSION_NUMBER=>NUMBER(1.0), ... long log details of the bind parameters....
    I search through to find the bindings which were P_HEADER_CUSTOMER_INFO_TBL=>APPS.OE_ORDER_PUB_CX54139X39X5692*(null)* but not allowable as null,
    then check the original SOAP request and added the blank parameter:
          <proc:P_HEADER_CUSTOMER_INFO_TBL></proc:P_HEADER_CUSTOMER_INFO_TBL>
    So then it didn't come through "NULL" and the procedure got properly called.
    Causing an error:
    <::Outbound><oracle.tip.adapter.db.exceptions.DBExceptionHandler isRetriable> SQLState is 65000 (unknown) for java.sql.SQLException: ORA-06531: Reference to uninitialized collection
    ORA-06512: at "APPS.ISG_OE_ORDER_PUB_PROCESS_ORDER", line 1
    ORA-06512: at "APPS.ISG_OE_ORDER_PUB_PROCESS_ORDER", line 1
    ORA-06512: at line 1
    That's a nasty call parameter list and very easy to miss a parameter when cleaning up the SOAP XML request.  That's how i did it.  Hope this helps the next guy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error in oim Role creation using Role Manager Service API from Standalone Java client

    Hi,
      Facing the following error when trying to create Role using Role Manager Service API from a standalone java client .
    Tried with the solution of changing ,
    Login into the Web Logic Admin Console --> Servers --> OIM Server --> Protocols --> Modify the Maximum Message from 100000000 to 1000000000, but still the problem persists.
    Exception in thread "main" org.omg.CORBA.BAD_PARAM:   vmcid: 0x0  minor code: 0  completed: No
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(Unknown Source)
    at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
    at com.sun.org.omg.SendingContext._CodeBaseStub.meta(Unknown Source)
    at com.sun.corba.se.impl.encoding.CachedCodeBase.meta(Unknown Source)
    at com.sun.corba.se.impl.io.IIOPInputStream.getOrderedDescriptions(Unknown Source)
    at com.sun.corba.se.impl.io.IIOPInputStream.inputObjectUsingFVD(Unknown Source)
    at com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(Unknown Source)
    at com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(Unknown Source)
    at com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(Unknown Source)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(Unknown Source)
    at com.sun.corba.se.impl.encoding.CDRInputStream.read_value(Unknown Source)
    at oracle.iam.identity.rolemgmt.api._RoleManager_ogut7n_RoleManagerRemoteRIntf_Stub.createx(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
    at $Proxy2.createx(Unknown Source)
    at oracle.iam.identity.rolemgmt.api.RoleManagerDelegate.create(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at Thor.API.Base.SecurityInvocationHandler$1.run(SecurityInvocationHandler.java:68)
    at weblogic.security.subject.SubjectProxy.doAs(SubjectProxy.java:64)
    at weblogic.security.subject.SubjectManager.runAs(SubjectManager.java:262)
    at weblogic.security.Security.runAs(Security.java:48)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(weblogicLoginSession.java:52)
    at Thor.API.Base.SecurityInvocationHandler.invoke(SecurityInvocationHandler.java:79)
    at $Proxy3.create(Unknown Source)
    at com.idm.role.CreateRole.createRole(CreateRole.java:113)
    at com.idm.role.CreateRole.main(CreateRole.java:167)
    Thanks In Advance

    Hi , I have used OIM 11g  R2.
    Please find below the code we have used,
    package com.idm.role;
    import java.util.HashMap;
    import java.util.HashSet;
    import java.util.Hashtable;
    import java.util.Iterator;
    import java.util.Set;
    import java.util.logging.Logger;
    import javax.security.auth.login.LoginException;
    import oracle.iam.identity.exception.NoSuchRoleException;
    import oracle.iam.identity.exception.RoleAlreadyExistsException;
    import oracle.iam.identity.exception.RoleCreateException;
    import oracle.iam.identity.exception.RoleLookupException;
    import oracle.iam.identity.exception.RoleModifyException;
    import oracle.iam.identity.exception.SearchKeyNotUniqueException;
    import oracle.iam.identity.exception.ValidationFailedException;
    import oracle.iam.identity.rolemgmt.api.RoleManager;
    import oracle.iam.identity.rolemgmt.api.RoleManagerConstants;
    import oracle.iam.identity.rolemgmt.vo.Role;
    import oracle.iam.platform.OIMClient;
    import oracle.iam.platform.authz.exception.AccessDeniedException;
    public class CreateRole {
    private final static Logger LOGGER = Logger.getLogger(CreateRole.class .getName());
    OIMClient oimClient = null;
    public OIMClient connectToOIM() {
      LOGGER.info("In connectToOIM ");
      Hashtable env = new Hashtable();
      env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL,
        "weblogic.jndi.WLInitialContextFactory");
      env.put(OIMClient.JAVA_NAMING_PROVIDER_URL,
        "t3://V-hydidm1.itig.co.in:14000");
      System.setProperty("java.security.auth.login.config",
        "F:\\Projects\\IDM\\Team\\Env_setup\\OIM_Setup\\designconsole\\config\\authwl.conf");
      System.setProperty("java.security.policy",
        "F:\\Projects\\IDM\\Team\\Env_setup\\OIM_Setup\\designconsole\\config\\xl.policy");
      System.setProperty("OIM.AppServerType", "wls");
      System.setProperty("APPSERVER_TYPE", "wls");
      System.setProperty("weblogic.Name", "oim_server1");
      oimClient = new OIMClient(env);
      try {
       oimClient.login("xelsysadm", "Passw0rd".toCharArray());
      } catch (LoginException e) {
       e.printStackTrace();
      System.out.println("Connected");
      return oimClient;
    public void readRoleMetadata() {
      LOGGER.info("in readRoleMetadata ");
      RoleManager roleManagerService = oimClient
        .getService(RoleManager.class);
      try {
       Role roleVo = roleManagerService.getDetails(
         RoleManagerConstants.ROLE_DISPLAY_NAME, "API Role1", null);
       Set attributeNameSet = roleVo.getAttributeNames();
       Iterator it = attributeNameSet.iterator();
       while (it.hasNext()) {
        System.out.println("Attribute Name :: " + it.next());
       // roleVo.setAttribute("ADentitlements", "Security Admin access");
       String adEntitlements = "" + roleVo.getAttribute("ADentitlements");
       System.out.println("AD Entitlements :: " + adEntitlements);
       System.out.println("DB Entitlements :: " + ""
         + roleVo.getAttribute("DBEntitlements"));
       System.out.println("Unix Entitlements :: " + ""
         + roleVo.getAttribute("UnixWindows"));
       System.out.println("VPN :: " + "" + roleVo.getAttribute("VPN"));
      } catch (SearchKeyNotUniqueException e) {
       e.printStackTrace();
      } catch (NoSuchRoleException e) {
       e.printStackTrace();
      } catch (RoleLookupException e) {
       e.printStackTrace();
      } catch (AccessDeniedException e) {
       e.printStackTrace();
    public void createRole() {
      LOGGER.info(" in Create role ");
      RoleManager roleManagerService = oimClient
        .getService(RoleManager.class);
      HashMap<String, Object> roleCreationAttrMap = new HashMap<String, Object>();
      roleCreationAttrMap.put(RoleManagerConstants.ROLE_NAME, "API Role1");
      roleCreationAttrMap.put(RoleManagerConstants.ROLE_DESCRIPTION,
        "This Role is created using API Role1");
      roleCreationAttrMap.put(RoleManagerConstants.ROLE_DISPLAY_NAME,
        "API Role1");
      roleCreationAttrMap.put("ADentitlements", "API Role1 AD Entitlements");
      roleCreationAttrMap.put("DBEntitlements", "API Role1 DB Entitlements");
      roleCreationAttrMap.put("VPN", "No");
      roleCreationAttrMap.put("UnixWindows", "API Role1 Unix Entitlements");
      Role roleVo = new Role(roleCreationAttrMap);
      try {
       System.out.println(" Before Create role *********************************************");
       roleManagerService.create(roleVo);
       System.out.println("Role Created .. ");
      } catch (ValidationFailedException e) {
       e.printStackTrace();
      } catch (RoleAlreadyExistsException e) {
       e.printStackTrace();
      } catch (RoleCreateException e) {
       e.printStackTrace();
      } catch (AccessDeniedException e) {
       e.printStackTrace();
    public void modifyRole() {
      LOGGER.info(" in modifyRole ");
      RoleManager roleManagerService = oimClient
        .getService(RoleManager.class);
      Role roleVo;
      try {
       roleVo = roleManagerService.getDetails(
         RoleManagerConstants.ROLE_DISPLAY_NAME, "API Role1", null);
       String roleKey = roleVo.getEntityId();
       HashMap<String, Object> roleCreationAttrMap = new HashMap<String, Object>();
       roleCreationAttrMap.put("ADentitlements",
         "Updated API Role1 AD Entitlements");
       Set roleKeySet = new HashSet<String>();
       roleKeySet.add(roleKey);
       Role roleVoNew = new Role(roleCreationAttrMap);
       roleManagerService.modify(roleKeySet, roleVoNew);
       System.out.println("Role Modified ..");
      } catch (SearchKeyNotUniqueException e) {
       e.printStackTrace();
      } catch (NoSuchRoleException e) {
       e.printStackTrace();
      } catch (RoleLookupException e) {
       e.printStackTrace();
      } catch (AccessDeniedException e) {
       e.printStackTrace();
      } catch (ValidationFailedException e) {
       e.printStackTrace();
      } catch (RoleModifyException e) {
       e.printStackTrace();
    public static void main(String args[]) {
      CreateRole miscObj = new CreateRole();
      miscObj.connectToOIM();
      miscObj.createRole();
      //miscObj.readRoleMetadata();
    Thanks In Advance .

  • Calling oracle API having parameter as record type throughPL/SQL WebService

    Hi All,
    I dont know whether this is the right forum to put this query, but as i am using a pl/sql web service , putting the query on this forum.
    My requirement is to call oracle API which in turh creates a single Invoice(using Ar_Invoice_Api_Pub.create_single_invoice )
    But the issue is this API in turn has some of the input parameters as Record type and table type, my concern is how to pass this data(record type or table type) as parameter thorugh java code .. If i use Collection or Hashmap will it work , I dont think so , some intermediate conversion will require.
    Subsequently the other requirement is fetch this record/table type data and return it to the java code
    Please correct me if i am wrong and suggest a proper solution if anybody is aware off or tried such things before.
    Thanks in advance.
    Regards,
    Anant.

    Hi,I'm new comer of this world,
    I've a pl/sql like this:
    package MY_WS_API is
    type record_set is ref cursor;
    PROCEDURE Get_User_Info(p_user_id VARCHAR2,
    p_rep_id VARCHAR2,
    p_flag out number,
    p_msg out varchar2,
    p_recordset out record_set);
    end MY_WS_API;
    when I using jdeveloper trying to publish it as a webservice, in the step 4 of the wizzard poping me choose the program unit to expose, the PROCEDURE Get_User_Info is not available and told me "Ref cursor Type is not supported due to a jdbc limitation and Ref Cursor Types are only supported for use of return type".
    THE QUESTION is:
    1.the cursor I used is of return type,I'm not very understanding the "why not" message upon.
    2.in such case , need I trans the return cursor into Object[] if have to?
    3.any other limitation for generating WS from PL/SQL using jdeveloper?
    Thanks!

  • Oracle APIs For Contacts and Role Responsibility

    Hello,
    Please, I need a direction on how to proceed about the use of the right API. I'm working with Oracle EBS R12. If this is not the place for this kind of doubt, please let me know the best one.
    I already have a site for a customer, which was created by the ra_customers_interface_all, after loading the data and processing the interface.
    Now I need to create (using Oracle APIs) a contact name, which will have at least a telephone number and an e-mail address.
    I know that the contact name will be in table HZ_PARTIES, but later it will be related to a site. The registry that will be used for this has the Party_Type value equals to 'PARTY_RELATIONSHIP', according to what the customers interface did after being executed.
    Then the telephone number and e-mail address will be in table HZ_CONTACT_POINTS. The Owner_Table_Name of it has to be 'HZ_PARTIES'. The Owner_Table_Id of it will have the value of Party_Id from table HZ_PARTIES, which has Party_Type value equals to 'PARTY_RELATIONSHIP'.
    After this, my main goal is to create a role responsibility to the contact name. So I know there are other two tables involved. They are HZ_CUST_ACCOUNT_ROLES and HZ_ROLE_RESPONSIBILITY.
    And I see there are two more tables involved, which are HZ_RELATIONSHIPS, which will do the PERSON x ORGANIZATION relation, and also table HZ_ORG_CONTACTS, which has the field PARTY_SITE_ID, to finally indicate that this contact is part of a site, which I already have.
    I have all these tables in mind. I just need a tip on how to proceed. I'm able to create a party as PERSON, not yet as PARTY_RELATIONSHIP. I'm able to create a contact point (telephone number). I'm lacking the idea about what to do have this:
    site -> contact name -> telephone number of this contact name inside this site
    I can do this:
    site -> telephone number of this site
    Any help would be great.

    Thanks for the reply but i stil have the problem...............
    My Current machine.config has this to say in that particular section
    <connectionStrings>
    <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
    <add name="OraAspNetConString" providerName="Oracle.DataAccess.Client" connectionString=" "/>
    </connectionStrings>
    What can be done.........................in this case
    Thanks

  • How to get standard oracle API or Interface package in oracle apps

    Hi guys,
    Need ur help........plz tell me how to find the standard oracle API or other package on server. Actually I need standard Interface package of Requisition Import program API plz give me exact path to finding standard API or interface pkg.......ASAP and also give the interface pkg name of Requisition Import in purchasing.
    it's urgent plz do needful...........................................
    Thanks,
    abh...................
    Edited by: 811373 on Jun 4, 2011 12:54 AM

    I want to find all API related to PO Requisition special Requisition Import conc. program API ...plz tell how can get it.
    Actually I want to design custom interface on the basis of standard Requisition Import api so, plz give me sql script for find those api.From iREP website, navigate to the PO module and check the list of APIs.
    Or, you could enable trace/debug for the concurrent program and generate the TKPROF and this will show you the API used by this program.
    FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]
    How To Trace a Concurrent Request And Generate TKPROF File [ID 453527.1]
    Another option is to open the report using reports builder and check the code.
    Thanks,
    Hussein

  • How to connect Oracle database from Active Server page

    Hi
    This is srinivas aluri
    I have developed an application using ASP and MS-SQL7.
    Now i want to port this application to Oracle 8i database
    I have written my connection in seperate file called
    connection.inc using SQL OLEDB provider
    If i have to connect oracle database what will be my provider
    and what is the exact code for this connection string
    Here i am giving the code of SQL databse connection string
    strcon= Provider=SQLOLEDB.1;Persist Security Info=False;User
    ID=sa;Initial Catalog=prjdb;Data Source=servername
    i have tried by changing the provider name from SQLOLEDB.1 to
    OraOLEDB.oracle
    but i could not able connect the database.
    It is giving provider not found or not properly installed error.
    But the same code is perfectly working from Visual Basic code.

    it depends on configuration your going to choose, there are two ways--
    - Using X/Open standards, for this
    you have to make an entry of Resource manager in $TUXDIR/udataobj/RM file.
    Then in UBBConfig file in GROUPS section u have to set Openinfo.
    It also depend on which database you are going to use.
    In your service now you need to call tpopen() API from tpsvrinit() function.
    - Other possibility is, take an implicit connection using Pro*C or Pro*Cobol whatever platform you are using.
    EXEC SQL Connect ...

  • How to connect oracle database from tuxedo

    Hi,
    How to connect oracle database from tuxedo.
    If any one can help me.
    Regards,

    it depends on configuration your going to choose, there are two ways--
    - Using X/Open standards, for this
    you have to make an entry of Resource manager in $TUXDIR/udataobj/RM file.
    Then in UBBConfig file in GROUPS section u have to set Openinfo.
    It also depend on which database you are going to use.
    In your service now you need to call tpopen() API from tpsvrinit() function.
    - Other possibility is, take an implicit connection using Pro*C or Pro*Cobol whatever platform you are using.
    EXEC SQL Connect ...

  • Assigning multiple interfaces for Oracle API Gateway (OAG)

    We are deploying Oracle API Gateway to throttle our incoming API requests. We would like to keep the incoming external API requests separate from the internal configuration management so that they go through different interfaces when accessing the OAG server. This is mainly for security reasons so that the external people won’t have access to the interface used by internal operations team to manage OAG. Based on your experience, is there any standard best practice to accomplish this? We were thinking to perhaps use two of the server’s network interfaces with different IPs, one for the incoming API requests and the other for the internal admin management of OAG. But not sure if this is the best way to do what we need. We are aware of OAG's capability to support two separate ports to handle this situation, but would like a more secure set-up that could completely eliminate external access to the OAG management done by the IT team.
    Would appreciate any thoughts on best practices used regarding multiple interfaces for OAG set-up. Thank you. Oracle Marketing Cloud.

    You are on the right track.
    Here is how you can achieve this:
    You can use multiple network interfaces on the UNIX machine and setup networking/routing in such a way that all external traffic comes on on one card and is routed internally via a different card.
    Segregate difference types of services (i.e to be used by external clients vs internal apps) into difference different "Service Groups". Have each of these service groups listen on different port + NIC card (under Listeners, you can define a port to list to list on a specific network address and port instead of *).
    Setup additional protection for services that will be accessed by external clients. Use "Threatening Content " filter to protect your services.
    Setup 2 way SSL for the interface that will be called by external clients. Setup a DN based authorization check if you want to have both authentication and authorization.
    Hope this helps.
    -Thanks,
    Ankit Kumar

Maybe you are looking for

  • How to attempt production orders and get feedback by using IDocs

    Hi, I'm new new to SAP and R3 respectively mySAP. I need to know how to use IDocs (over file system) to attempt production orders to an extern application and how to get the feedback of the whole orders and single operations. I found the IDoc-base-ty

  • Very large file transfers

    I have several very large (500mb) PDF files of music scores on my computer that I would like to be on my iPad3. Is there an easy way of transferring them? Also will they open for viewing when I get them there? Ta TS

  • TableView.edit() is not working in JavaFX 2.1

    Hi All, Yesterday i have updated my javafx installation from JavaFX 2.0.2 to JavaFX 2.1 b07 After that I am facing issues with TableView.edit() method. It stops working and not making the cell as editable. In the below example , select the first cell

  • How to create Item Codes with multiple Item Description

    Hi, for one of my client, we need to create Item Codes with multiple Item Description. e.g., Item Code - M00285 Item Description 1 - Blue Paint Item Description 2 - Red Paint Is that possible in SAP Business One? If "Yes" kindly provide a solution. E

  • HT204074 can we get back the apple id if we deleted?

    once we delete icloud apple id then we create new one..can we get back the old icloud apple ID back?