cancel
Showing results for 
Search instead for 
Did you mean: 

Help me setup this Web Service scenario

Former Member
0 Kudos

Wish to host a web service on XI that allows our partner to ping our server to verify it's up and running. The web service will get invoked by the 3rd party, and will send XML that simply shows the 3rd party as the sender with us as the recipient. There is no true receiver in this scenario as the message never needs to get past XI, just transformed and returned back to the sender.

Flow would be:

Soap Client -> XI -> back to SOAP client

This is sample XML.

<From>

<PartyId>3rd Party</PartyId>

</From>

<To>

<PartyId>US</PartyId>

</To>

Web Service will reverse the From and To parties so that the response to the 3rd party will be:

<From>

<PartyId>US</PartyId>

</From>

<To>

<PartyId>3rd Party</PartyId>

</To>

Here's how I have set it up so far

IR:

Message Interface(MI_Ping) - Outbound, Synchronous. Both the input and output messages are the same since the XML is the same. All data and message types are defined already.

Interface Mappings -

Source Interface - MI_Ping

Target Interface - MI_Ping

Both the request and the response mapping programs are identical.

Message Mappings - Map uses same XML for both source and target. We flip the <To> and <From> fields

ID:

Business Service(WebServiceDemo) -

Defined Sender SOAP adapter comm channel pointing to MI_Ping interface

Sender Agreement specifying WebServiceDemo service and MI_Ping interface using Sender SOAP channel as the comm channel.

Here is where I get stuck. When setting up the Receiver Determination, I'm putting WebServiceDemo as the receiver service. The problem is I don't know how to setup a receiver agreement that will allow for the response to go back to the WS client synchronously.

Right now when I send a WS call into XI, it invokes the mapping and flips the values just fine. The issue is that I cannot get it to return a message to the SOAP client. I continue to receive errors saying there is no receiver agreement defined. I tried defining a receiver agreement with WebServiceDemo as the sender and receiver, but then I can only choose receiver comm channels. I can't choose a SOAP receiver channel since that's used to invoke web services.

In this scenario there is no true "receiver" XI is getting the message and just flipping some values before returning the message to the SOAP client. I know how to make this work if I was invoking a BAPI or RFC and returning a value because in that case the R/3 system is the receiver.

Can someone detail what steps I should take to implement this scenario? I believe I have the IR stuff created fine, but I think I'm confused on the ID setup.

I have already tried going thru the how to guides and blogs

Will reward max points for good answers.

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi -

<i>>>>In this scenario there is no true "receiver"...</i>

Nevertheless, you still need a receiver.

<i>>>>I know how to make this work if I was invoking a BAPI or RFC and returning a value because in that case the R/3 system is the receiver.</i>

You can do something similar with XI since it has an ABAP stack. For example, the basic RFC - STFC_CONNECTION - is available in every ABAP stack. You can import the RFC for this, make this the receiving/inbound interface for your service receiver service (I guess WebServiceDemo). Of course relevant request/response mappings would be necessary, but overall this should meet the requirements you've described.

Regards,

Jin

Former Member
0 Kudos

Hi,

There is also another possibility.

You can develop a simple sync BPM process, which will just return an acknoledgement message back to the sender. This way, you will not need to go outside of XI.

Regards,

Bill

Former Member
0 Kudos

thanks for the help guys, ill probably follow Jin's suggestion since I have limited experience with BPM at this point but that's good to know going forward.

bhavesh_kantilal
Active Contributor
0 Kudos

james,

Using a BPM for this case would be very simple. Just receive the Request in XI inside the BPM ( this step would open a Synch Asynch Bridge ) .Do the mapping of the Webservice request to the response format inside the BPM with a trasnformation step and then use another Send Step to send the response back. This will close the Synch Asynch bridge,

In this case you will just need the Sender SOAP adapter and you will not need a receiver adapter and a receiver agreement as wrell.

Your receiever determination will also be just one and the receieve determination will use the BPM as the receievr service.

Regards

Bhavesh