cancel
Showing results for 
Search instead for 
Did you mean: 

Fault handling in Async Webservice

Former Member
0 Kudos

Hi All,

I have situation in Proxy to Web service. We send the data via proxy to WS.

The call is async and we don't get anything back, if everything is right & data is posted.

But WS has fault message and sends the fault messages for any wrong data.

This is fault message structure

Servicefault

  code

  message

  type

I have created DT & MT for fault message & mapped to WS fault message.

While using Operation mapping, i am not able to see the place where should i assigning the mapping for fault. I can see for request but not for fault.

I have made my outbound Service interface Outbound-Stateless-Normal operation-Async

For  inbound the same with Fault message in error message.

Please advice, how should i handle the fault message coming from WS in Async scenario

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

iaki_vila
Active Contributor
0 Kudos

Hi Techie,

It's really no easy way in your scenario. If the scenario goes to have a really huge quantity of messages the sync solution could be a performance problem, however PI supports a huge traffic depending the PI version, the PI hardware, the message size, the number of messages, if you have the traces deactivated, and so on.

I'm thinking in three alternatives solutions:

1. Proxy to Proxy scenario with SOAP lookup () a mapping level. (Async communication)

2. Proxy to SOAP to Proxy. Using Async/Sync bridge (http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f96dbf-adca-3010-ffb5-daf2d1f0e...). I mean you do a client proxy and server proxy but both async.

3. Talk with SOAP endpoint team to provide a new WS that you can send Date & Time and the response would be the keys of each register and the number of registers. Then you can have a job in your sender system to check what register has come correctly. (i think this will be improbable)

About the first solution the lookup can have performance problem, then you should do several tests to assure if the response time is right and the message is not waiting so much time.

About the second solution, i haven't tried it with ABAP proxies, but i think it is possible.

About all the scenario, at least before the initial go-live phase you should talk with your basis team about the current PI dimension, if you will need queue priorization, if you will need to increase the icm timeout, if the initial load process has to be done in outside office hours and so on.

Hope this gives you any idea.

Regards.

nabendu_sen
Active Contributor
0 Kudos

I don't think you would be able to use SOAP side Fault message for Asynchronous call.

If you want to change your scenario to Synchronous, check :

Regards,

Nabendu.

Former Member
0 Kudos

Thanks for the reply. Can you advice then, how would i handle this situation.

Does i need to convert this into SYNC. If that is the case, what would be response message as, i don't get any response message ( When i try from SOAP UI, i only get repsonse with Body which i guess is standard)

Thanks & please advice.

nabendu_sen
Active Contributor
0 Kudos

Hi,

If you receive Response from SOAP UI, that means Receiver side is Sync. That WebService team should provide WSDL with Request, Response and Fault Structure. You can get full information in the below blog:

Regards,

Nabendu.

Former Member
0 Kudos

My SOAP U response is below, which i think is standard. Please let me know if this is response.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

   <s:Body/>

</s:Envelope>

Former Member
0 Kudos

Any update on this is highly appreciated.

former_member190284
Participant
0 Kudos

Hi

I am also dealing with fault handling. as far I know, this can be handled through sync interface.

But in case you dnt want to give response back than

create a single field as a response in pi and map it to any field of mt_proxy

since this response wouldnt be handled by that system(ECC probably) it should not cause any issuse with any system.

just try if it helps!

iaki_vila
Active Contributor
0 Kudos

Hi Techie,

You can follow Nabendu suggestion. You can use Do Not Use SOAP envelope check marked, in the response you can use an XSL mapping if you find the SOAP:BODY empty you can map an ok answer for your sender and if you have a SOAP:FAULT you map an alternative error answer.

Regards.

Former Member
0 Kudos

Thanks for your help as always!

I am in typical proxy to SOAP ingratiation scenarios where we send the data ASYNC( Via Proxy). The 3rd party Web service has 2 return messages . First one is send synchronously, when there is data error like wrong company code ( in form of SOAP fault). The other one is Async when the data is successfully loaded into system.

Problem with this is when they send the fault message, we are not receiving it because we have not mapped it. The only way to map it to make the Proxy Synchronous. With this we have several issues

(1) We are planning to send huge volume least in initial phase of go live & sync interface might be issue.

(2) Although we don't need SOAP Fault, but it looks like 3rd party is not storing the data sent by PI. There is validation layer before even the data goes into application layer. This validation layer check the data ( like Company code etc..) and if there is wrong data, it generates the SOAP fault.

With the above approach, there is no trace in 3rd Party system to see if they even received the data and what kind of error has occurred.

(3) This puts the onus on PI to dive deep into fault message and create a nice report for business what went wrong & what to correct it.

Considering all the option above, can you suggest what would be the best approcah to ahndle the soap fault specially how to achieve 3rd option without comprising on volume.

Thanks!

former_member182412
Active Contributor
0 Kudos

Hi Techie,

You can do with Asynchronous-synchronous bridge with modules in Receiver Communication Channel as shown in below blog. example 2.4

You need to enable Do Not Use SOAP envelope in receiver soap channel and add the soap envelop in the mapping.

Receiver soap adapter modules tab look like below.

After that you need to create separate asynchronous interface(the interface name and namespace must be same as what you mentioned in the above channel configuration) for soap response to proxy, remember response also contain soap envelop, in the mapping you can map the fault message to proxy.

Finally it will be two asynchronous interfaces.

1. Proxy to Webservice

2. Web service response to proxy

Regards,

Praveen.