How to receive output of Stored Procedure in OSB as Sync Reply

Dear OSB Experts-
I need help for the following scenario as part of our requirements:
1. We have a OSB proxy Service which receives Input Msg from a JMS Queue, does validation and transformation of the message and publishes the transformed msg to a business service.
2. The Business Service uses the DB Adapter framework to call a Stored Proc.
Our requirement is to send the output of the stored procedure back to the OSB Service in a Sync Reply and subsequently the OSB service will do further processing.
Also in case of exceptions in stored procedure we need to catch it and send back the exact SQL Exception Msg to OSB.
However we are not able to figure out how do we capture and send the output of the stored procedure back to OSB.
Can someone please provide pointers on the same.
Thanks in advance for your inputs.
Regards,
Dibya

Hi Dibya,
Please refer -
Invoking Stored Procedure from OSB 10gR3
Above thread has discussed that how to call stored procedure from OSB. Do a service callout and in response variable you would receive the response from OSB. In stage error handler capture the error and do the required processing.
Regards,
Anuj

Similar Messages

  • How to select from a stored procedure?

    Lets say I have a simple stored procedures
    Create Procedure stp_test
    As
    Begin
     Select * from tbl1
    End
    Go
    I would like to be able to do this in SSMS (actually, I want to do this from ADODB)
    Select top 10 * from ...stp_test... Order By rowID
    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    Rich P

    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    If you want to use the OPENQUERY method , use the following.. follow this link...
    http://stackoverflow.com/questions/209383/select-columns-from-result-set-of-stored-procedure
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • How to limit the response rows while invoking a stored procedure from OSB 10gR3

    Dear Experts,
    I am trying to limit the response while invoking a stored procedure from OSB via DB adapter.
    Here the stored procedure returns cursors as response. I tried using the MaxTransactionSize propertiy (which is used for polling the database option in DB adapter).
    We are investigating the ways to protect the application from response containing huge number of rows.
    Is there any way to restrict the number of rows returned in each and every cursor while invoking the stored procedure via DB adapter?
    Thanks
    Ram

    Hi James ,
    I want to know how to run stored procedure using jca adapter in OSB11g.
    I am new to stored prcoedure,will be great if you could share some example on it as above.
    Req: Single input xml will be posted on queue ,need to perform 3 DB operation (with same input):
    1.Insert operation to insert master table contents.
    2.select the primary key column value from master table for the last inserted record.
    3.Need to insert primary key column value + other fields frm same xml file to child table.
    Pls assist me on how to create a simple stored procedure and to run the same with OSB 11g.I am familiar with creation of DB adapter using Jdeveloper,we have option to perform insert and to call stored procedure here,will it be useful for this scenario?
    Edited by: Anitha R on Nov 21, 2010 9:30 PM

  • How to call pl/sql stored procedure in JDBC query dialogbox

    Hi,
    how to call pl/sql stored procedure in JDBC query dialogbox(reports 9i) .
    Cheers,
    Raghu

    please refer : Re: problem If you have more doubts, please ask in that question.

  • JDBC Receiver to ORACLE Stored Procedure

    Hi Experts
    I browed the forum and could not find a strait answer to my problem. Hence I am posting this thread.
    I have a sync call using JDBC Receiver to ORACLE stored procedure.
    The definition of the procedure is as follows:
    CREATE OR REPLACE procedure TW.XI_TEST
        (p_edi_extract_id varchar2, p_res out edi_extract%rowtype) is
    t edi_extract%rowtype;
    begin
      select *
      into p_res
      from edi_extract e
      where e.edi_extract_id = to_number(p_edi_extract_id);
    exception
       when no_data_found then
            p_res := t;
    end XI_TEST;
    The request XML is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:MT_EDIExtractSelectionRequest xmlns:ns0="urn:zim.com:tests">
    <STATEMENT>
    <PROC_NAME ACTION="EXECUTE">
      <TABLE>TW.XI_TEST</TABLE>
      <EDI_EXTRACT_ID isInput="true" type="STRING">4223142</EDI_EXTRACT_ID>
      </PROC_NAME>
      </STATEMENT>
      </ns0:MT_EDIExtractSelectionRequest>
    The error I am getting is as follows:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException:
    Error processing request in sax parser:
    Error when executing statement for table/stored proc. 'TW.XI_TEST' (structure 'STATEMENT'):
    java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306:
    wrong number or types of arguments in call to 'XI_TEST' ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Any help would be appreciated.
    Regards
    Effi.

    >
    Rajesh wrote:
    > > Hi Rajesh
    > >
    > > The structure of my data type for the request query is as follows:
    > >
    > >
    DT_EDIExtractSelectionRequest (Complex Type)
    > >    STATEMENT (Element)
    > >       PROC_NAME (Element)
    > >          ACTION (Attribute) _mapped to_: EXECUTE
    > >          TABLE (Element) _mapped to_: TW.XI_TEST
    > >          EDI_EXTRACT_ID (Element) _mapped to_: 123456
    > >             isInput (Attribute) _mapped to_: true
    > >             type (Attribute) _mapped to_: STRING
    > >          EDI_EXTRACT (Element)
    > >             isOutput (Attribute) _mapped to_: true
    > >             type (Attribute) _mapped to_: CURSOR
    > >
    > >
    >
    >
    > Change the DT type to like below
    >
    >            STATEMENT (Element)
    >                   ACTION (Attribute) _mapped to_: EXECUTE
    >                   TABLE (Element) _mapped to_: TW.XI_TEST
    >                   EDI_EXTRACT_ID (Element) _mapped to_: 123456
    >                        isInput (Attribute) _mapped to_: true
    >                        type (Attribute) _mapped to_: STRING
    >                   EDI_ETRACT (Element)
    >                      isOutput (Attribute) _mapped to_: true
    >                     type (Attribute) _mapped to_: CURSOR

    > and try ...actually i dont remeber the exact strucuture..but i tolo faced the same pain of this
    >
    > HTH
    > Rajesh
    Hi Rajesh
    Changing the DT per your suggestion result in the following error:
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser:
    No 'action' attribute found in XML document
    (attribute "action" missing or wrong XML structure)</SAP:AdditionalText>
    Omitting the PROC_NAME element from the DT is not correct.
    Also, I would also like to clarify that the variables of the DT I am using are:
    EDI_EXTRACT_ID is defined as string
    EDI_EXTRACT is defined as string
    Because the variable p_res is mapped to nothing in the request payload it does not show.
    I read in one of the posts that this is correct and the variable is used due to the fact the isOutput attribute is true.
    Regards,
    Effi.
    Edited by: Effi Olivkovitch on Dec 6, 2009 9:11 AM
    Edited by: Effi Olivkovitch on Dec 6, 2009 9:18 AM

  • How to check performance for Stored procedure or Package.

    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.

    user13483989 wrote:
    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.Oracle has provided set of Tools to monitor the Performance.
    Profilers being one of them; If you wish to understand more on PL/SQL Optimization, please read PL/SQL Optimization and Tuning.
    See example of DBMS_PROFILER.
    See example of PLSQL Hierarchial Profiler

  • How to call PL-SQL/stored procedure in Creator

    Anybody can tell how to call PL-SQL/Stored procedures inside creator...

    Hi!!!
    You can see this topic http://forum.sun.com/jive/thread.jspa?threadID=106046
    There is how to call oracle stored procedures. Also I put a lot of links in these topic doing reference stored procedures. I have one that it tells specially how to call oracle stored procedures from java, is in spanish but you can understand the code.;-)
    http://yoprogramador.vampisol.com/index.php?title=pl_sql_oracle_desde_java&more=1&c=1&tb=1&pb=1
    Byeee

  • How to execute the parametered stored procedure in sql *plus ?

    how to execute the parametered stored procedure in sql *plus ?
    my storedprocedure format
    CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE
    (empDOB out date, empEmpName out varchar2)
    thanks & regards
    mk_mur

    Oh, sorry... making many reading-too-fast mistakes today...
    You can't declare date variables in SQL*Plus (seel help var), but you can cast to varchar2:
    TEST> CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE (empDOB out date, empEmpName out varchar2) IS
      2  d date := sysdate;
      3  e varchar2(10) := 'bob';
      4  begin
      5  empdob := d;
      6  empempname := e;
      7  end;
      8  /
    Procedure created.
    TEST> var d varchar2(30)
    TEST> var n varchar2(30)
    TEST> call  SMS_SELECTMPLOYEE(:d,:n);
    Call completed.
    TEST> print d n
    D
    11/07/06
    N
    bobYoann.

  • How to list dependencies of stored procedure in a package in oracle

    hi gurus,
    can any body help me to solve the below issue?
    how to list dependencies of stored procedure in a package in oracle?
    advanced thanks...

    It sounds like you're going to have trouble because you're trying to track dependencies at a more fine-grained level than Oracle does (at least prior to 11g, which I know does finer-grained dependency tracking for columns, so there may be something that would help you there).
    In Oracle, the entity is the package body. The procedure within the package does not have dependencies and does not depend on anything, it is part of the package body, which does have dependencies. You can see what tables are used by the package body via DBA_DEPENDENCIES. But if you're trying to track the dependencies for a particular procedure in a package, you'd either have to manually examine the code or you'd have to write your own PL/SQL parser.
    Justin

  • How to convert SQL server stored procedures to Oracle 11g

    Hi Experts,
    In SQL server 30 stored procedures are there how to convert all the stored procedure
    from SQL server to Oracle 11g.
    Please help me,
    Thanks.

    ramya_162 wrote:
    In SQL server 30 stored procedures are there how to convert all the stored procedure
    from SQL server to Oracle 11g.
    The single most fundamental concept you need to understand (grok in its fullness) is:
    ORACLE IS NOT SQL-SERVER
    There is very little, to NOTHING, in common between T-SQL (a language extension to SQL) and PL/SQL (integration of SQL with the language Ada, part of ALGOL family of languages that includes Pascal and C++).
    So taking a T-SQL procedure and porting it as is to PL/SQL is plain stupid.
    Why?
    Oracle sucks at trying to be SQL-Server.
    So how do you migrate from SQL-Server to Oracle?
    By taking the REQUIREMENTS that the T-SQL procedures address, and addressing these requirements using Oracle SQL and PL/SQL.

  • How to customize events, execute stored procedures using JSF and ADF BC

    As a java beginner, I started with developing simple web application using JSF and ADF business component through visual and declarative approach. I need to know how to customize events, execute stored procedures, invoke functions on triggering events associated with rich controls. for eg. how to write customized functions on button click or checkbox click events to achieve business requirement and can be modified whenever required.
    Edited by: 792068 on Aug 31, 2010 9:40 PM

    Which business layer is prefered to create interactive data model: 1. ADF business components or 2. Enterprise JavaBeans using Java persistance API (JPA) or 3. Toplink 4. Portlets
    which minimizes writing low level codes and how much OOPS knowledge is required for creating above business layer binding data to viewcontroller layer?

  • Transaction Issue while calling a stored procedure in osb

    HI all ,
    I have created a wrapper  procedure to call "soa.delete_instances (this procedure will delete the instances from SOA_INFRA schema)" oy locall created user schema(ASG).
    If i execute  the wrapper procedure direclt in SqlDeveloper it's working fine cleaning the instances.
    i have called this procedure in OSB by using the DB adaptor JCA file, the wrapper procedure is executing fine, but not deleting instances from the SOA_INFRA schema.
    any help is apriciated.
    Thanks..

    Maaan, there could be so many reasons for that... just some things to check:
    1. How do you know the stored procedure executes fine? If you didn't get a failure response from a call to JCA, that means nothing.
    2. Do you log the procedure step by step? Did it reach its normal completion? How many rows (it believes) it found/deleted?
    3. What user is the stored procedure executed under from OSB (obviously -- user of the datasource)? Does this user have rights to see/delete those records?
    4. Are you executing the proxy in transaction, and if yes, didn't you get an error that rolled back that transaction?
    and so on, and so forth.
    Vlad
    http://vladimirdyuzhev.com

  • Cannot execute a MS SQL Server 2005 Stored procedure via OSB BS

    I created the jca from Jdeveloper using DBAdapter. Then from eclipse I created the wsdl by generating the service. Then I imported all the relevant files in OSB console and created the business service. After executing the business service I get the below error (Pls scroll down).
    I tried many combination s. I tested with a stored procedure which returns only 1 row and 1 column and I hardcoded the column value. I also tried a stored procedure without any input parameters.
    I am sure there is no problem with the deployment of the datasource because I can execute operations to a table for select, update, delete using a business service following the above procedures.
    I created the stored proc following the same steps for select, update, delete. Also one more info is that when I call a stored proc from Oracle XE database it is working fine.
    My JDBC version is 4 . I am using the jar file provided by Microsoft that is sqljdbc4.
    Web Logic Server - 11gR1
    OSB - 11g + coherence + OEPE
    JDeveloper - 11.1.1.3.0
    can someone please help. This is very urgent. I have tried many combination's to get this to work from last 3 days without any luck.
    Help appreciated.
    Regards
    this happens only while executing the stored procedure.
    The invocation resulted in an error: Invoke JCA outbound service failed with application error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/NEHR_OSB/Lab/SvcNumb [ SvcNumb_ptt::SvcNumb(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'SvcNumb' failed due to: Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    ; nested exception is:
    BINDING.JCA-11811
    Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API.
    com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/NEHR_OSB/Lab/SvcNumb [ SvcNumb_ptt::SvcNumb(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'SvcNumb' failed due to: Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    ; nested exception is:
    BINDING.JCA-11811
    Stored procedure invocation error.
    Error while trying to prepare and execute the OSBLogs.dbo.sp_Numb API.
    An error occurred while preparing and executing the OSBLogs.dbo.sp_Numb API. Cause: java.lang.NullPointerException
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API.

    Hi,
    Even I am getting this kind of problem while executing a stored procedure from OSB.
    I have a stored procedure and i have created wsdl and xsd using JDEV. Now when i am creating a .biz with this wsdl and executing it , this is giving following error:
    <JCA_TRANSPORT_RUNTIME_APPLICATION_FAULT xmlns="http://www.bea.com/transport/2007/05/jca">
    oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/DBTest/TryDB [ TryDB_ptt::TryDB(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'TryDB' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the EAIUSER.DIM_Procedure API. Cause: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    [Caused by: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ; nested exception is:
    JCA-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the EAIUSER.DIM_Procedure API. Cause: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    [Caused by: ORA-06550: line 1, column 7:
    PLS-00201: identifier 'EAIUSER.DIM_PROCEDURE' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    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.
    Please help me in solving this..

  • How to call a (catalog) stored procedure directly in a xsodata file with in/output parameters

    I am new to XS but i managed to enable a table through xsodata:
    service namespace "sap.hana.democontent.epm" { 
      "AA465342"."TMP_HENK" as "TMP_HENK"; 
    But now i am looking for code that can call a stored procedure that has 2 input- and 3 output parameters.... who can help me out with this?

    Hi Vivek, thanks for the quick response!
    I already found that blog, but it does not completely answer my question. i am struggling to get my content procedure working. call the R (catalog) stored procedure:
    the code
    /********* Begin Procedure Script ************/
    BEGIN
        call "AA465342"."MO_PP_SENTIMENT"(SP_IN,SP_OUT) with overview;
    END;
    /********* End Procedure Script ************/
    where it goes wrong:
    : Only table variable is allowed in input parameter in a nested call
    I have defined SP_IN and SP_OUT....
    Can someone give me a clue what i have to change?

  • JDBC Receiver Adapter - Call Stored Procedure

    Hi,
    I am using a JDBC receiver adapter to call a stored procedure in oracle.
    My target structure looks like:-
    <STATEMENT>
    <storedProcedureName action="EXECUTE">
    <table>realStoredProcedureName</table>
    <serialDate hasQuot="NO" isInputType="true" type="date">TO_DATE('07-15-2008 08:00:11','MM-DD-YYYY HH24:MI:SS')</serialDate>
    <serialNo isInputType="true" type="NUMERIC">123456</serialNo>
    </storedProcedureName>
    </STATEMENT>
    The storedprocedure takes two input values and has one output value.
    The first parameter of the stored procedure is serialDate and the second input parameter is serialNo.
    I am getting an exception:-
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'storedProcedureName' (structure 'STATEMENT'): java.lang.NumberFormatException: For input string: "TO_DATE('07"</SAP:AdditionalText>
    Any ideas how to fix this issue.
    Thanks.
    Krishnan

    Hi Krishnan,
    <STATEMENT>
    <storedProcedureName action="EXECUTE">
    <table>realStoredProcedureName</table>
    <serialDate hasQuot="NO" isInputType="true" type="date">TO_DATE('07-15-2008 08:00:11','MM-DD-YYYY HH24:MI:SS')</serialDate>
    <serialNo isInputType="true" type="NUMERIC">123456</serialNo>
    </storedProcedureName>
    </STATEMENT>
    The storedprocedure takes two input values and has one output value.
    The first parameter of the stored procedure is serialDate and the second input parameter is serialNo.
    I am getting an exception:-
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'storedProcedureName' (structure 'STATEMENT'): java.lang.NumberFormatException: For input string: "TO_DATE('07"</SAP:AdditionalText>
    In the XML structure you cannot use TO_DATE function . Please pass the DATE in the correct format which the Stored procedure can accept .  Get the out put what you expected from TO_DATE function and use that value in the structure.
    Regards,
    Kishore

Maybe you are looking for

  • I need to locate my external hard drive

    For days I have been trying to find my external hard drive on my new mac!!!! Why is this so hard? I really need documents off of my hard drive by tonight!!!!!!!

  • Looking for a Web Interface for Editing Data in an Oracle 10g Database

    Greetings all! My organization is implementing Oracle 10g Release 2 Enterprise version. We have an employee who will need to edit data in the database which will hold staff phone numbers, email addresses, and other contact information. This employee

  • Interchange between Comma and point in J2I6

    Hi Friends, I am facing a problem in print of excise register (T code J2I6 ). In print preview of both RG23A part II and RG23C part II registers, there is interchange between comma and points i.e for amount fifteen thousand 15.000,00 is displaying in

  • MS word addins not working

    Error message: MS word experienced a serious problem with the pdf create 8 word addin (nuance pdf product addin). if you have seen this message multiple times. you should disable this addin and check to see if an update is available. do you want to d

  • Article on PPro CS4 64 bit performance...

    I thought this was an interesting read and maybe some of you all here will too... Part 1 http://digitalcontentproducer.com/affordablehd/newsletter/cs4_64bit_1208/index.html?imw=Y Part 2 http://digitalcontentproducer.com/workflow/cs4_64bit_1222/index.