cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Fault Message : Mapping error

Former Member
0 Likes
2,031

Hi experts,

Here is my scenario : SProxy => PI => SoapUI

It's a Synchrone interface.

I have some difficulty with Fault Message.

com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: Response message contains an errorXIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Fault String here ... at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:772) at ...

Response from SoapUI (Fault Message) :

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

   <soapenv:Header/>

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>Fault Code here ...</faultcode>

         <faultstring>Fault String here ...</faultstring>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

I created a MT for my Outbound interface fault message (SProxy - ECC) :

.

It's a standard Fault Message.

For SoapUI response i tried to create an External Definition with a custom XSD :

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

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

targetNamespace="http://schemas.xmlsoap.org/soap/envelope/">

    <xs:complexType name="BodyType">

        <xs:sequence>

            <xs:element name="Fault" type="SOAP-ENV:FaultType"/>

        </xs:sequence>

    </xs:complexType>

    <xs:element name="Envelope">

        <xs:complexType>

            <xs:sequence>

                <xs:element name="Body" type="SOAP-ENV:BodyType"/>

            </xs:sequence>

        </xs:complexType>

    </xs:element>

    <xs:complexType name="FaultType">

        <xs:sequence>

            <xs:element name="faultcode" type="xs:string"/>

            <xs:element name="faultstring" type="xs:string"/>

        </xs:sequence>

    </xs:complexType>

</xs:schema>

But i have always this error :

<SAP:Category>XIProtocol</SAP:Category>
<SAP:Code area="PARSING">GENERAL</SAP:Code>
<SAP:Stack>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: Response message contains an errorXIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Fault String here ... at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:772) at ...

I tried to use http://schemas.xmlsoap.org/soap/envelope/ in external definition but same problem.

Soap Envelope in External Definition :

Here is my mapping :

I don't understand why i always have this error ...

Maybe my External Definition doesn't match with SoapUI response ?

Regards,
Youri

View Entire Topic
Former Member
0 Likes

Ok, i don't use "Do Not Use Soap Envelope"

I simply use XSL mapping for my Fault Message to unwrap Soap Enveloppe.

In this case i see in SXMB_MONI :

It's better but not yet perfect ...

My Response in SoapUI MockService :

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

   <soapenv:Header/>

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>soapenv:Server</faultcode>

         <faultstring>Fault</faultstring>             

         <detail>

              <error>

                    error here

              </error>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

In my XSLT mapping i'm just mapping 2 fields into standard PI fault message.

But in SXMB_MONI i see the content of <detail> ... it's strange this tag is not in my mapping ...

My Procedure seems correct or not ?

maheswarareddykonda
Active Contributor
0 Likes
Ok, i don't use "Do Not Use Soap Envelope"

if you not select Do not Use Soap Envelope option in channel..you should not get Envelope structure data..but you are saying getting that envelope to SXMB_MONI.

please check that thing channel.

and

But in SXMB_MONI i see the content of <detail> ... it's strange this tag is not in my mapping ...

yes its strange,, can you do one thing..first remove the XSLT mapping from Operational mapping and try to do test..you will get exact fault message in response..as per that response fault data you can use exact logic in XSLT mapping and make sure that should be first mapping in fault tab.

Former Member
0 Likes

Ok i tried without Fault message Mapping and without "Do Not Use Soap Envelope" and in this case i see the first tag of <detail> fault message in my Payload SXMB_Mony.

SoapUI response :

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

   <soapenv:Header/>

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>soapenv:Server</faultcode>

         <faultstring>FSB-Development--9200</faultstring>

         <detail>

            <FSBMessageID>00c072e3-f991-48cf-bf31-094dbac9c1b0</FSBMessageID>

            <CMessageID/>

            <error>Error</error>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

SXMB_MONI Payload :

<FSBMessageID>00c072e3-f991-48cf-bf31-094dbac9c1b0</FSBMessageID>


And the error :

<SAP:AdditionalText>HTTP 500 Internal Server Error</SAP:AdditionalText>

Former Member
0 Likes

I see <SAP:MessageClass>ApplicationError</SAP:MessageClass> in SXMB_MONI

And when i catch the error in ABAP Code it's a system error ... another mystery ...

Basically i just need to catch Soap Fault message with SProxy ...

Former Member
0 Likes

Hi Youri,

I usually my response outboud schema with a fields to map the fault SOAP messages. In this way i use Do Not Use SOAP Envelope + XMBWS.NoSOAPIgnoreStatusCode parameter + 2 XSLTs to wrap and unwrap the SOAP envelope.

For example, for the response:


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

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:output method="xml"/>

    <xsl:template match="/">

        <n1:myroot_response xmlns:n1="http://mynamespace">

            <xsl:if test=".//faultcode">

                <faultcode>

                    <xsl:value-of select=".//faultcode"/>

                </faultcode>

                <faultstring>

                    <xsl:value-of select=".//faultstring"/>

                </faultstring>

            </xsl:if>

            <xsl:if test=".//webservice_root_tag">

                <xsl:value-of select=".//webservice_root_tag" disable-output-escaping="yes"/>

            </xsl:if>

        </n1:myroot_response>

    </xsl:template>

</xsl:stylesheet>

Regards.