cancel
Showing results for 
Search instead for 
Did you mean: 

Axis adapter receiver handle fault message

Former Member
0 Kudos

Hi

We have a Sync interface which makes a Proxy call from ECC to PI 7.3 and then PI makes Soap(Axis) Sync call to Web sevice. We are having issues when handling SOAP 1.2 fault message.

Below is the actual fault response from Webserver:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

   <env:Header/>

   <env:Body>

      <env:Fault>

         <env:Code>

            <env:Value>env:Receiver</env:Value>

         </env:Code>

         <env:Reason>

            <env:Text xml:lang="en">FaultMsg</env:Text>

         </env:Reason>

         <env:Detail>

            <ns2:servicefault xmlns:ns2="https://hostname.de/webservice/0400-0005">

            </ns2:servicefault>

         </env:Detail>

      </env:Fault>

   </env:Body>

</env:Envelope>

But PI receives this response like system error:

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

- <!--  Inbound Message

  -->

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

  <SAP:Category>XIAdapterFramework</SAP:Category>

  <SAP:Code area="MESSAGE">GENERAL</SAP:Code>

  <SAP:P1 />

  <SAP:P2 />

  <SAP:P3 />

  <SAP:P4 />

  <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: FaultMsg</SAP:AdditionalText>

  <SAP:Stack />

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

  </SAP:Error>

I checked this way http://scn.sap.com/thread/1675917 but it doesn't fit for Axis adapter.

Please let me for any clues how to handle this fault response.

Regards, Dzmitry

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Solved, Please check Note 1866124 - PI Axis receiver is not processing correctly SOAP.

0 Kudos

Hi Dzmitry,

We are stuck with a similar problem. Can you please elaborate how the problem got solved, what setting did you use in the SOAP adapter, etc ?

Former Member
0 Kudos

Hi,

   I used settings for SOAP adapter the same as in faq_axis_adapter and 1866124 Note should add handler correction in standard implementation.

Regards, Dzmitry

Former Member
0 Kudos

There is an update for this note?

I have the same issue but the note do not supports my SAP PI version 7.11 SP 15

Former Member
0 Kudos

Hi,

I recommend to open a ticket and to request a downport.

BR,

Eugen

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I'm working with Dzmitry on the issue since last week. After analyzing the implementation and checking some SAP notes I came to the following conclusion:

According to note 856597 the fault behavior of axis adapter is  as follows:

" A: The receiver adapter expects a SOAP message as response. For

synchrnous calls, a successful response should be returned with

HTTP 200. In this case, the content of the SOAP body will be

returned to the caller as the response payload. When some error

occurs, the SOAP message may contain the SOAP fault element. In

this case, when the fault detail element is not empty, its

content will be returned as the fault payload in an application

error message. For others, a system error message will be

returned to the caller."

The example shows a SOAP 1.1 fault message with a "detail" node being mapped to an application fault.

As we are using SOAP 1.2 the namespace as well as structure of the fault defers. I assume that the module responsible for the transformation from AXIS message to XI message within the module chain does not recognize the detail node on out soap 1.2 fault.

Therefore the solution would be to insert a custom AXIS handler before com.sap.aii.axis.xi.XI30OutboundHandle mapping the soap 1.2 fault to a soap 1.1 fault.

Is there something like a short how to on how to implement Axis handler and how to deploy it. Sap help only says to package it into sda file....

Thanks a lot  in advance!!!

BR,

Eugen

nabendu_sen
Active Contributor
0 Kudos

Hi Dzmitry,

I think your Fault message mapping is failing and for that you are getting the above Messaging exception. You can use Java mapping to remove Soap Envelope (as you are using do not use SOAP Envelope).

Former Member
0 Kudos

Hi, First of all thank you for quick reply. I used XSLT mapping for remove Soap Envelope but unsuccessful, I got same result. I did detail traces in xpi_inspector no mapping error.

smavachee
Active Contributor
0 Kudos

Can you check this thread once, it may help you.

Regards,

Sunil

Former Member
0 Kudos

Thanks for replay, I tried to use  mapping from link and I got next error: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Validation error.

Former Member
0 Kudos

Yes, because you have to change namespace's references:

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

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

     <xsl:template match="/">

     <ns0:Fault xmlns:ns0="https://hostname.de/webservice/0400-0005">

          <ns0:error><xsl:value-of select="*"/></ns0:error>

     </ns0:Fault>

     </xsl:template>

</xsl:stylesheet>

Former Member
0 Kudos

I changed namespace but unfortunately same result.I think reason not in mapping program. I checked in SOAP UI I got next message:

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

   <env:Header/>

   <env:Body>

      <env:Fault>

         <env:Code>

            <env:Value>env:Sender</env:Value>

         </env:Code>

         <env:Reason>

            <env:Text xml:lang="en">Validation error</env:Text>

         </env:Reason>

         <env:Detail>

            <tns:validationfault xmlns:tns="https://hostname.de/webservice/0400-0005">cvc-pattern-valid: Value 'Constant' is not facet-valid with respect to pattern '[1-9][0-9]{11}' for type 'Tuseraccount'.

cvc-type.3.1.3: The value 'Constant' of element 'ns0:useraccount' is not valid.</tns:validationfault>

         </env:Detail>

      </env:Fault>

   </env:Body>

</env:Envelope>

And error message is:

com.sap.engine.interfaces.messaging.api.exception.MessagingException: Validation error

Adapter handled message as error with text form tag <env:Text xml:lang="en">Validation error</env:Text> but didn't see tag <env:Detail>.

Former Member
0 Kudos

Any suggestions?