SOAP -- XI -- JDBC-Sender

Hi All,
i am doing a synchronous scenario from Webservices to JDBC. I try to get Data from the SQL-Database (SQL-Server). But my problem is, that i have more than one SQL-Statement .
I am writing a program which call the Webservice. The Webservice is defined by XI and represents the Interface for the program to get Data from the SQL-Database. So I need a JDBC-Sender. This Sender allows only one SQL-Statement.
What I want is, that my program get different Data from Database by (for example) using different methods of the Webservice. Or have I to define Webservices just as many as SQL-Statements ?
Or do I have an error in reasoning?
Thanks for help,
Jens.

Hi Krishna,
thank you for your fast reply.
Yes my scenario gets the data from XI-Webservice. And the XI-Webservice gets the data from the Database then again.
I want to write a program in the .Net runtime environment. This is also a Webservice. This .Net-Webservice communicate with the XI by using the XI-Webservice which represents the interface for getting Data from Database by using JDBC-Adapter. But I don't think that you are right - using Sender XI-Webservice and Reciever-JDBC because the help says:
"You need to configure the sender JDBC adapter to be able to send content from databases to the Integration Server"
This is what I want: Using XI-Webservice in .Net-Webservice as a Webservice-Reference, to call methods (with sending parameters) of the XI-Webservice, which give me the result of the SQL-Statement from the JDBC-Sender.
And at this point, there are more than one SQL-Statement necessary. This was my question: How using one XI-Webservice(-Interface) to call different SQL-Statements.
Sorry, XI is really tricky.
Many thanks in advance,
Jens.

Similar Messages

  • SOAP TO JDBC scenario: calling stored procedure which will return the value

    Hi
    I have Soap To Jdbc scenario in which I am going to call the Stored Procedure at target side which will be executed and it is going to return the result set .
    Result contains following values.
    return code as ( 0 Or 1) and also specific exception message if its return code as 1.
    Could you suggest me the way by which I can handled this return code and send it back to the Sap PI system then the same thing is directed the to SMTP server for sending mail to consern person.
    Regards
    Kumar

    The OUT parameters of stored procedure will be returned as response. Where exactly are you facing the proble? Here is a complete walkthourgh
    /people/luis.melgar/blog/2008/05/13/synchronous-soap-to-jdbc--end-to-end-walkthrough
    In your case, you don't want response at sender. Instead you want to mail it. For this you may use BPM to design your scenario with following steps
    Receive (to receive data from sender)
    Send Sync (to stored procedure and get response)
    Send Async (to mail receiver)
    Regards,
    Prateek

  • JDBC Sender Adapter - No Namespace found

    Hello
    I am currently using PI 7.1. The scenario is JDBC to ECC ABAP Client Proxy. When the JDBC Sender Adapter sends the data to the Integration Server, the root element does not contain the xmlns attribute. This root element is constructed from the Document Name of the JDBC Sender Adapter attribute.
    I am getting the following error:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_HIS_Material_Consumption_</SAP:P1>
      <SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti</SAP:P2>
      <SAP:P3>on: Cannot create target element /ns0:MT_Material_</SAP:P3>
      <SAP:P4>Consumption_ECC/Material. Values missing in queue~</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_HIS_Material_Consumption_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_Material_Consumption_ECC/Material. Values missing in queue~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    When I perform a test at RWB, the message gets posted successfully. Once posted, the payload of this message contains the xmlns attribute.
    Here is the root element from both the instances:
    From RWB:  <ns0:MT_Material_Consumption_JDBC xmlns:ns0="http://xxx.com/xxx/finance">
    From JDBC Adapter:  <ns0:MT_Material_Consumption_JDBC>
    Could you please let me know, what has to be done to obtain the xmlns in the sender payload?
    Thank you in advance.
    John Jeyaraj
    Edited by: John jeyaraj on Apr 7, 2011 8:22 AM

    Hi Hiren
    When I test the MM without the xmlns attribute, I get the following error:
    The prefix "ns0" for element "ns0:MT_Material_Consumption_JDBC" is not bound.
    When I add the xmlns attribute, the mapping is successful.
    Thanks
    John

  • SOAP to JDBC Synchronous scenario

    Hi experts
    As per my requirement iam going to do SOAP to JDBC.
    Please guide me how to do SOAP to JDBC (synchronous)
    through XI .any step by step docs or blogs related to this
    please forward to
    [email protected]
    if helpful points will be rewarded.
    Regards,
    Naresh

    hi..
    To send SOAP request u have to download the Altova XML spy tool..
    follow this link for SOAP adapter.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873a22024f79
    for JDBC receiver adapter follow
    /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
    regards
    MAnas
    reward if helpful..

  • HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7

    All -
    I'm new to consuming web services in JDeveloper. I'm using Oracle JDEV 10.1.3.3/OC4J.  I'm using this version since it is compatible with Oracle EBS 12.1.3.  My intent is to pull data from our third party recruitment app (Success Factors) and load that data into Oracle HRIS.  I'm already doing this through a .NET application.  I'm converting it to be a Java Concurrent Program in EBS.  The code listed below is a stub call to verify I'm on the right track. I created a JDeveloper Web Services proxy project.  I'm testing it locally on my windows desktop.  When I'm able to consume the service successfully, then I'll think about moving it to the EBS server.
    I'm getting the following error when I invoke the following service:
    HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
    End point is: https://api4.successfactors.com/sfapi/v1/soap?wsdl
    Any help/assistance would be much appreciated. 
    Below is my code and output of my test:
    package emsc.oracle.apps.emscper.sfapi.proxy;
    import HTTPClient.HTTPConnection;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.IsValidSession;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.IsValidSessionResponse;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Login;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LoginResponse;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LoginResult;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Logout;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.LogoutResponse;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.SFCredential;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.SFParameter;
    import emsc.oracle.apps.emscper.sfapi.proxy.types.sfobject_sfapi_successfactors_com.Error;
    import java.io.File;
    import javax.xml.rpc.ServiceFactory;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Date;
    import javax.xml.ws.BindingProvider;
    import javax.xml.soap.SOAPException;
    import java.util.Map;
    import oracle.security.ssl.OracleSSLCredential;
    public class SFAPITest {
        // Declare members:      
        private String companyId;
        private String userName;
        private String password;
        private String developerKey;
        private Date   effDt;
        private String greaterThanEffDt;
        private String lessThanEffDt;
        // Declare constants:      
        final static private String breakLine = "+---------------------------------------------------------------------------+";
        final static private String format    = "yyyy-mm-dd";      
        private enum ReqId {
            PrimaryReq(25),
            PrimaryReqCEO(26),
            EmCarePrimary(27),
            RTI(28),
            EmCareClinical(29);
            private int reqId; 
            private ReqId() {
            private ReqId(int value) {
                reqId = value;
            public int getReqId() {
                return reqId;
        // Getters and Setters:  
        protected String getCompanyId() {
           return this.companyId;
        protected void setCompanyId(String value) {
           this.companyId = value;                 
        protected String getUserName() {
           return this.userName;
        protected void setUserName(String value) {
           this.userName = value;                 
        protected String getPassword() {
           return this.password;
        protected void setPassword(String value) {
           this.password = value;                 
        protected String getDeveloperKey() {
           return this.developerKey;
        protected void setDeveloperKey(String value) {
           this.developerKey = value;                 
        protected Date getEffDt() {
            return this.effDt;
        protected void setEffDt(Date value) {
            this.effDt = value;                 
        protected String getGreaterThanEffDt() {
           return this.greaterThanEffDt;
        protected void setGreaterThanEffDt(String value) {
           this.greaterThanEffDt = value;                 
        protected String getLessThanEffDt() {
           return this.lessThanEffDt;
        protected void setLessThanEffDt(String value) {
           this.lessThanEffDt = value;                 
        public void runProgram()
            SFAPIService mySFAPIService;
            String CompletionText = "";
            String effDtStr2 = null;
        /* Code your program logic here.
        * Use getJDBCConnection method to get the connection object for any
        * JDBC operations.
        * Use CpContext provided commit,rollback methods to commit/rollback
        * data base transactions.
        * Don't forget to release the connection before returning from this
        * method.
        /* Call setCompletion method to set the request completion status and
        * completion text.
        * Status values are ReqCompletion.NORMAL,ReqCompletion.WARNING,
        * ReqCompletion.ERROR.
        * Use Completion text message of length 240 characters. If it is more
        * than 240 then full string will appear in log file and truncated 240
        * characters will be used as request completion text.
        try
            ServiceFactory factory = ServiceFactory.newInstance();
            mySFAPIService = (emsc.oracle.apps.emscper.sfapi.proxy.SFAPIService)factory.loadService(emsc.oracle.apps.emscper.sfapi.proxy.SFAPIService.class);      
            SFAPI api = mySFAPIService.getSFAPI();
           /// SFAPI api = new SFAPI();
            //Map<String, Object> requestContext = ((BindingProvider) api).getRequestContext();
            //requestContext.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
            System.out.println("ServiceName => " + mySFAPIService.getServiceName().toString());
            System.out.println("End Point   => " + mySFAPIService.getServiceName().toString());
            System.out.println(breakLine);
            // Authentication: Login to SFAPI:
            SFCredential credential = new SFCredential();
            // Fake credentials being passed in for this post:   
            credential.setCompanyId("XXX");
            credential.setUsername("XXX");
            credential.setPassword("XXX");
            credential.setDeveloperKey("XXX");
            HTTPConnection httpsConnection = null;       
            OracleSSLCredential _credential = new OracleSSLCredential();      
            _credential.setWallet("\\\\\\C:\\Program Files\\Java\\jdk1.6.0_33\\jre\\lib\\security", "ParkEstes3");
            /*System.setProperty("javax.net.ssl.trustStore","C:\\\\\OraHome_1\\jdev\\jdevbin\\jdk\\jre\\lib\\security\\keystore");
            System.setProperty("javax.net.ssl.trustStorePassword","changeit");  
            System.out.println(System.getProperty("javax.net.ssl.trustStore"));*/
            // SFParameter: Define a generic SFParameter List.  This is a necessary parameter
            // to invoking calls in SFAPI:      
             /*System.setProperty("javax.net.ssl.keyStore",
             "file:\\\C:\\jdk1.4.1\\jre\\lib\\security\\client.keystore");
             System.setProperty("javax.net.ssl.keyStorePassword","welcome");         */
            /*  System.setProperty("oracle.net.wallet_location",
                          "(SOURCE=(METHOD=file)(METHOD_DATA=(DIRECTORY=\\\C:\Users\dparrish\Oracle\WALLETS)))");  // (2)                     */
            File kstore = new File("C:\\OraHome_1\\jdev\\jdevbin\\jdk\\jre\\lib\\security\\jssecacerts");
            boolean exists = kstore.exists();
            if (!exists) {
                System.out.println("Keystore does not exist");
            else {
                System.out.println("Keystore does exist");
            System.setProperty("javax.net.ssl.trustStore", kstore.getAbsolutePath());
            System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
            //System.setProperty("proxySet", "false");
            //System.setProperty("http.proxyHost", "127.0.0.1");
            //System.setProperty("http.proxyPort", "8080");
            System.out.println(kstore.getAbsolutePath());
            List<SFParameter> lst = new ArrayList<SFParameter>();
            SFParameter param = new SFParameter();
            param.setName("");
            param.setValue("");
            lst.add(param);      
            SFParameter[] sfParam = lst.toArray(new SFParameter[lst.size()]);
            Login login = new Login();
            try {
                login.setCredential(credential);
                System.out.println("1");
                login.setParam(sfParam);
                System.out.println("2");
                LoginResponse loginResponse = new  LoginResponse();
                LoginResult loginResult = new LoginResult();
                try {
                     loginResponse = api.login(login);               
                catch (Exception e ) {
                    System.out.println(e.getMessage());
                System.out.println("3");
                try {               
                     loginResult = loginResponse.getResult();
                catch (Exception e ) {
                    System.out.println(e.getMessage());
                System.out.println("4");
                IsValidSession vs = new IsValidSession();                  
                IsValidSessionResponse isValidSessionResponse = api.isValidSession(vs);
                System.out.println("5");
                if (isValidSessionResponse.isResult()) {
                     System.out.println("Session is valid");
                     System.out.println("Result => " + loginResult.getSessionId());
                     System.out.println(breakLine);              
                    Logout logout = new Logout();
                    LogoutResponse logoutResponse = api.logout(logout);
                    if (logoutResponse.isResult()) {
                         System.out.println("Logout of SFAPI Successful");
                    else {
                        System.out.println("Logout of SFAPI Unsuccessful");
                else {
                     System.out.println("Session is invalid");
                    List<Error> errors = new ArrayList<Error>();
                    for (int i = 0; i < loginResult.getError().length;  i++) {
                        errors.add(loginResult.getError()[i]);
                    for (int i = 0; i < errors.size(); i++) {
                         System.out.println("Error Indice   => " + i);
                         System.out.println("Error Code:    => " + errors.get(i).getErrorCode());
                         System.out.println("Error Message: => " + errors.get(i).getErrorMessage());
                         System.out.println(breakLine);                                                          
                    } // end for loop of SFObject errors
                } // end InvalidSession
            catch (Exception e)
                 System.out.println("Session Credential Exception");
                 System.out.println("Exception => " + e.getMessage());
                 System.out.println(breakLine);                   
        catch (Exception e)
            System.out.println("Parameter List Exception");
            System.out.println("Exception => " + e.getMessage());
            System.out.println(breakLine);
        }   // end runProgram
        // Constructor:
        public SFAPITest()  {
        } // end constructor
        public static void main (String args[]) {
            try
                SFAPITest test = new SFAPITest();        
                test.runProgram();
            catch (Exception e) {
                System.out.println("main exception => " + e.getMessage());
    } // SFAPITest
    Here is the output with trace:
    WARNING: Unable to connect to URL: https://api4.successfactors.com:443/sfapi/v1/soap due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
    Session Credential Exception
    Exception => ; nested exception is:
        HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: String index out of range: -7
    +---------------------------------------------------------------------------+
    Process exited with exit code 0.

    The other end is throwing back a programming error.
    That might be because you are sending incorrect data and the other end fails to validate it.
    You might be able to guess based on your C# code.  But, since you are using soap one generic solution is available to you.
    - Get an http proxy interceptor like wireshark.
    - Run it while your C# app runs, collect the http requests from that.
    - Run it while running your java code, collect the http requests from that.
    Compare the two.

  • BPM Question: JDBC Sender to RFC to JDBC Receiver

    I have the following requirement:
    JDBC Sender Adapter (by nature Asynchronous) – SELECT multiple rows from a table
    To…
    RFC Receiver Adapter (Synchronous)
    To…
    JDBC Receiver Adapter (Synchronous) – UPDATE multiple rows in a table
    Then…
    IF <SAP:Error> XML is returned from the JDBC Receiver Adapter, I want to either issue a CCMS alert, or utilize the XI Email Adapter for error notification. 
    ELSE, if <root_response> XML is returned from the JDBC Receiver Adapter, do nothing.
    This obviously requires a BPM.  If I use the JDBC Receiver Adapter Asynchronously (with no error handling) this is a piece of cake.  But after trying to use it synchronously along with error handling logic, I am stuck.
    This issue that I am facing is how to logically handle the JDBC Receiver Adapter Response XML in the BPM.  I would like to know what I need to do in the BPM in order to issue a CCMS alert (and/or send a message through the XI Email Adapter) ONLY if the <SAP:Error> XML is returned. 
    Below are examples of the 2 types of response messages that I would receive back from the JDBC Receiver:
    Error:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
      <!--  Call Adapter -->
      <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAP_OrderImport' (structure 'StatementName2'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Violation of PRIMARY KEY constraint 'PK_SAP_OrderImport'. Cannot insert duplicate key in object 'SAP_OrderImport'.</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Success:
      <?xml version="1.0" encoding="utf-8" ?>
      <root_response>
      <StatementName1_response>
      <update_count>1</update_count>
      </StatementName1_response>
      </root_response>
    I have searched SDN for a while but did not find anything that specifically addressed this.  I would appreciate any help…

    Hi,
    In ur BPM wrap the jdbc send step with a exception block. in the exception block define a control step to throw an alert.
    so when the jdbc step fails, the exception is caught and an alert is generated by the control step.
    cheers,
    naveen

  • Jdbc sender adapter in synchronous mode

    Dear Experts,
          I am on PI 7.0 SP 14. I would like to know whether it is possible to use jdbc sender adapter in
    synchrounous mode. The scenario is jdbc to web service . The response from webservice should be inserted into the database.  If we use the insert statement in the response mapping will it work ? 
    Thanks
    Aju

    Hi
    JDBC sync is possible but only at Receiver, look this blog
    SYNCHRONOUS SOAP TO JDBC - END TO END WALKTHROUGH
    JDBC Stored Procedures
    JDBC Receiver Adapter -- Synchronous Select – Step by Step

  • How to cofigure the JDBC Sender adaptor

    how to cofigure the JDBC Sender adaptor,
    i want to do the scenario JDBC>XI>SAP
    Thanks & Regards,
    priya reddy

    HI
    Database (JDBC) Adapter
    The JDBC Adapter allows access to any DB that allows a JDBC driver to access the DB. This driver is not supplied with the adapter but must come from the DB provider or a 3rd party. The adapter converts database content to XML and vice versa.
    Database content can be read with any SQL statement using a special XML format. This format enables SQL INSERT, UPDATE, SELECT, DELETE or even stored procedures. A message is always processed in one database transaction.
    Refer the following links for further assistance
    JDBC ADAPTER:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/frameset.htm
    Use thes step by step guidese
    https://wiki.sdn.sap.com/wiki/display/XI/JDBCTOJDBC
    https://wiki.sdn.sap.com/wiki/display/XI/XMLFile2XMLFile
    tutorial /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
    http://help.sap.com/saphelp_nw2004s/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/frameset.htm for sender side JDBC configuration.
    Follow this link
    /people/luis.melgar/blog/2008/05/13/synchronous-soap-to-jdbc--end-to-end-walkthrough
    cheers
    reward points if found useful

  • SOAP scenario without sender SOAP channel

    Hi Experts,
    I am developing a scenario of SOAP to JDBC.
    Here my test data is coming from Altova Spy for sender SOAP side.
    I have configured the scenario without sender SOAP channel, and sender agreement.
    But while sending the SOAP message I am getting the error as data cannot be posted.
    Can anybody please tell me, whether is it possible to have such configuration without SOAP sender channel.
    And if yes, then what would be the URL that I have to give for posting the data.
    Awaiting your reply.
    Regards,
    Supriya Sawant.

    I have gone throgh this Note.
    But now I m getting this error:
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
         <SOAP:Header>
    </SOAP:Header>
         <SOAP:Body>
              <SOAP:Fault xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
                   <faultcode>SOAP:Client</faultcode>
                   <faultstring>Error during parsing of SOAP header</faultstring>
                   <faultactor>http://sap.com/xi/XI/Message/30</faultactor>
                   <detail>
                        <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
                             <SAP:Category>XIProtocol</SAP:Category>
                             <SAP:Code area="PARSER">ITEM_MISSING</SAP:Code>
                             <SAP:P1>Header</SAP:P1>
                             <SAP:P2/>
                             <SAP:P3/>
                             <SAP:P4/>
                             <SAP:AdditionalText/>
                             <SAP:ApplicationFaultMessage namespace=""/>
                             <SAP:Stack>XML element Header missing in SOAP message header (SAP XI Extension)
    </SAP:Stack>
                        </SAP:Error>
                   </detail>
              </SOAP:Fault>
         </SOAP:Body>
    </SOAP:Envelope>

  • Reg:JDBC sender

    using JDBC sender adapter can we update the database of the receiver system ? If so pls provide me the blogs with suitable explanation
    anil

    Hi Anil,
    We can do this absolutely by JDBC sender adapter
    In the sender side choose JDBC adapter and give the select query in that corresponding field and write update statement in the corresponding update field.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/frameset.htm for sender side JDBC configuration.
    Follow this link
    SYNCHRONOUS SOAP TO JDBC - END TO END WALKTHROUGH
    At the receiver side you may use the IDoc/BAPI/RFC to connect the SAP
    Configuring the Sender JDBC Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/content.htm
    these links ll help u
    JDBC source in a Synchronous BAPI call.
    Re: Can I configure JDBC Sender to process the RFC response message?
    Re: JDBC Sender Synchronously?

  • How to update two tables in a single call using JDBC Sender adapter

    Hello All,
    The scenario is, database entries have to be selected from two tables and at the same time those tables have to be udpated with the flag.
    We are using JDBC sender adapter and in Select Query, we are fetching the data by joinin the two tables.
    Update Statemtent: We can only update one table using this statement.
    Is it possible to update two tables using the Update Statement without using Stored Procedures.
    Let me know.
    Regards,
    Sreenivas.

    Hi Sreenivas,
    > Is it possible to update two tables using the Update Statement without using Stored Procedures.
    Yes its possible through join statement
    Check this links
    Update in JDBC Sender adapter for more than one table
    data from 2 tables for jdbc sender adapter
    Regards
    Ramesh

  • JDBC Sender Adapter - Records sent one at a time

    Hello everyone,
    Here's a summary of my scenario JDBC > XI > RFC.
    My select statement (JDBC) looks like this:
    SELECT * FROM BATCH WHERE STATUS='Y'
    The problem is, whenever it returns multiple rows, the RFC can only accept one record at a time (1...1), so I need to pick up the records from the DB and send them one at a time.
    Currently, this is how the output XML looks like:
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <row>
      <number>200000000472</number>
      <status>Y</status>
      </row>
      <row>
      <number>200000000473</number>
      <status>Y</status>
      </row>
      <row>
      <number>200000000474</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    Instead, I need each row to be picked up and sent one at a time.
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <row>
      <number>200000000472</number>
      <status>Y</status>
    </ns:SQL_RESP_MT>
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <number>200000000473</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    <?xml version="1.0" encoding="utf-8" ?>
      <ns:SQL_RESP_MT xmlns:ns="http://www.pharmaindustries.com">
      <number>200000000474</number>
      <status>Y</status>
      </row>
    </ns:SQL_RESP_MT>
    Does anyone know the changes I need to make in my current SELECT statement or the JDBC Sender Adapter to make this possible.
    Thanks in advance!
    Glenn

    Thank you all for your replies. I'll check out your link in a bit, Phani. Thanks!
    A SpliByValue won't work since the BAPI Header is (1...1).
    Luckily, during testing, I found out that the BAPI (BAPI_PRODORDCONF_CREATE_TT) handles multiple lines in one of the subelements of the header so that was where I mapped the Rows.
    I might need to trigger multiple BAPIs in the future, so I'll take a good look at your suggestions, but for now, I'm marking this question answered.
    Warm regards,
    Glenn

  • Error while testing Soap to JDBC

    Hi All,
    While testing Soap to jdbc i got this error:
    <?xml version='1.0'?>
    <!-- see the documentation -->
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
      <SOAP:Body>
        <SOAP:Fault>
          <faultcode>SOAP:Server</faultcode>
          <faultstring>Server Error</faultstring>
          <detail>
            <s:SystemError xmlns:s='http://sap.com/xi/WebService/xi2.0'>
              <context>XIAdapter</context>
              <code>ADAPTER.JAVA_EXCEPTION</code>
              <text><![CDATA[
    java.lang.NullPointerException; nested exception caused by:
    java.lang.NullPointerException; nested exception caused by:
    org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:689)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:750)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:664)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:845)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:176)
         at com.sap.aii.af.sdk.xi.util.StreamXMLScannerImpl$EventProducer.run(StreamXMLScannerImpl.java:599)
              ]]></text>
            </s:SystemError>
          </detail>
        </SOAP:Fault>
      </SOAP:Body>
    </SOAP:Envelope>
    Regards,
    Nutan

    Below threads will help u
    Re: Error: ADAPTER.JAVA_EXCEPTION - EXCEPTION_DURING_EXECUTE
    Re: 401 unauthorized error in webservice scenario
    Regards,
    Jayasimha Jangam

  • Error while executing the SOAP-XI-JDBC(syn) scenario

    Dear Forum,
    We have done SOAP-XI-JDBC(synch) scenario with out BPM.
    When we sent the request data from EP to Oracle database through XI, we got an error,Runtime in Message-Mapping transformation~.
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Runtime in Message-Mapping transformation: Cannot produce target element /ns:Customer/customers. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:291)
    Exception message says that it is a mapping issue. But we got the responce data from database along with this message.In message monitoring we got the message processed successfully.
    Now i am not able to understanding why it throughs an error Runtime in Message-Mapping transformatio~ first time ?
    Pls revert me to fulfill this task successfully.
    Points will be rewarded.
    Regards,
    Naresh

    Dear Friends,
    Sorry for the delay,and Thank you for your quick responce.
    Yes I got that message under trace option in SXMB_MONI,
    Pls find the following msg structures and if any error please let me know status...
    Soap request structure:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://soap2dbns" targetNamespace="http://soap2dbns">
    <xsd:element name="soap_reqmt" type="soap_reqdt" />
    <xsd:complexType name="soap_reqdt">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    5b474a34c8a511dc8d8e001a4bf038d4
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="Request" maxOccurs="unbounded">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    49b1ae20c81211dcce03001b78afb958
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ORDERID" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    49b1ae21c81211dcc20d001b78afb958
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="Operation" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    49b1ae22c81211dc858a001b78afb958
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Data base request structure:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://soap2dbns" targetNamespace="http://soap2dbns">
    <xsd:element name="db_reqmt" type="db_reqdt" />
    <xsd:complexType name="db_reqdt">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    5b4e7620c8a511dcc4fe001a4bf038d4
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="STATEMENTNAME" maxOccurs="unbounded">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fa204eb0bceb11dcbb54001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="FETCHDATA">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fa204eb1bceb11dc9750001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="TABLE" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fa204eb3bceb11dccc94001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="access">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fa204eb4bceb11dc9b35001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ORDERID" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fa204eb5bceb11dca20a001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="ITEM" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    d0279840c81011dc8e4e001b78afb958
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="QUANTITY" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    d0279841c81011dcb8f4001b78afb958
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="PRICE" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    d0279842c81011dc832f001b78afb958
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="key">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    89f43170c81611dcc8fa001b78afb958
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ORDERID">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    89f43171c81611dcb6e3001b78afb958
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:simpleContent>
    <xsd:extension base="xsd:string">
    <xsd:attribute name="compareOperation" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    89f43172c81611dccba5001b78afb958
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:attribute>
    </xsd:extension>
    </xsd:simpleContent>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="action" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    fa204eb2bceb11dca298001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:attribute>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Soap Responce Structure:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://soap2dbns" targetNamespace="http://soap2dbns">
    <xsd:element name="soap_resmt" type="soap_resdt" />
    <xsd:complexType name="soap_resdt">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    8d49d494c8a411dc81f5001a4bf038d4
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="response" minOccurs="0" maxOccurs="unbounded">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    491ccd30bd0611dcb29d001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="row" minOccurs="0" maxOccurs="unbounded">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    491ccd31bd0611dca3d7001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ORDERID" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    491ccd32bd0611dcc7d1001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="ITEM" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    491ccd33bd0611dca6ad001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="QUANTITY" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    491ccd34bd0611dc95a8001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="PRICE" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    491ccd35bd0611dcc034001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Database responce Structure:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://soap2dbns" targetNamespace="http://soap2dbns">
    <xsd:element name="db_resmt" type="db_resdt" />
    <xsd:complexType name="db_resdt">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    8d3b7cb1c8a411dcb1d6001a4bf038d4
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="STATEMENTNAME_response" maxOccurs="unbounded">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    adca3410bcfd11dcaf4c001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="row" minOccurs="0" maxOccurs="unbounded">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    adca3411bcfd11dc92d6001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="ORDERID" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    adca3412bcfd11dc92e8001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="ITEM" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    adca3413bcfd11dc9f7a001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="QUANTITY" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    adca3414bcfd11dcc6c4001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="PRICE" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    adca3415bcfd11dca54c001b78b0798a
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Regards,
    Naresh

  • Avoid JDBC sender error: Execute statement did not return a result set

    Hi!
    My JDBC sender adapter towards MS SQL server works fine, with an Execute statement calling a stored procedure that returns the source data needed. The stored procedure itself updates the status of database table records, so that only the unread records are returned each time the stored procedure is called.
    However, the communication channel monitoring sets a red flag for the JDBC sender adapter, when there are no values to fetch from the database table (using the stored procedure). Message says: "Database-level error reported by JDBC driver while executing statement 'EXECUTE FetchMessage 1, 9000'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor."
    This is not an error situation, as I do not expect there to be any values to fetch from the database at all times.
    I do not see how to change the stored procedure to avoid this error.
    Is there a parameter to be set on the JDBC adapter that I can use, so the red flag is avoided?
    Thanks for any input!
    Regards,
    Oeystein Emhjellen

    Hi Oeystein Emhjellen.
    The problem is Store Procedure that has to generate always a ResultSet (or cursor). If it doesn't have a output, you have to generate an Empty ResultSet.
    Like a SELECT Statement:
    If there are data, SELECT get an output result but if it get nothing the SELECT Statement get a empty ResultSet.
    Ask to your database team.
    I hope it helps you.
    Bruno.

Maybe you are looking for

  • Why won't itunes 10.5 install on windows 7 64-bit still?

    I've tried every solutions and it still didn't help. I recently got an ipod touch and my old version of itunes said that in order for my touch to work i need to install itunes 10.5.

  • SQL server query without indicating server name

    I am writing a query  in SSIS and  utilize servername everytime  but it drags every time I am authorized to  work in Development area and can indicate deve  server But   Senior  officer ask me  not to use Server name  and when  package goes to  produ

  • Getting exit code 7 when trying to install elements 11

    Hi im just wondering why im getting this error when trying to install on my mac book? Exit Code: 7 -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 22 error(s), 2 warning(s) ----------- Payload

  • IPhoto Crashing when trying to clean up duplicates?

    I have identified some 5,000 plus duplicates and am trying to move them to the trash, but each time that I do my system goes into loops and crashes. I don't know how to get this cleaned up so that I can move onto splitting up my library. I have tried

  • Importing problem-iCal won't recognize .csv files

    I've recently upgraded to 10.4.9 from 10.3.9 on my Power PC iMac G5. The old version of iCal had no problem seeing downloaded .csv files and importing them. The new version won't see them or import them. Under 10.3.9, all I had to do was double click