cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronous SOAP: Get fault message on ABAP side

Former Member
0 Kudos

Hi,

I've a synchronous ABAP Proxy => PI 7.11 => SOAP scenario.

The SOAP receiver is a third party application using AXIS 1.4.

When I call the SOAP receiver with bad input via SOAP UI I receive an error message like that:


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

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>soapenv:Server.userException</faultcode>

         <faultstring>com.ZZZ.exception.ZZZException: Employee not found: 9999911111</faultstring>

         <detail>

            <com.ZZZ.exception.ZZZException xsi:type="ns1:ZZZException" xmlns:ns1="http://exception.ZZZ.com"/>

            <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">server.YYY.com</ns2:hostname>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

When I call the SOAP receiver through my ABAP proxy, I just get this exception message in SXI_MONI:


<?xml version="1.0" encoding="UTF-8"?>

<com.ZZZ.exception.ZZZException xmlns:ns1="http://exception.ZZZ.com"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:ZZZException"/>

Nevertheless I see the error in SXI_MONI:


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<!-- XML Validation Inbound Channel Response -->

<SAP:Error SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

    <SAP:Category>Application</SAP:Category>

    <SAP:Code area="SOAP">FAULT</SAP:Code>

    <SAP:P1>http://schemas.xmlsoap.org/soap/envelope/</SAP:P1>

    <SAP:P2>Server.userException</SAP:P2>

    <SAP:P3/>

    <SAP:P4/>

    <SAP:AdditionalText>com.ZZZ.exception.ZZZException: Employee not found: 9999911111</SAP:AdditionalText>

    <SAP:ApplicationFaultMessage namespace="">com.ZZZ.exception.ZZZException</SAP:ApplicationFaultMessage>

    <SAP:Stack/>

    <SAP:Retry>M</SAP:Retry>

</SAP:Error>

In the WSDL of the SOAP receiver there's just the ZZZException without fields faultcode or faultstring:


<complexType name="ZZZException">

  <sequence/>

</complexType>

Do I have to add the fields faultcode or faultstring to the WSDL myself?

I tried the following, but it didn't work:


<complexType name="ZZZException" abstract="true">

    <xsd:sequence>

        <xsd:element name="faultstring" type="soapenc:string">

    </xsd:sequence>

</complexType>

Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184720
Active Contributor
0 Kudos

Hi Eddie -

Do I have to add the fields faultcode or faultstring to the WSDL by myself?

>>> No. Even though you add - it doesn't work as it's the webservice which returns the message.

For sending the fault messages, Have a look at the below blog -

Former Member
0 Kudos

Thanks for the link!

But I've already done it that way...

The problem is that I always have to go into SXI_MONI to figure out what's the exact error message!

Harish
Active Contributor
0 Kudos

Hi Eddie,

Please refer the below discussion

regards,

Harish