cancel
Showing results for 
Search instead for 
Did you mean: 

How to read fault message in async soap receiver

Former Member
0 Kudos

Hi experts,

I have an asynchronous scenario IDOC->XI->SOAP.

I've defined a SOAP fault message as part of the Inbound Message Interface.

When an error occurs on the SOAP Server, the error description is returned in the form of the fault message.

E.g.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >

<SOAP-ENV:Body>

<SOAP-ENV:Fault>

<faultcode>SOAP-ENV:Client</faultcode>

<faultstring>Cannot find the required parameter [lastName] in request message content.</faultstring>

<detail>

<ns1:com.sap.engine.services.webservices.additions.soaphttp.exceptions.ProcessException xmlns:ns1='http://sap-j2ee-engine/error'>Cannot find the required parameter [lastName] in request message content.</ns1:com.sap.engine.services.webservices.additions.soaphttp.exceptions.ProcessException>

</detail>

</SOAP-ENV:Fault>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

My question is how do I use this message in XI?

I cannot seem to read this fault message.

Please help.

Thanks.

Ron

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ron,

Also check this link for fault message:

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/826cdb84-0601-0010-f781-eea9c8ca567c">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/826cdb84-0601-0010-f781-eea9c8ca567c</a>

Regards,

Subhasha Ranjan

Former Member
0 Kudos

This will useful to U

/people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1

Former Member
0 Kudos

> This will useful to U

> https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/

> 4846

The blog talks about using an ABAP Proxy to generate the fault message.

Because no adapters is used, so the status is reflected in SXMB_MONI.

For my case, I'm using an inbound SOAP adapter. The errors are reflected in MDT, but I cannot see the fault message in MDT.

If I trace the SOAP request/response using a 3rd party TCP Monitor, I can see the fault message returned.

May I know how I can read the fault message and use them from XI?

Former Member
0 Kudos

I'm probably wrong, but usually how do you handle fault messages in an asynchronous SOAP scenario?

Please help.

Thanks.

Ron

Former Member
0 Kudos

Fault messages are specially designed for Proxies and RFC's only..............ASFAIK Fault messages wont work for SOAP reciever side...

Former Member
0 Kudos

> Fault messages are specially designed for Proxies and

> RFC's only..............ASFAIK Fault messages wont

> work for SOAP reciever side...

But how do you handle application side errors in non RFC/Proxy scenarioes.

E.g. SOAP or HTTP?

bhavesh_kantilal
Active Contributor
0 Kudos

> Fault messages are specially designed for Proxies and

> RFC's only..............ASFAIK Fault messages wont

> work for SOAP reciever side...

They actually also work with SOAP scenarios.

Your WSDL will contain the fault message and in such cases ( if you are using a BPM with exception handler ) , in case a fault message is sent back, you will be able to access this as well.

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh ,

Thanks for Your information.

Regards,

Sekhar D

Former Member
0 Kudos

> > Fault messages are specially designed for Proxies

> and

> > RFC's only..............ASFAIK Fault messages wont

> > work for SOAP reciever side...

>

> They actually also work with SOAP scenarios.

>

> Your WSDL will contain the fault message and in such

> cases ( if you are using a BPM with exception handler

> ) , in case a fault message is sent back, you will be

> able to access this as well.

>

> Regards

> Bhavesh

Bhavesh,

I'm not using BPM and I'm using a asynchronous mode for invoking the WebService.

My WSDL has fault message defined, and I've assigned this fault message to the "Fault" portion of the Inbound Message Interface.

How can I access my fault message in this case?

Please help

Thanks.

Ron

bhavesh_kantilal
Active Contributor
0 Kudos

Ron,.

The fault messages I worked with were for Synchronous Calls and so I could to the fault message mapping in this case. I mapped the fault message of my SOAP to the fault message of the calling application which was an RFC.

In your case, as you are making an Asynch call, am not sure how it would work. Does the sending application support Fault messages? If yes, then in your Outbound Message Interface, select the fault message for the sending application, create a fault message mapping and then the fault message would get propogated back. But, I have nto worked on it practically and so might not be sure if it works in real time.

Regards

Bhavesh

Former Member
0 Kudos

Typically how do we handle fault messages returned by SOAP adapters in asynchronous scenario?

Please help.

Thanks.

Ron