Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to handle soap faults from receiver webservice

The scenario is file to webservice. The file contains a record that I need to submit to the webservice. The issue I am having is rather than providing any error as a response message (or an error segment in the response) it returns a soap:fault for any issue, structural or data; or the response structure as defined in the WSDL on success.

I tried to use the Fault on the Synchronous service interface:

Created a XSD based on the soap:fault structure, linked the External Message to the Fault in the Service Interface.

Example of a fault:

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

   <soap:Body>

      <soap:Fault>

         <faultcode>soap:UQ_TAG_NET_ID_DEL</faultcode>

         <faultstring>The specified Tag ID is already in use. Please specify a unique value.</faultstring>

         <detail>

            <FaultInfo>

               UQ_TAG_NET_ID_DEL

               <FaultParams>DataIntegrityViolationException</FaultParams>

            </FaultInfo>

         </detail>

      </soap:Fault>

   </soap:Body>

</soap:Envelope>

When a fault is encountered, only the following shows in message monitoring:

            <FaultInfo>

               UQ_TAG_NET_ID_DEL

               <FaultParams>DataIntegrityViolationException</FaultParams>

            </FaultInfo>

I would like to be able to route the response message to a file so that it can be reviewed by support team, rather than cause error in Runtime Workbench. Going forward it is likely that I will add routing based on the <faultcode>. Certain faults can be handled, possibly by calling another webservice to obtain more data then include in transform.

Thank you for your assistance.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question