cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc scenario -> synchronous service

Former Member
0 Kudos

Hey,

I have the following scenario:

SAP system ---(IDOC)-----> PI -------(synchronous service)---> ext. System

but the response of the synchronous service should be:

ext. System ------(synchronous service response)----> PI -----------(server proxy)----> SAP system

That means, the Idoc is coming asynchronous in, but IP then calls a synchronous service. The response of this service call should then be routed over PI to a server proxy on the SAP system.

How can I so that the best way?

Thank you very much!

Michael

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I believe the best way to handle this requirement would be the use of BPM in the interface.

-Supriya.

Former Member
0 Kudos

Hey,

thanks for the answer...

But the problem is, BPM should not be used. I have heard about using the JMS adapters to build the async/sync bridge. But how can that be done in this scenario? I mean, I have the Asynchronous IDOC interface and the synchronous SOAP call and back another asynchronous call as Proxy....

Is there a way to use the JMS adapters to build this bridge, except of using JMS for the sender and receiver systems itself?

Thank you very much!

Michael

stefan_grube
Active Contributor
0 Kudos

> But the problem is, BPM should not be used.

Why not? It is the best solution for this request. You can design error handling when the sysnc call fails.

> I have heard about using the JMS adapters to build the async/sync bridge. But how can that be done in this scenario?

This is the opposite: you have a sync call on sender side and a pair of async on receiver.

Former Member
0 Kudos

Hi Stefan,

BPM should not be used in the project concerning to some restrictions... I would use it, if I could.

How could JMS be used, when the receiver system doesn't understand JMS? I mean, an IDoc

is sent from SAP ERP to PI and from there should be called a Web service via soap call... So how

can I use the JMS bridge then?

Thank you!

Shabarish_Nair
Active Contributor
0 Kudos

unfortunately in your scenario you will be forced to use the BPM since the sync/async modules cannot be used with IDoc scenarios.

a simple BPM can work for you.

Ref: /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit

Former Member
0 Kudos

Hi again,

thank you for the answers...

Now I got the information, that it's possible to call the external system (web service) via JMS. That means:

Request

IDOC -


(async)---> PI -


(sync JMS)----> external System

Response

External System -


(JMS response async)----> PI -


(async Proxy )---> SAP ERP

Isn't it possible to convert the asynchronous data, coming from the idoc, to a synchronous JMS call, and convert the Response of this call then to a asynchronous call and send to a proxy? Isn't it possible to use the async/sync JMS bridge then just on the receiver side?

Thank you!

Edited by: Michael Schmidt on Nov 2, 2010 9:55 AM

Former Member
0 Kudos

Hi Michael,

from what I understand it should not be a problem to use the async/sync-Bridge without BPM.

We are using such scenario from some time and it is working fine.

You have the async IDOC which will create the sync request in the external system.

The sync response is converted into a 2nd async call that can have the proxy as target. This is achieved by the bridge.

You will need the RequestResponseBean and the ResponseOnewayBean provided by SAP to build this bridge.

Best regards,

Markus

Former Member
0 Kudos

Hi Marcus,

this is exactly what I need!

But can you tell me, what exactly I have to setup in the receiver JMS Adapter (the one, which is converting the async request to a sync call) and in the sender JMS, which is then routing the response from the sync call back to a async proxy?

The examples, I have found, have just described the opposite direction, or a JMS to JMS scenario with using the bridge.

Thank you very much!

Former Member
0 Kudos

Hi Michael,

are you referring to JMS because this is stated in the SAP help together with the bridge description or do you really require JMS for your communication with the external system?

Which type of Adapter would you use to connect sync to the external system? Is it JMS or some other protocol?

The async/sync bridge can be used other adapters as well not just JMS.

Here is the example config from our adapter.

Add the two beans in the module config tab of the commchannel using following order:

1) AF_Modules/RequestResponseBean

2) [default bean from your adapter]

3) AF_Modules/ResponseOnewayBean

Then set the module parameters for 1) and 3) as described in the SAP Help for those beans.

Best regards,

Markus

Former Member
0 Kudos

Hi Markus,

actually it should be a soap call, but as we got this problem now, there should also be the possibility to call the target system via JMS...

So is it the JMS receiver adapter channel, where I have to add the modules? I got a bit confused in all the JMS bridge blogs... I'm not sure anymore, what I really need for just one side JMS with async/sync bridge....

thank you!

Former Member
0 Kudos

Hi Michael,

yes, you would add this in the receiver JMS Channel.

Once you have done this, you will notice that you will require a Sender SOAP Channel + Agreement.

This is required for the "return way", i.e. technically the beans will create a new message from the sync response.

Check in the RWB, there will be an error "no agreement found for....". Then create a soap channel with agreement and your response message will occur in SXI_MONITOR as separate message (which you then can route to your target system via Proxy or whatever protocol you desire)

Best regards,

Markus

Former Member
0 Kudos

Hi Markus,

My JMS receiver channel shows now the following modules:

1	AF_Modules/RequestResponseBean	Local Enterprise Bean	0
2	SAP XI JMS Adapter/ConvertMessageToBinary	Local Enterprise Bean	convert_XI2Bin
3	SAP XI JMS Adapter/SendBinarytoXIJMSService	Local Enterprise Bean	exit
4	AF_Modules/ResponseOnewayBean	Local Enterprise Bean	1

And the following Module configuration parameters:

0      passThrough          true
1      receiverChannel     -
1      receiverParty          -
1      receiverService      -

Are the parameters connected to the right module, or should they be set in the opposite way?

What have you set in receiverChannel/-party/-service?

Thanks in advance!

Edited by: Michael Schmidt on Nov 2, 2010 1:24 PM

Former Member
0 Kudos

Hi,

yes this should be correct.

We have not set the "receiver.... Parameters".

The receivers can be determined with a regular receiver determination.

We use the replaceinterfaceonFault-Parameter - but this is not mandatory and may not be needed in your case.

Best regards,

Markus

Former Member
0 Kudos

Hi Markus,

thank you very much. I'll try this and see how it works. As BPM should not be used, this is the way to do it...

You'll get my points, when I got it to work...

Michael

former_member185881
Active Participant
0 Kudos

Hello Michael

Is this worked for you?

If yes please let me know as I too want to develop the same sceanrio in my project.

Thanks

Dheeraj Kumar

Former Member
0 Kudos

Hi Dheeraj

You have to use request response in receiver adapter of your 3rd party system. The request response bean will trigger one more async interface which will be response to proxy scenario.

Check the blog for details

Answers (0)