Database Adapter & Optional Parameters?

I'm working on creating a web service that accepts two parameters. Parameter A is required while parameter B is optional.
I then need to pass these parameters on to the database adapter that will perform my query. Is it possible to set things up so that parameter B is optional at this stage as well?
When I turn on XML validation on the domain, an error is thrown because null is not a valid value for the parameter.

If you use the DB adapter for stored procedures then you have control of the input parameters based on the instance XML that is supplied to the procedure. If a parameter is optional and you don't want to supply a value (i.e. you want the parameter's default value), then simply omit the XML element corresponding to the optional parameter from the instance XML. Note that this only works for optional parameters.

Similar Messages

  • Database Adapter not working properly for more input parameters in OSM

    Hi,
    We are using OSM 7.0.0.3 and using design studio for development.
    Recently we are facing issue with the database adapter.In Studio,we have options for configuring the JDBC adapter.
    we have custom table in the database which has four columns with it.we are suppose to retrieve this table data using database adpater.
    so,whats happening here is,when we are sending two parameters as input to database adapter,we are able to retrive the table data properly.
    but,
    when we are sending morethan two parameters as input adapter,it is not giving right results.
    so,
    is there any constarint on how many parameters to be send as inut to adapter???
    any opinoin on first look at the issue??i will share the sample code if needed.

    Hi Naidu,
    OSM 7.0.0.3 is a very old version and they are many fixes on top of it. So request you to please use any of the latest versions of OSM 7.0.1/7.0.2/7.0.3 and retest the issue. We are not giving any patches on top of OSM 7.0.0. You can also raise a service request for further investigation and analysis.
    Regards,
    JP

  • Problem with database adapter on plsql procedure with in/out parameters

    running BPEL 10.1.3.1 and using the database adapter on a plsql procedure with in/out parameters I get errors
    the plsql procedure:
    create or replace procedure proc_with_clob_inout_parameter(
    p_string in varchar2,
    p_clob in out clob)
    is
    begin
    p_clob := p_string;
    end proc_with_clob_inout_parameter;
    In BPEL I call this procedure. When I only assign a value to the p_string parameters (in a BPEL assign) all is well. When I also assign a value to the p_clob parameter the error occurs:
    <part name="summary">
    <summary>
    file:/ora1/app/oracle/as101.3/bpel/domains/digitaaldossier/tmp/.bpel_janb_inout_1.0_f6908ccf864581b7265c362444e88075.tmp/twee.wsdl
    [ twee_ptt::twee(InputParameters,OutputParameters) ] - WSIF JCA Execute of
    operation 'twee' failed due to: Error while trying to prepare and execute
    an API.
    An error occurred while preparing and executing the
    JANB.PROC_WITH_CLOB_PARAMETER2 API. Cause: java.sql.SQLException: Parameter
    Type Conflict [Caused by: Parameter Type Conflict]
    ; nested exception is:
    ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the
    JANB.PROC_WITH_CLOB_INOUT_PARAMETER API. Cause: java.sql.SQLException: Parameter
    Type Conflict [Caused by: Parameter Type Conflict]
    Check to ensure that the API is defined in the database and that the
    parameters match the signature of the API. Contact oracle support if error
    is not fixable.
    </summary>
    </part>
    In BPEL 10.1.2.0 this isn't a problem. I tested it against a 10.2.0.1 and a 10.2.0.2 database and in both situations I get the error with BPEL 10.1.3.1 and no error with BPEL 10.1.2.0
    it appears to be a problem in the database adapter...
    anyone with the same problems and/or a solution?

    Not of any use to you, but we had exactly the same problem on Friday when we applied AS 10.1.2.2 Patchset on top of BPEL 10.1.2.0.2.
    The clob in our pl/sql proc wan't declared as in/out but for some reasons JDeveloper had created a clob on the Output Parameter type in the db partner link xsd. I removed this and it worked. This code had been untouched , and working fine, for months.
    I'll be raising an SR today.
    Rob J

  • Database Adapter Poll doubt

    My requirement is, when ever a new recored inserted to CREDITCARDINFOPARENT table need to insert the same record to CREDITCARDINFORESULT;
    desc CREDITCARDINFOPARENT;
    Name Null? Type
    SNO NUMBER
    SSN NOT NULL VARCHAR2(15)
    FIRST_NAME VARCHAR2(30)
    LAST_NAME VARCHAR2(30)
    CCNUMBER NOT NULL VARCHAR2(20)
    CREDITRATING NUMBER
    STATUS NOT NULL VARCHAR2(20)
    CCNumber is my primary key
    desc CREDITCARDINFORESULT;
    Name Null? Type
    NO NUMBER
    SN NOT NULL VARCHAR2(15)
    FIRSTNAME VARCHAR2(30)
    LASTNAME VARCHAR2(30)
    CCNUMBER VARCHAR2(20)
    CRATING NUMBER
    CCSTATUS NOT NULL VARCHAR2(20)
    CCNUMBER is Foreign Key.
    I tried Poll DB adapter example in the following way
    Created a project with "Composite with Mediator"
    under exposed services I dragged DB Adapter
    Service Name-> Example Service
    Step 4 of 13 -> selected Poll or Changed Records in a table
    step 5 of 13 -> imported 2 tables (CREDITCARDINFOPARENT, CREDITCARDINFORESULT)
    step 6 of 13 -> displayed the Relationships
    step 8 of 13 -> After Read -> selected Update a Sequencing Table
    step 9 of 13 -> Sequencing Table: CREDITCARDINFORESULT
         Sequence Name Field: CCNUMBER
         Sequence Value Field: STATUS
         Sequence ID Field: CCNUMBER
    step 10 of 13 -> Polling Options: SQL
              Pre Polling SQL:
    SELECT STATUS FROM CREDITCARDINFORESULT WHERE (CCNUMBER = 'CREDITCARDINFOPARENT')
    Polling SQL:
    SELECT SNO, SSN, FIRST_NAME, LAST_NAME, CCNUMBER, CREDITRATING, STATUS FROM CREDITCARDINFOPARENT WHERE ((STATUS = 'VALID') AND (CCNUMBER > #STATUS)) ORDER BY CCNUMBER ASC
    After Read SQL:
    UPDATE CREDITCARDINFORESULT SET STATUS = #STATUS WHERE (CCNUMBER = 'CREDITCARDINFOPARENT')
    step 11 of 13 ->Define Selection Criteria:
              Parameters:ccno
              SQL: SELECT SNO, SSN, FIRST_NAME, LAST_NAME, CCNUMBER, CREDITRATING, STATUS FROM CREDITCARDINFOPARENT WHERE ((STATUS = 'VALID') AND (CCNUMBER > #STATUS)) ORDER BY CCNUMBER ASC
    Under External Services : I dragged DB Adapter and i selected Perform an Operation on a table as Insert Only. and I imported CREDITCARDINFORESULT
    I deployed the the Project. Project depolyed successfully;
    under EnterpriseManager command prompt I got
    <Jun 29, 2010 2:25:46 PM IST> <Warning> <oracle.soa.adapter> <BEA-000000> <JCABinding=> ExampleProject JNDI lookup of 'eis/DB/soademodatabase' f
    ailed due to: Unable to resolve 'eis.DB.soademodatabase'. Resolved 'eis.DB'>
    <Jun 29, 2010 2:25:46 PM IST> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=> ExampleProject Error while performing endpoint Activation:
    BINDING.JCA-12561
    JCA Resource Adapter location error (WebLogic).
    Unable to locate the JCA Resource Adapter via .jca binding file element <connection-factory/>
    The JCA Binding Component is unable to startup the Resource Adapter specified in the <connection-factory/> element: location='eis/DB/soademodata
    base'.
    The reason for this is most likely that either
    1) the Resource Adapters RAR file has not been deployed successfully to the WebLogic J2EE Application server or
    2) the JNDI <jndi-name> setting in the WebLogic JCA deployment descriptor has not been set to eis/DB/soademodatabase. In the last case you might
    have to add a new 'connector-factory' entry (connection) to the deployment descriptor.
    Please correct this and then restart the WebLogic Application Server
    >
    I confugired the Connection factory properly; I checked at DB Adapter -> Configuration -> Outbound Connection Pools -> xADataSourceName -     jdbc/soadeoDatabase
    when I checked at JNDI tree I dont have any value under it.
    in Firefox EM, when I clicked on Example Project Test button is disabled. and I inserted one record to CREDITCARDINFOPARENT; but CREDITCARDINFORESULT table is not updated.
    can any body help me in this?
    Please let me know whether I follwed correct procedure or not?
    If I am wrong, please provide me the correct steps.
    Thanks in Advance.

    This error is usually raised if there is no outbound pool connections with the "eis/db/soademodata" name in the database adapter.
    First create a data source to the database in the JDBC Resources.
    Next in Weblogic server console --> Deployments --> DBAdapter --> Configurations --> Outbound Pool Connections --> create a new outbound pool connection with the name "eis/db/soademodata".
    Now update the "xADataSourceName" property of this connection pool with the JNDI name of the datasource created in the first step.
    Regards,
    KSN Pavan
    Edited by: KSN Pavan on Jun 30, 2010 2:51 AM

  • Database write using the Database Adapter

    i'm using Jdeveloper version 11.1.1.3.37.55.99 - and I'm not sure that I'm doing this right but:
    I've created a database table that has 3 attributes (id, name, description).
    I've then in the soa composite created a Database Adapter to have an insert operation for the newly created database table.
    In the BPM editor - I drag a service task into the process and configure it to use the recently created Database Adapter.
    While configuring the service task - I need to map my process variables into the service task but when I go to the
    implementation->use associations->simple, in the drag and drop plan is an object called a collection. I expand the collection and I get an object named recall. If I look at my datatypes my recall object shows the three attributes from the database schema for the table. (The datatype was created by the creation of the database adapter). However, I cannot expand the object in order to map in the individual process variables for the inputs for the insert parameters.
    Am I doing something incorrectly in attempting to map the process variables to the service call?
    Thanks,
    Christopher

    Christopher,
    Use the Transform in the Implementation tab instead of the Data Association to map your input process object to the service parameter. The Transform option creates an xslt file which you can use to map the input values to the database service values.
    Heidi.

  • How to use Database adapter as inbound adapter without having polling strategies?

    Hi All,
    I have a requirement wherein I have to use Database adapter to retrieve the data for every half an hour from one(X app) database and update that data into another application(Y app) .That database adapter will be along with BPEL process.My Flow would be like this:
    Database Adapter( In 'exposed services' section) ----->   BPEL (in 'Components') -----> Y app service( in 'External References' section)
    My questions for each step are below
         1) I have to retrieve the data from database(x app database) for every half an hour.So I have to schedule my whole process such that it should execute for every half an hour.
    Means I have to get  whatever the data is updated in the last half an hour in that database.
          The database adapter should be inbound in SOA composite editor(in 'Exposed services' section).
    But in order to have inbound adapter,we have select the 'Poll for New or Changed Records in a Table' option in turn we have to select one of polling operations below:
             Delete the Row(s) that were Read
    Update a Field in the [Table_Name] Table (Logical Delete)
    Update a Sequencing Table
    Update an External Sequencing Table on a Different Database
    Control Table Strategy
    But the problem is I don't have any control on the database(X app database) ,So (I can't update any data on that table,because that table may not have a field or table to update the processed rows)I can't choose any of the above operations.
    How can I achieve what I want that is to retrieve the data and schedule the process?
    Thanks in advance.

    Hi Heckler,
      Thank you very much for your answer that I can proceed further somehow.
    I still need to have some clarifications.
    In order to have a process which retrieves the data (Inbound operation) and updates the data into other application, the data(from X app)  should be the request(through DB adapter) of the BPEL process.
    X app does not do anything to send.We have(the BPEL process) to receive the data (or) no event is triggered.
    The flow :
    Database Adapter( In 'exposed services' section to retrieve data) ----->   BPEL (in 'Components') -----> Y app service( in 'External References' section)
    How can we ensure the data will be  request to BPEL process(means it will be in 'exposed services' section in SOA composite editor) for every half an hour if we use pick activity and database adapter as first activity?
    When we use ''Poll for New or Changed Records in a Table' ,then only adapter becomes inbound and comes into the 'exposed services' section.I can't use it as I don't have any control on the source table.
    I have this confusion before starting the process.Please help me to clear out the doubts.
    And this whole process should be executed automaticallly for every half an hour(means it creates instance for every half an hour)  Once we build the BPEL process.
    How to schedule it?
    And where do I need to create control table ?You mean I have to use some different database where in I have to create the table?

  • Error while invoking custom API using Database Adapter

    Hi,
    I've a requirement where in I need to fetch the data returned by a recordtype of a custom API. I've implemented this by invoking the custom API using Database Adapter. I'm facing a problem while performing this.
    The custom API holds the signature as:
    PROCEDURE EMP_DET
    Argument Name Type      In/Out Default?
    P_DEPTNO NUMBER IN
    L_LINE_TBL TABLE OF RECORD OUT
    I've a schema with which it needs to be validated. It looks like:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:po="http://www.mycompany.com/ns/sales" targetNamespace="http://www.mycompany.com/ns/sales" elementFormDefault="qualified">          
    <element name="EmployeeDetails">          
    <complexType>               
    <sequence>                    
    <element name="EmpNo" type="integer"/>                    <element name="EName" type="string"/>                    <element name="Job" type="string"/>                    <element name="Mgr" type="integer"/>                    <element name="HireDate" type="date"/>                    <element name="Sal" type="decimal"/>                    <element name="Comm" type="decimal"/>               </sequence>          
    </complexType>     
    </element>
    </schema>
    I did a transformation to the above stated Emp.xsd with the xsd created for my custom API by the BPEL process. I could create the process and deploy successfully, but while invoking I get the following error. (I'm using BPM 10.1.3.1 with JDev 10.1.3.1)
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>6502</code>
    </part><part name="summary"><summary>file:/D:/OraBPEL/bpel/domains/default/tmp/.bpel_my_poc_1.0_16c5d0f7b937c780d27d8975726a15cb.tmp/emp_details.wsdl [ emp_details_ptt::emp_details(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'emp_details' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the SCOTT.BPEL_EMP_DETAILS.EMP_PKG$EMP_DET API. Cause: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    [Caused by: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the SCOTT.BPEL_EMP_DETAILS.EMP_PKG$EMP_DET API. Cause: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    [Caused by: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
    </summary>
    </part><part name="detail"><detail>
    Internal Exception: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    Error Code: 6502</detail>
    </part></remoteFault>
    Can someone let me know as to why I'm getting this error? Also lemme know if such an approach is valid to do, if not please suggest me alternate methods to do this.
    Thanks in advance,
    Gayathri

    The 'numeric or value error' is one we have seen many times. The problem has been identified and fixed. Refer to this thread for more information.
    Issue with DB Adapter - ORABPEL-11811

  • MaxRaiseSize in database adapter

    Experts,
    I want to read single record on each polling frequency using database adapter as we do using FTP to read single file on each polling frequency by setting the property
    MaxRaiseSize to 1. But i could make it to work in database adapter . It is creating separate instance for each record but all on at the same time. but i want single instance on single record on each polling frequency . How can i do this. Please advise.
    Thanks a lot for your help.

    Hi:
    Try setting the following two parameters in the DB Adapter Wizard:
    Database Rows per XML Document
    Specify the number of rows per XML document when sending events to Oracle BPEL Process Manager or Oracle Mediator. This is the batch setting between the database adapter and its consumer: Oracle BPEL Process Manager or Oracle Mediator. For maximum throughput, it is ideal to pass a collection of rows as a single event. This reduces the per instance overhead and allows batching on the other end; that is, the database adapter merge or insert command can leverage batch database writing if it receives multiple rows as part of one invoke. Leave this set to 1 if your process performs unique processing on each row (if conceptually one row translates to one event).
    Database Rows per Transaction
    Select Unlimited or enter a value to indicate the number of table rows to process during a single transaction. For example, assume there are 10,000 rows at the start of a polling interval and this field is set to 100. In standalone mode, a cursor iteratively reads and processes 100 rows at a time until all 10,000 rows are processed, dividing the work into 10,000/100=100 sequential transactional units. This is the batch setting between the database and the database adapter. It cannot be set lower than database rows per XML document, which is the batch setting between the database adapter and its consumer: Oracle BPEL Process Manager or Oracle Mediator Component
    Hope this helps.
    best

  • Ref cursors in Database adapter

    Hi,
    Is the database adapter capable of handling ref cursors as the datatype of the output parameters of a pl/sql procedure?
    For instance if I have the following in my package-spec:
    TYPE SomeRecordType IS RECORD
    ( record_pk mut_table.record_pk%TYPE
    , person_nr person_table.person_nr%TYPE
    , field_1 mut_table.field_1%type
    , field_2 mut_table.field_2%type
    , field_3 mut_table.field_3%type
    TYPE SomeCursorType IS REF CURSOR RETURN SomeRecordType;
    PROCEDURE read_records
    ( cursor_out OUT SomeCursorType
    , exception_code OUT number
    , exception_message OUT varchar2
    Can the database adapter call the read_records procedure?
    I've never seen this in any doc. I know it can't handle record types (that is in 10.1.2 it couldn't as far as I know). So I figure that the above is not possible.
    Thanks in advance.
    Regards,
    Martien

    We have successfully used a sys_refcursor OUT parameter for a database procedure call and which is used by a DBAdapter to return a single dataset.
    At the time I remember attempting to use a strongly typed ref cursor as the parameter. I think this is what you are attempting to do. I rejected this approach at the time as I was not able to do this. It was, in our case, as simple as using the system defined ref cursor type (i.e. weakly typed).
    The handling of the returned dataset was not immediately obvious, but can be handled by as fairly simple XSL transformation to a locally defined variable of the requisite xml structure. I won't describe in detail how to do it as it is specific to our process. Suffice to say the transformation loops over all result rows assign via a test to the correct result field in our local variable.
    e.g.
    <xsl:template match="/">
    <ns1:BatchRequest004>
    <xsl:for-each select="/db:OutputParameters/db:P_SCHSHP_REF_CUR/db:Row">
    <ns1:statusRqst>
    <xsl:if test='db:Column/@name = "ID"'>
    <xsl:attribute name="id">
    <xsl:value-of select="db:Column[1.0]"/>
    </xsl:attribute>
    </xsl:if>
    </ns1:statusRqst>
    </xsl:for-each>
    </ns1:BatchRequest004>
    HTH and that I haven't misidentified your problem.

  • Database Adapter - Using in Clause

    In the Database adapter - I need to generate a Query like
    Select * from employee where empid in (1,2).
    empid - is a integer column
    I have tried the pure sql option and generated a query like Select * from employee where empid in (#ids).
    In the transformation, I am creating a comma separated string for ids and have bound it to ids variable.
    The above works for a single ID but throws an binding error when multiple Id's are passed.
    Whats the best way to handle 'In' Clause on a integer column? (There is no issue with string columns - multiple values can be passed)

    You will need utility PL/SQL function for that:
    create or replace type myTableType
    as table of number;
    create or replace function str2tbl( p_str in varchar2 ) return myTableType
    as
    l_str long default p_str || ',';
    l_n number;
    l_data myTableType := myTabletype();
    begin
    loop
    l_n := instr( l_str, ',' );
    exit when (nvl(l_n,0) = 0);
    l_data.extend;
    l_data( l_data.count ) :=
    ltrim(rtrim(substr(l_str, 1, l_n - 1)));
    l_str := substr( l_str, l_n+1 );
    end loop;
    return l_data;
    end;
    and then in Db Adapter:
    Select * from employee where empid in ( select * from TABLE ( cast ( str2tbl( #ids) as myTableType ))
    Hope that helps,
    Adam

  • Java.sql.SQLException: Invalid column index in database adapter

    I have a query that works fine if I run the sql in a JDeveloper SQL editor, but I get a "java.sql.SQLException: Invalid column index" error if I paste it in a database adapter. If I put this query in the adapter:
    select <column>
      from <table>
       where <column> in (select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1)I get the error. But if I just put the sub query in the adapter as:
    select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1the error goes away. Does anyone know what might be causing this?
    Thanks in advance

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

  • Parent-Child Join on tables in Database Adapter

    Hi,
    We are doing a join on two tables(T1 and T2) in Database adapter for an Insert operation. There is no Reference Integrity between these two tables in Database, but join is done through bpel database adapter.
    Here is a scenario - when we try to insert a record(parent-child), into these two tables, If there is any data issue in any of the child record, Adapter inserts parent-record, also inserts few child-records it processed before it encountered this data issue and terminates.
    Issue here is , We want this to be transactional, it means, If any of the child record fails adapter should rollback the entire insert operation both from parent and child tables and exit with an error. Instead BPEL inserting half records into child table.
    Is there any parameter I need to set or am I missing anything? Someone please suggest.
    Thanks,
    Phani

    There are a few options I guess.
    1. Add the referential key constraint.
    2. Add custom logic in your BPEL project to compensate for any errors you encounter in your BPEL processes.

  • Multiple stored procedure in Database Adapter

    Can I manually create the wsdl for database adapter, which can have multiple operations for different stored procedures?
    I tried creating a wsdl as -
    <definitions
    name="CustomAdapter"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/CustomAdapter/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/CustomAdapter/"
    xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/xsd/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/db/"
    >
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/" location="DBAdapterOutboundHeader.wsdl"/>
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/xsd/"
    schemaLocation="myadapter.xsd" />
    </schema>
    </types>
    <message name="args_in_msg_tscp1">
    <part name="InputParameters" element="db:InputParametersTSCP1"/>
    </message>
    <message name="args_in_msg_sample">
    <part name="InputParameters" element="db:InputParametersSAMPLE"/>
    </message>
    <message name="args_out_msg_sample">
    <part name="OutputParameters" element="db:OutputParametersSAMPLE"/>
    </message>
    <portType name="Proc1_ptt">
    <operation name="Proc1">
    <input message="tns:args_in_msg_tscp1"/>
    </operation>
    <operation name="Proc2">
    <input message="tns:args_in_msg_sample"/>
    <output message="tns:args_out_msg_sample"/>
    </operation>
    </portType>
    <binding name="Proc1_binding" type="tns:Proc1_ptt">
    <jca:binding />
    <operation name="Proc1">
    <jca:operation
    InteractionSpec="oracle.tip.adapter.db.DBStoredProcedureInteractionSpec"
    SchemaName="SYSTEM"
    ProcedureName="TSCP1"
    >
    </jca:operation>
    <input>
    <jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
    </input>
    </operation>
    <operation name="Proc2">
    <jca:operation
    InteractionSpec="oracle.tip.adapter.db.DBStoredProcedureInteractionSpec"
    SchemaName="SYSTEM"
    ProcedureName="MYSAMPLEPROC"
    >
    </jca:operation>
    <input>
    <jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
    </input>
    <output/>
    </operation>
    </binding>
    <service name="Proc1">
    <port name="Proc1_pt" binding="tns:Proc1_binding">
    <!--Your runtime connection is declared in
    J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml
    These mcf properties here are from your design time connection and
    save you from having to edit that file and restart the application server
    if eis/DB/System25 is missing.
    These mcf properties are safe to remove.-->
    <jca:address location="eis/DB/DBConn25" UIConnectionName="System25"
    />
    </port>
    </service>
    <plt:partnerLinkType name="Proc1_plt" >
    <plt:role name="Proc1_role" >
    <plt:portType name="tns:Proc1_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    Then I copied this wsdl and corresponding xsd to my BPEL process and created a partnerlink for this wsdl.
    I added two invoke activities, one for Proc1 operation and other for Proc2 operation.
    When I tried testing this BPEL process, the BPEL process manager was invoking only Proc1 operation for both invoke activities and giving me error as-
    <Faulthttp://schemas.oracle.com/bpel/extensionhttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>null:bindingFault</faultcode>
    <faultstring>business exception</faultstring>
    <faultactor>cx-fault-actor</faultactor>
    <detail>
    <code>1400</code>
    <summary>file:/D:/Morrisons/OracleProducts/product/Oracle_SOA/bpel/domains/TestPOC/tmp/.bpel_MyAdapterTest_1.0_c564165702d743346cadb68bc5bbb594.tmp/CustomAdapter.wsdl [ Proc1_ptt::Proc1(InputParameters) ] - WSIF JCA Execute of operation 'Proc2' failed due to: Error while trying to prepare and execute an API. An error occurred while preparing and executing the SYSTEM.TSCP1 API. Cause: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."EMPS"."EMPID") ORA-06512: at "SYSTEM.TSCP1", line 4 ORA-06512: at line 1 [Caused by: ORA-01400: cannot insert NULL into ("SYSTEM"."EMPS"."EMPID") ORA-06512: at "SYSTEM.TSCP1", line 4 ORA-06512: at line 1 ] ; nested exception is: ORABPEL-11811 Error while trying to prepare and execute an API. An error occurred while preparing and executing the SYSTEM.TSCP1 API. Cause: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."EMPS"."EMPID") ORA-06512: at "SYSTEM.TSCP1", line 4 ORA-06512: at line 1 [Caused by: ORA-01400: cannot insert NULL into ("SYSTEM"."EMPS"."EMPID") ORA-06512: at "SYSTEM.TSCP1", line 4 ORA-06512: at line 1 ] Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable. </summary>
    <detail> Internal Exception: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."EMPS"."EMPID") ORA-06512: at "SYSTEM.TSCP1", line 4 ORA-06512: at line 1 Error Code: 1400</detail>
    </detail>
    </Fault>
    I want to create only one wsdl for all the strored procedures.

    Can I manually create the wsdl for database adapter, which can have multiple operations for different stored procedures?
    I tried creating a wsdl as -
    <definitions
    name="CustomAdapter"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/CustomAdapter/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/CustomAdapter/"
    xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/xsd/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/db/"
    >
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/" location="DBAdapterOutboundHeader.wsdl"/>
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/xsd/"
    schemaLocation="myadapter.xsd" />
    </schema>
    </types>
    <message name="args_in_msg_tscp1">
    <part name="InputParameters" element="db:InputParametersTSCP1"/>
    </message>
    <message name="args_in_msg_sample">
    <part name="InputParameters" element="db:InputParametersSAMPLE"/>
    </message>
    <message name="args_out_msg_sample">
    <part name="OutputParameters" element="db:OutputParametersSAMPLE"/>
    </message>
    <portType name="Proc1_ptt">
    <operation name="Proc1">
    <input message="tns:args_in_msg_tscp1"/>
    </operation>
    <operation name="Proc2">
    <input message="tns:args_in_msg_sample"/>
    <output message="tns:args_out_msg_sample"/>
    </operation>
    </portType>
    <binding name="Proc1_binding" type="tns:Proc1_ptt">
    <jca:binding />
    <operation name="Proc1">
    <jca:operation
    InteractionSpec="oracle.tip.adapter.db.DBStoredProcedureInteractionSpec"
    SchemaName="SYSTEM"
    ProcedureName="TSCP1"
    >
    </jca:operation>
    <input>
    <jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
    </input>
    </operation>
    <operation name="Proc2">
    <jca:operation
    InteractionSpec="oracle.tip.adapter.db.DBStoredProcedureInteractionSpec"
    SchemaName="SYSTEM"
    ProcedureName="MYSAMPLEPROC"
    >
    </jca:operation>
    <input>
    <jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
    </input>
    <output/>
    </operation>
    </binding>
    <service name="Proc1">
    <port name="Proc1_pt" binding="tns:Proc1_binding">
    <!--Your runtime connection is declared in
    J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml
    These mcf properties here are from your design time connection and
    save you from having to edit that file and restart the application server
    if eis/DB/System25 is missing.
    These mcf properties are safe to remove.-->
    <jca:address location="eis/DB/DBConn25" UIConnectionName="System25"
    />
    </port>
    </service>
    <plt:partnerLinkType name="Proc1_plt" >
    <plt:role name="Proc1_role" >
    <plt:portType name="tns:Proc1_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    Then I copied this wsdl and corresponding xsd to my BPEL process and created a partnerlink for this wsdl.
    I added two invoke activities, one for Proc1 operation and other for Proc2 operation.
    When I tried testing this BPEL process, the BPEL process manager was invoking only Proc1 operation for both invoke activities and giving me error as-
    <Faulthttp://schemas.oracle.com/bpel/extensionhttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>null:bindingFault</faultcode>
    <faultstring>business exception</faultstring>
    <faultactor>cx-fault-actor</faultactor>
    <detail>
    <code>1400</code>
    <summary>file:/D:/Morrisons/OracleProducts/product/Oracle_SOA/bpel/domains/TestPOC/tmp/.bpel_MyAdapterTest_1.0_c564165702d743346cadb68bc5bbb594.tmp/CustomAdapter.wsdl [ Proc1_ptt::Proc1(InputParameters) ] - WSIF JCA Execute of operation 'Proc2' failed due to: Error while trying to prepare and execute an API. An error occurred while preparing and executing the SYSTEM.TSCP1 API. Cause: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."EMPS"."EMPID") ORA-06512: at "SYSTEM.TSCP1", line 4 ORA-06512: at line 1 [Caused by: ORA-01400: cannot insert NULL into ("SYSTEM"."EMPS"."EMPID") ORA-06512: at "SYSTEM.TSCP1", line 4 ORA-06512: at line 1 ] ; nested exception is: ORABPEL-11811 Error while trying to prepare and execute an API. An error occurred while preparing and executing the SYSTEM.TSCP1 API. Cause: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."EMPS"."EMPID") ORA-06512: at "SYSTEM.TSCP1", line 4 ORA-06512: at line 1 [Caused by: ORA-01400: cannot insert NULL into ("SYSTEM"."EMPS"."EMPID") ORA-06512: at "SYSTEM.TSCP1", line 4 ORA-06512: at line 1 ] Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable. </summary>
    <detail> Internal Exception: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."EMPS"."EMPID") ORA-06512: at "SYSTEM.TSCP1", line 4 ORA-06512: at line 1 Error Code: 1400</detail>
    </detail>
    </Fault>
    I want to create only one wsdl for all the strored procedures.

  • Dynamic where clause in database adapter

    Hi
    I have requirement to develop SOA service for search page! The back-end query for search is required to have where clauses to be appended to SELECT statement dynamically depending upon search criteria the user selects!
    E.g. if user is searching employee from a portal! If employee selects mobile number of the employee, or joining date range or other criteria, then accordingly appropriate clauses are to be appended to SEARCH SELECT statement.
    Can we achieve same while implementing executing database query through database adapter from BPEL service?
    Thanks In Advance
    Priyadarshi 

    It is difficult using the standard database adapter approach. You may have to use nested sql queries.Following is a good example of the same.
    Neeraj Sehgal - Experimenting with SOA: Pass multiple parameters, dynamic query in Pure SQL in Database Adapter
    If your only problem in using this that you are hard coding the connection details  , you can use the datasource jndi name in the query. hence you will not be required to change your code when moving from one env to other env. You just have to take care of keeping the jndi name same in all the env.

  • Problem with Merge in database adapter

    Hi Everyone,
    For my Bpel process I have the following:
    1) File adapter
    2) Receive activity
    3) Transforms activity
    4) Invoke activity
    5) Database adapter
    My Bpel process is working fine, no errors. It pick up the file ---&gt; sends it to receive --&gt; then transform the records --&gt; then Invoke sends it to DB adapter to presist the records.
    For the setting of my DB adapter, to preform an operation on my table I chose Insert or update option.
    when running the same process multipul times my records in the table get duplicated. I dont understand why that is happening since I chose insert or update option in the DB adapter ??
    How can I make my DB adapter overwrites the same records in the database if my file adapter picked up the same file that contains the same records ??
    Thanks in Advanced,
    AJ

    Are you talking of a one off exercise, or is this something you want to happen every time a file is received.
    Yes, what I mean if you want this as an on going step in your process then you would need to modify your existing process to add a new DB partnerlink that deletes the records. You could create a stored procedure that does both insert and delete if you only want one DB call though. This would replace your existing Db partner link that does the inserts.
    cheers
    James

Maybe you are looking for

  • I updated Web Mail and now I can't find it, how do I locate it?

    When I opened Firefox I had an update screen which included WebMail Notifier, when I updated and restarted Firefox I am unable to locate WevMail plugin now.

  • Linking library with flash builder project?

    I have a flash builder project going and I have found I need to make various movie clips and sprites in in Flash Pro. Is there a simple way to just link my library from the .fla project to my builder project so I can access the assets made in the .fl

  • Ipod Touch Charge Icons

    There are two different icons telling you the ipod touch is charging (in the top right corner) One thats the electrical bolt symbol. and the other which is a charge connector thing, but it dosen't charge when that's up. What's the difference?

  • Linksys Smart Wi-Fi services Status: Gestopt

    Hi, I have the following message in the status report : Linksys Smart Wi-Fi services     Status:     Gestopt Also, I am not able to logon into the EA6900 with the iPap app. Please advice. Thanks, Arjan 

  • Enabling archivelog  in RAC

    Hello dear friends, I want to enable archivelog mode in oracle 10.2 in RAC environment. who can help me in its steps ?