cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP fault from web service - how to convert it to application error:

Former Member
0 Kudos

Hi gurus,

I have read the relevant blogs and a few forum posts, but still could not solve this problem. The WS I'm calling is passing back a response with the schema below when there is a problem:

I'm using the standard fault message type of PI for this inbound interface, but PI is unable to convert fault texts and throw an application error, instead it throws a system error that does not display the reason.

How can I get PI to understand the fault and display it correctly for monitoring & ALM?

Regards,

Gökhan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I used SOAPFaultException on the server side to throw a SystemError in the SOAP receiver adapter, by following the format defined in the SOAP adapter FAQ SAP Note. Now I am able to see the error in the adapter audit log as well.

When the server returns SOAPFault element with the format defined for application fault messages, the error is not shown in audit log.

Former Member
0 Kudos

I face this issue now.Can any one answer this issue???

Former Member
0 Kudos

Use the following format as I did to see the errors thrown by the receiver systems in async messages in the SOAP adapter audit log:

HTTP/1.1 500 Internal Server Error

Content-Type: text/xml; charset="utf-8"

This is from SOAP Adapter FAQ note, have a look at it as it will help. If you are using Java on receiver side, as I had mentioned, use SOAPFaultException and your runtime will generate this HTTP Post automatically:

JDK 1.4

javax.xml.rpc.soap.SOAPFaultException

JDK 1.5

javax.xml.ws.soap.SOAPFaultException;

Hope this helps. We cannot change the behavior of the SOAP adapter in this sense, so this is the only option.

Regards,

Gökhan

Former Member
0 Kudos

Hi,

Your webservice should be capabale of handling fault messaegs. ie in case of any application error the fault message interface should be triggerd.

To acheive this your websevice needs to be modifed.

Regards,

Sunil.

Former Member
0 Kudos

Hi, I guess my question is not clear enough. An exception that triggers the fault message is triggered, and an example for the fault message is as above. But it does not use SOAP envelope as you see, and PI cannot extract the error text for monitoring.

I also tried importing this scema as the fault message structure and used it in the inbound interface, but the result did not change.

Regards

Gökhan