cancel
Showing results for 
Search instead for 
Did you mean: 

How to send exception details to client program from PI (SOAP to PROXY scenario)?

gopalkrishna_baliga
Participant
0 Kudos

I have a SOAP to PROXY synchronous scenario in PI. A client program (Java program) calls PI web service using SOAP channel. PI then sends the request to R/3 system via ABAP proxy. In R/3 system the proxy calls a FM and FM then returns a response data back.

If the R/3 system is down then in PI sxmb_moni the message will be in error state. How to return this system exception to the calling client (java) program?

Thanks

Gopal

Accepted Solutions (0)

Answers (3)

Answers (3)

GabrielSagaya
Active Contributor
0 Kudos

Hi,

SOAP fault messages can only be used to capture application error, not for system error.

Please check the Blog http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6568

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Here you are hosting the web service using soap sender. So you can provide fault message to the sender system. How?  Create Fault message type on the both service interface (outbound) SOAP and service interface(inbound)Proxy. When there is application or business errors, raise exception through abap code in fault message inbound method(generated through SPROXY transaction).  This way your return the fault message response.

Also you need to map the fault message of proxy(inbound) to the soap(outbound) just similar to response. This way you return the fault message response to the sender using soap outbound service interface. Hope that helps.

former_member184681
Active Contributor
0 Kudos

Hi Gopal,

There are two steps to achieve this. First of all, when generating the sender web service from PI, you should enter some Fault Message Type in the sender Service Interface, in the highlighted field below:

Then, in the sender Java-based system, you encapsulate the web service call in a try-catch block to capture the error returned by PI.

Hope this helps,

Greg