Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
Hi Team,
We are using third party wcf webservices. In this process, i have exceptions being returned. The fault exception always shows a generic error. But when i reviewed the message log, i found that the actual error is being returned in the header part of the Saop message. Below is the soap response message

<pre lang="xml">

<MessageLogTraceRecord>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://tempuri.org/KDKShipmentProcessService/readAifFaultFault</a:Action>
<a:RelatesTo>urn:uuid:73bcdb2a-9745-43ee-9058-2a485920e7c8</a:RelatesTo>
<Infolog xmlns="Infolog" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<InfologMessage xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Dynamics.AX.Framework.Services">
<InfologMessageType>Error</InfologMessageType>
<Message>Invalid shipment id.</Message>
</InfologMessage>
</Infolog>
<a:To s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/anonymous</a:To>
</s:Header>
<s:Body>
<s:Fault>
<s:Code>
<s:Value>s:Sender</s:Value>
</s:Code>
<s:Reason>
<s:Text xml:lang="en-US">Request Failed. See the Exception Log for details.</s:Text>
</s:Reason>
<s:Detail>
<AifFault xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Fault" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<CustomDetailXml i:nil="true"></CustomDetailXml>
<FaultMessageListArray i:nil="true"></FaultMessageListArray>
<InfologMessageList i:nil="true" xmlns:b="http://schemas.datacontract.org/2004/07/Microsoft.Dynamics.AX.Framework.Services"></InfologMessageList>
<StackTrace i:nil="true"></StackTrace>
<XppExceptionType>3</XppExceptionType>
</AifFault>
</s:Detail>
</s:Fault>
</s:Body>
</s:Envelope>
</MessageLogTraceRecord>




I need to get the error "Invalid Shipment id." in the catch block instead of "Request Failed. See the Exception Log for details.". Please help.

Regards,
Ravi teja Ravuri
raviteja9992000@gmail.com
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900