on 04-24-2013 6:40 PM
Hi Experts,
I am working out a sync scenario Proxy to JDBC (sync) using stored procedure.
I have configured mapping and able to insert a record in Async mode.
EXECUTE -> @Action
[stored proc name] -> Table
isInput=true
type=CHAR
Now my problem is how to configure for response from jdbc to prxoy(do we need to use isOutput). Please help me on this.
Thanks,
Baskar
Issue resolved. Thanks All.
Created the response request based on output send from stored procedure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>Now my problem is how to configure for response from jdbc to prxoy(do we need to use isOutput)
One important thing to be noted in the jdbc response is your response structure should be named as follows
Example:
request message is < MT_Blahblah>
response message should be <MT_Blahblah_response>
The adapter module is designed to retrieve the response message by looking at this syntax.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Baskar,
I have added response MT as you mentioned, now i am getting response , But also getting below error in MONI.
Message: Error stack from response: Runtime exception occurred during application mapping com/sap/xi/tf/_MM_RECEIVER_SYNC_; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:MT_SENDER_RES. Values missing in queue context. Target XSD re~
Request & response mapping shown below, Please help....
REQUEST MESSAGE TO STORED PROC:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_RECEIVER_REQ xmlns:ns0="http://jdbc">
- <Statement>
- <row action="EXECUTE">
<Table>USP_WEB_GuestBookingInfoInsertion_1</Table>
<nReservationID isInput="true" type="Varchar">784454</nReservationID>
<tGuestSaluation isInput="true" type="Varchar">Mr.</tGuestSaluation>
<tGuestFirstName isInput="true" type="Varchar">Baskar</tGuestFirstName>
<tGuestLastName isInput="true" type="Varchar">R</tGuestLastName>
<tEmail isInput="true" type="Varchar">dummy@dummy.com</tEmail>
<nMobileNumber isInput="true" type="Varchar">91900012345</nMobileNumber>
</row>
</Statement>
</ns0:MT_RECEIVER_REQ>
RESPONSE MESSAGE FROM STORED PROC:
<?xml version="1.0" encoding="utf-8" ?>
- <ns0:MT_RECEIVER_REQ_response xmlns:ns0="http://jdbc">
- <Statement_response>
- <response_1>
<update_count>1</update_count>
</response_1>
- <response_2>
- <row>
<Reference_ID>793884</Reference_ID>
</row>
</response_2>
</Statement_response>
</ns0:MT_RECEIVER_REQ_response>
Thanks,
Baskar
I see the problem. Your error shows that cannot create target element /ns0:MT_SENDER_RES. But your target structure should be ns0:MT_RECEIVER_REQ_response . Your message structure screenshot also shows the same though your structure given above is correct.
Also use this link for your needs
http://scn.sap.com/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
HI Baskar,
The response you will receive from JDBC is the update count. Response structure you have created and the response structure recieved from database are different. You should configure a data type with structure received from database as below:
<?xml version="1.0" encoding="utf-8" ?>
- <ns0:MT_RECEIVER_REQ_response xmlns:ns0="http://jdbc">
- <Statement_response>
- <response_1>
<update_count>1</update_count>
</response_1>
- <response_2>
- <row>
<Reference_ID>793884</Reference_ID>
</row>
</response_2>
</Statement_response>
</ns0:MT_RECEIVER_REQ_response>
Subsequently, you can map this structure to a target structure with a reciever system. After this the failure will go away.
Hope it helps
Ambrish
hi,
yes isOutput is the output of the stored procedure, so you need to use it,
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.