BizTalk Gurus

Can't retrieve all data from soap exception

rated by 0 users
Not Answered This post has 0 verified answers | 3 Replies | 2 Followers

Top 500 Contributor
5 Posts
Bart posted on Fri, Dec 4 2009 10:09 AM

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


All Replies

Top 10 Contributor
241 Posts
xman71 replied on Fri, Dec 18 2009 10:41 AM

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.

 

"Google skills are more important than your coding skills."

replied on Tue, Jan 5 2010 5:58 AM

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

Top 500 Contributor
5 Posts
Bart replied on Wed, Feb 3 2010 3:27 AM

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

Page 1 of 1 (4 items) | RSS