cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC -->SOAP synchronous using SOAP lookup in java mapping

Former Member
0 Kudos
101

Hi friends,

We have a requirement where we have to pass 5 values from database to webservice( SOAP lookup) and get a response back which is in below format:

<SOAP_Message>

     <test>...</test>

     <row>A="1" B="2" C="3" D="4" E="5"......</row>

     <row>A="11" B="21" C="31" D="41" E="51" F="61"......</row>

     <row>A="12" B="22" C="32" D="42" E="52" F="62" G="72"......</row>

      .....

      .....

</SOAP_Message>

I have three columns in database C, D and E. I have to write the values of those three fields in database.

row tag can occur 100 times.

Please suggest the way.If JAVA mapping then please share the code if possible.

Thanks in advance!!

Regards,

Krishna S.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member184720
Active Contributor
0 Kudos

Hi Shrikrishna -It would be JDBC-JDBC scenario using soap lookup but

Considering your response strcture i prefer a two step mapping approach.

1st mapping : JDBC (request) -> Soap Responce (using soap lookup)

2nd mapping: soap(resp) -> JDBC(target)

In the second mapping, we can create the "access" for each "row" in your responce.

and write a small UDF to get the values of D,E and F from the row and it would be a direct mapping..

Former Member
0 Kudos

If I have understood your requirement correctly, here is how you should approach this :-

1.) Sender JDBC channel to select the fields -> Map them to the Target fields on the receiver side(could be a WSDL)

2.) Receiver SOAP channel to send the fields to the webservice- If the receiver is giving u synch call back then create a response structure with source as the WSDL or any other and receiver JDBC (standard struc) if you are not using Native XML

3.) Receiver JDBC channel to be used to inserting data in database.

Now, there is a catch you have to use the RequestResponse Beanin the sender JDBC channel

============================================================================

Another approach :-

Use soap lookup -

Sender channel for extracting data from database

Receiver lookup channel for SOAP lookup - map the data back to the target

Receiver JDBC channel to insert data in database.

Former Member
0 Kudos

Hello,

If i understood u correctly, u will initiate request using JDBC sender which will make a sync call to WS (using lookup) and the response (which u have shown above) will be mapped to 3 columns of a database table?

If yes, then use below approach to make a call to ur WS

Thanks

Amit Srivastava