public ServiceResultException HandleSoapFault(System.ServiceModel.FaultException<ServiceFault> exception)
{
if (exception == null || exception.Detail == null || exception.Detail.ResponseHeader == null)
{
return ServiceResultException.Create(StatusCodes.BadUnexpectedError, exception, "SOAP fault did not contain any details.");
}
ResponseHeader header = exception.Detail.ResponseHeader;
return new ServiceResultException(new ServiceResult(
header.ServiceResult,
header.ServiceDiagnostics,
header.StringTable));
}
#endregion