Can’t retrieve all data from soap exception

Home Page Forums BizTalk 2004 – BizTalk 2010 Can’t retrieve all data from soap exception

Viewing 1 reply thread
  • Author
    Posts
    • #23845

      Hi,

      I’m trying to retrieve information from a soap exception.  The webservice returns something like this:

       

      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
      <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>Exception of type QM.Exceptions.QMException was thrown.</faultstring>
      <faultactor>url removed</faultactor>
      <detail>
      <error>1201</error>
      <message>Cannot find group.</message>
      </detail>
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>

      Using the exception object I would like to retrieve the error en message segments.
      soapException.Message + soapException.Detail.InnerXml;

      Return this:

      An error occurred while processing the message, refer to the details section for more information

      Message ID: {7D52DBBB-55DE-4E59-B2A2-451DF262A2B7}

      Instance ID: {4A356227-699A-4DF2-A52C-9B37692B5202}

      Error Description: SoapException: Exception of type QM.Exceptions.QMException was thrown.



      <ns0:NACK Type="NACK" xmlns:ns0="http://schema.microsoft.com/BizTalk/2003/NACKMessage.xsd"><NAckID>{7D52DBBB-55DE-4E59-B2A2-451DF262A2B7}</NAckID><ErrorCode>0xc0c01f07</ErrorCode><ErrorCategory>0</ErrorCategory><ErrorDescription>SoapException:
      Exception of type QM.Exceptions.QMException was thrown.

       </ErrorDescription></ns0:NACK>


      Can anybody tell me how I can access this data:
      <error>1201</error>
      <message>Cannot find group.</message>


      Thanks in advance,

      Bart


    • #23931

      Hi,

       

         I believe you have to build an XmlNode object for the SoapException.Detail property and use an index to query its contents to extract the information you are looking for.

       

         Daniel.

       

      • #24000

        Hi,

         

        Thanks for your answer. I already tried all kinds of ways to retrieve the information from the exception. The exception just doesn’t contain all the data of the soap exception.

         

        Regards,

         

        bart

        • #24188

          I solved this by using Biztalk 2006 R2 and WCF,  in the send port I disabled propagate fault message. Now the full detail field is readable in the exception.

           

          Regards,

           

          Bart

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.