cancel
Showing results for 
Search instead for 
Did you mean: 

RFC->SOAP : Fault message

Former Member
0 Kudos

Hi experts,

May I seek your advice? I have a RFC->SOAP sync setup. The external SOAP will return a fault message like this (seen from SOAPUI) :

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

<S:Body>

<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">

<faultcode>ENT.UPL.008</faultcode>

<faultstring>Invalid User ID/Password.</faultstring>

<detail>

<operationId>660f950d991282034837849</operationId>

</detail>

</S:Fault>

</S:Body>

</S:Envelope>

I need to pass the faultstring back to RFC. But when I view the payload in SXMB_MONI, I only get this :

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

- <!-- Call Adapter

-->

<operationId>9447e643001282034695370</operationId>

It looks like XI is only passing the elements within <detail>.

I read the blog http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6568. [original link is broken] [original link is broken] [original link is broken] But the example fault has sufficient info with the detail segment.

Is there anyway to read and pass the faultstring back to RFC? Thank you!l

Accepted Solutions (1)

Accepted Solutions (1)

VijayKonam
Active Contributor
0 Kudos

If you want to send the SOAP fault to RFC, you would have to create a SOAP message structure and map it from the SOAP fault and use it in your interface mapping.

However, I did not understand why you are not getting the SOAP fault text. It should be reaching PI by default.

VJ

Former Member
0 Kudos

Hi VJ,

Sorry for the late response. Thanks for the info.

I checked OSS note (Note 856597 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 SOAP Adapter) and found something relevant. See next reply.

Is there anyway to retrieve the faultstring into mapping so it can be passed back to the calling RFC in R/3? Appreciate any advise! Thanks!!

Edited by: Hwee Ping Han on Aug 31, 2010 5:53 AM

Former Member
0 Kudos

Extraction rom SAP Note 856597


Q: What should my web service return to the adapter?
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.

HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"

<SOAP:Envelope  xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP:Body>
    <m:GetLastTradePriceResponse xmlns:m="Some-URI">
      <Price>34.5</Price>
    </m:GetLastTradePriceResponse>
  </SOAP:Body>
</SOAP:Envelope>

           will result in an application response message with response payload 

<m:GetLastTradePriceResponse xmlns:m="Some-URI">
  <Price>34.5</Price>
</m:GetLastTradePriceResponse>


HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset="utf-8"

<SOAP:Envelope
  xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP:Body>
    <SOAP:Fault>
      <faultcode>SOAP:MustUnderstand</faultcode>
      <faultstring>SOAP Must Understand Error</faultstring>
    </SOAP:Fault>
  </SOAP:Body>
</SOAP:Envelope>

           will result in a system error message. 


HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset="utf-8"

<SOAP:Envelope
  xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP:Body>
    <SOAP:Fault>
      <faultcode>SOAP:Server</faultcode>
      <faultstring>Server Error</faultstring>
      <detail>
        <e:myfaultdetails xmlns:e="Some-URI">
          <message>My application didn't work</message>
          <errorcode>1001</errorcode>
        </e:myfaultdetails>
      </detail>
    </SOAP:Fault>
  </SOAP:Body>
</SOAP:Envelope>
           will result in an application error message with fault payload 

<e:myfaultdetails xmlns:e="Some-URI">
  <message>My application didn't work</message>
  <errorcode>1001</errorcode>
</e:myfaultdetails>

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try this -

In receiver SOAP channel -> Module tab -> Module configuration -> Add Parameter Name -> "XMBWS.NoSOAPIgnoreStatusCode" -> Parameter Value = true.

Regards,

Neetesh