cancel
Showing results for 
Search instead for 
Did you mean: 

Need info on error handling in the response of a synchronous call

Former Member
0 Kudos

Hello PI gurus

I am working on a scenario which is something like below

Source  --> PI -- >  Target  , where Source and Target are some third party softwares (Home grown). Both are using Webservices.

Source makes a synchronous call to target and gets a response. If there is any problem with Target (like server or h/w error etc.,), I want an error message to be sent back to Source.

One thing I want to do is to include a Fault Message Type in the screen of Service Interface.


Will this do the needful?


Or do I need to request Target side application developer to make changes to his code and send back the relevant info in the response so that I can capture that in PI and send it back to Source.

I have read so many postings but couldn't get a useful answer.

ANy feedback will be highly appreciated.


THanks
Ram

Accepted Solutions (1)

Accepted Solutions (1)

nabendu_sen
Active Contributor
0 Kudos

Hi Ram,

First of all Fault Message which you usually see in Operation Mapping along with Request and Response mapping, that's actually handles Application Errors. Suppose the record does not exist or duplicity. But your Target must need to support this functionality and as PI consuming their Service, the WSDL should have the Fault Structure.

http://scn.sap.com/people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-...

http://scn.sap.com/people/alessandro.guarneri/blog/2011/01/10/soap-fault-in-sap-pi-hijack-it

For System Errors means, Target System is down or connection issue between PI and Target, you need to use ccBPM. Please find the below blog:

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Source makes a synchronous call to target and gets a response. If there is any problem with Target (like server or h/w error etc.,), I want an error message to be sent back to Source.

One thing I want to do is to include a Fault Message Type in the screen of Service Interface.

The use of fault message will only handle application errors. It cannot be used for system errors e.g server down.

Hope this helps,

Mark

Former Member
0 Kudos

Thanks a lot everyone. I learnt a lot and I appreciate it.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Will this do the needful?

Answer is yes/no.

Fault message is to deal with application errors or business validation purpose. Again only if the target system supports you can use it. Otherwise just creating in your structure does not help.  In case of other errors example (null pointer excepton) the code is executed against your business request data in the target system and ending up in the exception block of code say example. This situation the target system can wrap all the exception trace log as the fault message to the sender system.   If the server which host webservice is down then in that case you will not get any issue of fault message.

Ccbpm supports system acknowedgement to some extent. You might want to see send step and its options for system acknowledgment.