Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Can’t retrieve all data from soap exception
- This topic has 3 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
December 4, 2009 at 10:09 AM #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 -
December 18, 2009 at 10:41 AM #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.
-
January 5, 2010 at 5:58 AM #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
-
February 3, 2010 at 3:27 AM #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
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.