cancel
Showing results for 
Search instead for 
Did you mean: 

Calling webservices asynchronously

Former Member
0 Kudos

Hi

I have a scenario involving XI wherein a message coming from an ABAP application - through a client ABAP proxy - is received by XI and then is to be converted to a webservice call - through XI using soap receiver adapter.

The client ABAP proxy method call is to be asynchronous - i.e the calling ABAP application will not wait for the response from the Webservice.

This means that the call to the webservice through the XI receiver soap adapter is to be asynchronous too.

Based on the WSDL ( that I was given by the other party that hosts the webservice ) that I imported into XI, I understand that there is a simple response from the webservice - that I am not interested in receiving and interpreting in XI.

I am getting a successfully processed message in SXMB_MONI and RWB - in XI - but I do not see the end -result - the webservice is supposed to update a DB table in the background.

Question is : Can a webservice be called asynchronously through a XI receiver adapter ?/

Thank you in advance for your time.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Karthik -

In regard to your question:

Question is : Can a webservice be called asynchronously through a XI receiver adapter ?

Yes, of course. However, when sending it asynchronously, you will not be able to see the end result within the monitors - SXBM_MONI or RWB.

Just to confirm, are you looking at the Adapter Engine monitor in RWB and not the Integration Engine monitor? Success in SXMB_MONI indicates that the message was passed from the Integration Engine to the Adapter Engine successfully. Success in the Adapter Engine monitor indicates the message was successfully sent to your target endpoint (in this case, your SOAP Receiver adapter CC). If all is well in the respective monitors, then the only way you'll see a successfull end result for an asynchronous message is by looking at the DB table you're updating.

Regards,

Jin

Former Member
0 Kudos

Hi Jin

Thank you for your quick response.

Yes, in RWB, I looked at the messages through the adapter engine - and the message there said - something regarding SOAP response being sent back to the XI SOAP adapter. The status of the adapter message - was sucessful.

Based on this, I checked entries in my DB - did not find any updates.

Please note that I have configured a single SOAP receiver adapter communication channel for this - and DID NOT configure any SOAP sender channel to receive the webservice response. ( Please see the reply for my original question from Anand in the same forum )

Based on what Anand has pointed out, I think the XI adapter should be in a position to receive some basic "sucess" acknowledgement message for the webservice call - inorder for the end message to be updated in the DB successfully....

Former Member
0 Kudos

Hi Karthik -

If your message is successful in the Adapter Engine monitor, this means that the adapter is getting back the HTTP 200 response (with a SOAP envelope with empty content) and the message was successfully delivered. Otherwise, an XI system error would result.

This doesn't mean that the web service providing system processed the message correctly. Is there a way for you to check any logs on the target system (with the DB) to check for errors during processing or to test the web service without XI in the middle? Based on the given data so far, this is where I would focus my current troubleshooting efforts.

By the way, you do not need to configure a SOAP sender channel to receive the web service response. You use the SOAP sender channel when a web service client initiates a web service call to XI (when XI is fronting as the web service provider).

Regards,

Jin

Former Member
0 Kudos

Hi Jin

I tested the webservice - without XI in the picture - i.e just by invoking the webservice from its home page...I found out that a particular date-time xsd datatype field had to be populated - mandatorily - for the webservice to respond....

So, when I put in the values for date-time field in the webservice home page - the webservice successfully did what its supposed to do - i.e update the database in the background

Coming back to XI , I had altered the WSDL slightly when importing to XI - making this date-time datatype field as non-mandatory - the reason being - whenever I gave a hardcoded constant for that field - like 11/05/2005 11:45:00 PM in the XI message mapping - I got a error message in the soap receiver adapter - saying that the adapter could not interpret the date-time value given. I

But the very same date-time value given above was given in the webservice test screen - went through fine....so , there seems to be a problem when the adapter converts the mapped xml document to the web service call...

Would you know - does the soap receiver adapter convert the XML document after mapping to the webservice call in a major way - where would I find the actual webservice call being made by the adapter ?

Former Member
0 Kudos

Karthik

One way to check how the value being passed is handled, is by tracing ur SOAP msg call in the App server..How to do this, well it depends on the app server being used..In APACHE AXIS this can be done by a SOAP tracer service provided with AXIS installation..Use something like this..to corner ur mesg

Regards

Sriram V.

Former Member
0 Kudos

Hi Karthik -

I would assume that the web service is expecting the dateTime in the standard xsd:dateTime format (e.g. YYYY-MM-DDTHH:MM:SS. Have you tried using this?

The SOAP receiver adapter does not manipulate the payload content.

Regards,

Jin

Former Member
0 Kudos

Hi Karthik,

Please go through SOAP FAQ's note number 856597.

6. Receiver Asynchronous Calls

Q: What are the correct receiver options for asynchronous calls?

A: The processing mode of the receiver is determined by the message that reaches the receiver. If you are sending a message with some quality of service, to provide this service of quality to the server, your must make sure two things. First, your receiver channel must be configured to pass the XI message ID to the server. Second, your web service must check duplicates using this message ID.

Q: What should my web service return to the adapter for asynchronous calls?

A: Currently, the receiver adapter expects an HTTP 200 with a SOAP envelope with an empty content for successful delivery. Any other response will result in a XI system error and triggers retries of the message. When you want to check duplicates, you should configure your receiver channel to pass the XI message header information to the server.

Prior to SP11, a SOAP fault resulted in the application or system error, depending on whether the SOAP fault contained a detail child element or not. This behavior contradicted the communication model. Therefore, it has been changed so that the adapter generates the system error for any SOAP fault in asynchronous calls.

When you want to check duplicates in your web service, you should configure your receiver channel to pass the XI message header information to the server. When your web service indeed find a duplicate, assuming that the previous message was simply lost, your web service should return an HTTP 200 with an empty SOAP envelope.

hope this helps...

Regards

Anand

Former Member
0 Kudos

Hi Anand

Thank you for your quick response. I appreciate it.

Just referring to one of the statements in the OSS note...

"Currently, the receiver adapter expects an HTTP 200 with a SOAP envelope with an empty content for successful delivery "

I have a couple of questions :

1.Is there some setting in XI configuration to receive this response from the webservice ( currently I have a single soap receiver channel configured - no sender soap channel ).

2. Is the webservice supposed to return a HTTP 200 with a SOAP envelope empty content ? Is this a standard and simple thing that could be done by any service ? ( since I need to get this done by a 3rd party - who has built the webservice )

Thank you again for your time.