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 informationMessage 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
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."
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
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.
Bart