cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC-SOAP synchronous scenario...how to convert soap xmk repsonse to JDBC format

Former Member
0 Kudos

Hi experts

I have a scenario where a sender JDBC adapter is going to all SOAP webservice to create/update/delete user and receive response data that is to be fed in receiver JDBC adapter synchronously.

i have seen this scenario https://blogs.sap.com/2013/12/04/jdbc-to-jdbc-synchronous-scenario-with-rr-beans-and-without-bpm-and...

where a request response bean and response one way bean is used to call the receiver JDBC channel.

but my question is how it will work in SOAP receiver case as it will return response in XML format and JDBC reciver won't be able to receive this data and feed back in tables.

I also SOAP lookup can be done between JDBC-JDBC scenario but that will be monitoring issue for SOAP

any help is appreciated.!

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor

Hi Naina!

Hi Naina!

Please refer to this blog:

https://blogs.sap.com/2014/01/28/generic-pi-async-sync-bridge-configuration-for-any-adapters/

You don't use any modules in JDBC sender channel. In SOAP receiver channel you use RequestResponseBean bean before calling standard

module to change message's delivery semantics to BestEffort (synchronous mode) and after standard module you insert ResponseOneWayBean bean (change delivery semantics to EO) with parameters defining asyncronous sender interface/namespace. And for that asyncronous outbound interface you create the second ICo. Interface uses the web service response message type as Request message type. Thus, you have the second ICo - asynchronous web service response to asynchronous JDBC receiver interface.

Regards, Evgeniy.

Former Member
0 Kudos

for second ico do i need to create a soap sender channel and jdbc reciever channel separatel ?

former_member190293
Active Contributor
0 Kudos

Please read above mentioned document carefully:

Asynchronous outbound response interface of the receiver (#4) –> Asynchronous inbound response interface (#2) :

  1. The sender communication channel must be an asynchronous sender. In this example, it is an asynchronous SOAP sender communication channel.

Yes, you need sender async channel and receiver async channel for second ICo.

Regards, Evgeniy.

Answers (1)

Answers (1)

former_member190293
Active Contributor

Hi Naina!

May be I don't understand your question right, but there is nothing special in this scenario.

You use async-sync bridge, in request mapping you transform JDBC message to SOAP request and in response mapping you transform SOAP response to JDBC message format and send it to receiver JDBC adapter.

Please refer to SAP help:

https://help.sap.com/SAPHELP_nwpi711/helpdata/en/48/465581929734d9e10000000a42189d/frameset.htm

Regards, Evgeniy.

manoj_khavatkopp
Active Contributor

Adding to Eve's answer :

The lookup one which you are referring to monitoring issue. what exactly you mean by monitoring issue ? you can actually see the request and response structure in the monitoring and also if there is any failure you can actually see in the soap lookup channel log. I don't see any other monitoring issue here.

However if you have decide to go with bridge only below is how your flow can be designed :

First flow :

Outbound Sync interface : with JDBC Request and JDBC Response structure.

Inbound sync interface : with SOAP Request and Response structure.

Request mapping in first flow : JDBC Request -->SOAP request.

Response mapping in first flow : SOAP response -->JDBC Response

Second Flow :

Inbound async interface : with JDBC response structure same as in the first flow

You flow should look like below:

JDBC-with_Beans(Sync interface)<--->OM with request and response<----->SOAP(Sync)

JDBC receiver<-----(ASync inbound interface with the response structure similar to first flow JDBC response one)<----Mapping_NA<--------SOAP

Br,

Manoj

former_member190293
Active Contributor

Hi Manoj!

I guess that lookup call doesn't appear in Message monitor and in Communication Channel monitor.

Regards, Evgeniy.

manoj_khavatkopp
Active Contributor

Hello Eve,

I remember it was visible in MONI in dual stack you may check in this Blog

I will test in single stack and update you.

Br,

Manoj

former_member190293
Active Contributor

Hi Manoj!

It would be nice. We can't see any traces of lookups in monitors of our single stack systems.

Regards, Evgeniy.

Former Member
0 Kudos

Hi Evgeniy

thanks for your prompt reply 🙂

My scenario is Async - Sync

jdbc(table A) - soap - soap - jdbc(same table A)

here the questions that i have:

the request response bean will i be using it sender jdbc or receiver jdbs adapter.

also soap xml response...will this be taken care in response mapping itself as i thought the RR BEAN calls the messaging system/reciever directly...that confused me totally.

Please help me with the confusion

Former Member
0 Kudos

what is this second flow for manoj

JDBC receiver<-----(ASync inbound interface with the response structure similar to first flow JDBC response one)<----Mapping_NA<--------SOAP

and whats the Mapping_NA here

manoj_khavatkopp
Active Contributor

Naina,

The Second flow really doesn't matter if you have placed the modules in JDBC sender channel in first flow. all it matter is you need to have receiver JDBC channel and structure should be same as the response mapping of your first flow.

Mapping NA means not applicable you done need any mapping in your second flow as that wont be executed.

Br,

Manoj

former_member190293
Active Contributor

Hi Naina!

As far as I remember, RequestResponseBean does nothing but changes the delivery semantics of message to BestEffort.

Regards, Evgeniy.

manoj_khavatkopp
Active Contributor

Hi Eve,

Yes you were right the lookup data was not visible for channel monitoring , but however managed to get before and after lookup payload of lookup-channel using MessageLoggerBean.

This is visible in channel monitoring now not in message monitoring. if this is all Naina needed then there is no need to go for bridge . A simple JDBC to JBDC with SOAP lookup would suffice.

Br,

Manoj

former_member190293
Active Contributor

Hi Manoj!

Yes, you're right. But I believe that the preferable way is to use the bridge in such cases. Lookups are more expensive to implemet, monitor and support. Its logic is hidden inside the mapping. It requires the java knowledge. Besides it can slow down overall scenario performance since you call lookup from mapping runtime environment.

Regards, Evgeniy.

former_member190293
Active Contributor

And one more thing: lookup NEVER should change the data state in backend system.

It's intended only for fetching the data and enriching the source data during the mapping.

The easiest example: we perform lookup, changing any data in target system, get response, send it to receiver system. And something goes wrong in receiver channel. What should we do next? Resend the message and write the data once again? And in case of bridge we just restart the second ICo without any side effects.

Regards, Evgeniy

Former Member
0 Kudos

Hi Manoj

One query for you

First flow :
Outbound Sync interface : with JDBC Request and JDBC Response structure.
Inbound sync interface : with SOAP Request and Response structure.
Request mapping in first flow : JDBC Request -->SOAP request.
Response mapping in first flow : SOAP response -->JDBC Response
Second Flow :
Inbound async interface : with JDBC response structure same as in the first flow
You flow should look like below:
JDBC-with_Beans(Sync interface)<--->OM with request and response<----->SOAP(Sync)
JDBC receiver<-----(ASync inbound interface with the response structure similar to first flow JDBC response one)<----Mapping_NA<--------SOAP Kindly explain how soap response ia sending the response back to JDBC response as i need to put the response data back to same table as well using JDBC response I knw am asking basic ques but this flow is confusing me
manoj_khavatkopp
Active Contributor

Naina,

In you request mapping :

JDBC Structure is mapped to ---- > SOAP Request Structure.

Now once your web service processes this request it sends back the SOAP Response structure.

Now in your response mapping :

SOAP Response Structure is mapped to ------>JDBC structure . This you need to implement with required action and table name with required format of JDBC structure.

Assume this response mapping as simple SOAP to JDBC interface you will get an idea.

So once the response mapping is done you have the JDBC structure i.e XML i.e ready to execute on database now this response is sent back to your Sender JDBC adapter but as sender JDBC adapter wont be able to process this it will handover this XML to the JDBC reciever using those modules.

Br,

Manoj

former_member190293
Active Contributor

Hi Naina!

You use async-sync bridge for your scenario.

JDBC sends the message in Async mode, you convert it to Synchronous mode using module and send to web service. Response from web service you convert back to async mode and use the second, separate ICo with asynchronous outbound interface for web service response and asynchronous inbound interface for JDBC. In this ICo you use message mapping to fill JDBC insert/update structure with web service response data and put the response in DB table(s).

Regards, Evgeniy.

Former Member
0 Kudos

so the RR bean is only used in sender JDBC chanel or in the SOAP response as well

manoj_khavatkopp
Active Contributor

There are 2 ways you can implement async-sync by keeping modules in sender or receiver channel the one which i proposed is using both modules in sender the one which Eve is suggesting is keeping modules via receiver channel.

Former Member
former_member190293
Active Contributor

Hi Naina!

Yes, it's the blog describing the usage of async-sync bridge in details. Just follow it.

Regards, Evgeniy.