Skip to Content
avatar image
Former Member

How to capture SOAP fault when using "Do not use SOAP envelope" parameter

I have exactly the problem described in this thread

how-to-capture-soap-fault-when-using-do-not-use-so

Because this thread is 2 years old and I'm not the thread owner I start a new thread. đŸ˜‰

My actual problem is that I have to manipulate the header of my request (insert authentication information). That's why I use a solution as Bhavesh explained it here at post 3:

Reading, Writing and manipulating SOAP headers in ccBPM

All works fine as long I get regular answers from the web service. But I get problems if I receive a soap fault. This causes a system error at the adapter framework and not an application error. I'm not to handle this with a XSLT Mapping like at the normal case.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    May 03, 2010 at 04:00 PM

    Hi Gil,

    my solution:

    In a similar case I have created my own SOAP response message (XSD as an external definition) instead of using the response message provided by the WSDL.

    I have married the "normal" response and the fault response into one message by defining all fields as optional. The envelope and the header is allways the same one.

    So I can receive the response and the fault messages with only one target messages.

    Cheers,

    André

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 17, 2010 at 10:06 PM

    Hi,

    If you are not calling a REST based non-SOAP service, you shouldn't be using the "do not use soap envelope" mode.

    As its name implies, this option is apparently for calling some non-soap services that do not require the soap envelope. So, your requirement of being able to handle the soap faults contradicts its use case.

    If you are calling a soap based service that requires some static or variable soap headers, you can use the axis adapter. Without any code development, you can insert or extract arbitrary soap headers in your soap envelope.

    Regards, Yza

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Gil,

      I am sorry for not being able to reply earlier.

      I just replied to your other thread that you were referring to from this thread.

      To solve your problem, you need to use just the value property and not the name and namespace properties so that the value property is interpreted as the whole element.

      If you set the name and namespace properties, the value property will be interpreted as the character content of that element.

      For example, setting value.1 to

      <m:AuthenticationInfo xmlns:m="urn:Wsvc_Sap_CiList">

      <m:userName></m:userName><m:password></m:password></m:AuthenticationInfo>

      will allow you to replace the user and password values dynamically with the context values set in arguments.1.

      A similar scenario is described in the axis adapter FAQ note.

      Regards, Yza

  • avatar image
    Former Member
    Jun 08, 2010 at 11:19 AM

    Hi,

    We are getting a server level SOAP fault message.This is failing in MONI.We would like to capture this fault message and identify due to which source payload this fault has occured.

    Please let us know what are all the parameters in sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean

    as XMBWS.NoSOAPIgnoreStatusCode = true XMBWS.Timeout which can be used to capture fault with out errors in MONI.

    Meanwhile we will test with XMBWS.NoSOAPIgnoreStatusCode and update.

    Thanks in advance,

    http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">

    <sap:Category>XIAdapter</sap:Category>

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

    http://schemas.xmlsoap.org/soap/envelope/>

    <sap:P2>Server</sap:P2>

    <sap:AdditionalText>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Xml.XmlException: The root element is missing. at System.Xml.XmlTextReader.Read() at System.Xml.XmlReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocolHelper.GetHelper(SoapServerProtocol protocol) at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.Invoke() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest() --- End of inner exception stack trace ---</sap:AdditionalText>

    </sap:Error>

    http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1" />

    - http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">

    - <sap:Hop timeStamp="2010-06-05T06:34:21Z" wasRead="false">

    <sap:Engine type="AE">af.p06.vp06cs01</sap:Engine>

    XIRAhttp://sap.com/xi/XI/System">XIRA>

    <sap:MessageId>5ff588f0-706c-11df-89aa-00145ec6257e</sap:MessageId>

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 08, 2010 at 11:26 AM

    Hi,

    We are getting a server level SOAP fault message.This is failing in MONI.We would like to capture this fault message and identify due to which source payload this fault has occured.

    Please let us know what are all the parameters in sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean

    as XMBWS.NoSOAPIgnoreStatusCode = true XMBWS.Timeout which can be used to capture fault with out errors in MONI.

    Meanwhile we will test with XMBWS.NoSOAPIgnoreStatusCode and update.

    Thanks in advance,

    -


    http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">

    <sap:Category>XIAdapter</sap:Category>

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

    http://schemas.xmlsoap.org/soap/envelope/>

    <sap:P2>Server</sap:P2>

    <sap:AdditionalText>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Xml.XmlException: The root element is missing. at System.Xml.XmlTextReader.Read() at System.Xml.XmlReader.MoveToContent() at System.Web.Services.Protocols.SoapServerProtocolHelper.GetHelper(SoapServerProtocol protocol) at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.Invoke() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest() --- End of inner exception stack trace ---</sap:AdditionalText>

    </sap:Error>

    http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1" />

    - http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">

    - <sap:Hop timeStamp="2010-06-05T06:34:21Z" wasRead="false">

    <sap:Engine type="AE">af.p06.vp06cs01</sap:Engine>

    XIRAhttp://sap.com/xi/XI/System">XIRA>

    <sap:MessageId>5ff588f0-706c-11df-89aa-00145ec6257e</sap:MessageId>

    Add comment
    10|10000 characters needed characters exceeded