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

Fault Message : Mapping error

Former Member
0 Likes
2,030

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

Accepted Solutions (0)

Answers (4)

Answers (4)

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.

Former Member
0 Likes

Hi Youri,

Only for testing purpose you can try to set as well Do Not Use SOAP Envelope, in this way you could check in the monitoring what is the exact response . Have you tried with SOAPui?. It is interesting to know what is the exact response and with this response to find out if there is a data issue or web error and so on.

Regards.

Former Member
0 Likes

I use SOAPUI with MockService.

I see the response :

<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>


If i use "Do Not Use Soap Envelop" i can't use WSDL Definition (Message structure).

Former Member
0 Likes

Hi Youri,

If i use "Do Not Use Soap Envelop" i can't use WSDL Definition (Message structure).

You can use the wsdl. You only need to do an extra mapping, with XSLT for example to wrap (request, XSLT will be the last mapping) and to unwrap (response, XSLT will be the first mapping). The XSLT is really easy to do it, if you have problems, we can help you.


Regards.

Former Member
0 Likes

Ok i used XSLT mapping with

  • my Request (Wrap Soap Envelope)
  • my Response (Unwrap Soap Envelope)
  • my Fault message (Unwrap Soap Envelope)

For Request and Response no-problem, it's ok.

But with Fault message i have an error :

SOAP: Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal

If i use XMBWS.NoSOAPIgnoreStatusCode = true

I have an other error :

Error encountered while executing mapping: com.sap.aii.af.service.mapping.MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_mm_eprior_2_ecc_inboxreq_; Details: com.sap.aii.mappingtool.tf7.IllegalInstanceException; Cannot create target element /ns3:mt_einv_inboxreq_resp. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:772) at ...


MT_EINV_INBOXREQ_RESP = Good response, not fault message ...

For PI if i unwrap SOAP Envelope in Fault message he doesn't see that's a Fault message ? strange no ?

Former Member
0 Likes

No idea ?

The webservice provided by 3rd party does not contain any fault message structure in it, that's why i create my custom XSD ...

Former Member
0 Likes

Ho Youri,

Try to use the parameter XMBWS.NoSOAPIgnoreStatusCode with value true in your SOAP receiver channel: How to capture SOAP fault when using &quot;Do not us... | SCN

By default the SOAP:Fault tags will raise an exception, you can try with that parameter to avoid it.

Regards.

Former Member
0 Likes

I my case i don't use "Do Not Use Soap Envelope".

I try XMBWS.NoSOAPIgnoreStatusCode but always this problem.