I am calling an XML webservice. I am using the following function:
[System.ServiceModel.OperationContractAttribute(Action="http://onlinetools.ups.com/webservices/ShipBinding/v1.0", ReplyAction="*")]
[System.ServiceModel.FaultContractAttribute(typeof(UPS.ShipServiceReference.ErrorDetailType[]), Action="http://onlinetools.ups.com/webservices/ShipBinding/v1.0", Name="Errors", Namespace="http://www.ups.com/XMLSchema/XOLTWS/Error/v1.1")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(ShipmentServiceOptionsType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(CompanyInfoType))]
System.Threading.Tasks.Task<UPS.ShipServiceReference.ShipmentResponse1> ProcessShipmentAsync(UPS.ShipServiceReference.ShipmentRequest1 request);
When there is nothing wrong with the request i have sent the result happily returns a "ShipmentResponse1"
But if there is something wrong with the request I cannot work out how to get to the error details as shown here in Fiddler:
I have wrapped my code in a basic try/catch (Exception ex) but the ex only contains the "faultstring".
I'd like to be able to get to the "PrimaryErrorCode Code and Description" but cannot work out how to do it.
Any help would be greatly appreciated
