Skip to Content
0

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

Jul 18, 2017 at 06:40 AM

221

avatar image
Former Member

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-rfc-lookup/

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.!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Evgeniy Kolmakov Jul 24, 2017 at 07:11 AM
1

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.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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.

0
Evgeniy Kolmakov Jul 18, 2017 at 06:53 AM
1

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.

Show 18 Share
10 |10000 characters needed characters left characters exceeded

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

1

Hi Manoj!

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

Regards, Evgeniy.

1

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

2

Hi Manoj!

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

Regards, Evgeniy.

1

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

scn.png (37.7 kB)
1

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.

1
Show more comments
Former Member
Manoj K

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

0

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

1
Former Member
Manoj K

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
0

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

2

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.

2
Former Member
Evgeniy Kolmakov

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

0

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.

1
Former Member

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

0

Hi Naina!

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

Regards, Evgeniy.

1
Former Member
Evgeniy Kolmakov

is this the one i need to implememnt eve

https://blogs.sap.com/2014/01/28/generic-pi-async-sync-bridge-configuration-for-any-adapters/comment-page-1/#comment-383976
0

Hi Naina!

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

Regards, Evgeniy.

1