internal HttpStatusCode SetResponseErrorCode(HttpResponse response, SoapException soapException)
 {
     if ((soapException.SubCode != null) && (soapException.SubCode.Code == Soap12FaultCodes.UnsupportedMediaTypeFaultCode))
     {
         response.StatusCode = 0x19f;
         soapException.ClearSubCode();
     }
     else if (SoapException.IsClientFaultCode(soapException.Code))
     {
         System.Web.Services.Protocols.ServerProtocol.SetHttpResponseStatusCode(response, 500);
         for (Exception exception = soapException; exception != null; exception = exception.InnerException)
         {
             if (exception is XmlException)
             {
                 response.StatusCode = 400;
             }
         }
     }
     else
     {
         System.Web.Services.Protocols.ServerProtocol.SetHttpResponseStatusCode(response, 500);
     }
     response.StatusDescription = HttpWorkerRequest.GetStatusDescription(response.StatusCode);
     return((HttpStatusCode)response.StatusCode);
 }
 internal override void SetResponseErrorCode(HttpResponse response, SoapException soapException)
 {
     if (soapException.Subcode != null && soapException.Subcode.Code == Soap12FaultCodes.UnsupportedMediaTypeFaultCode)
     {
         response.StatusCode        = (int)HttpStatusCode.UnsupportedMediaType;
         response.StatusDescription = Res.GetString(Res.WebUnsupportedMediaTypeStatusDescription);
         soapException.ClearSubcode();
     }
     else if (SoapException.IsClientFaultCode(soapException.Code))
     {
         response.StatusCode        = (int)HttpStatusCode.BadRequest;
         response.StatusDescription = Res.GetString(Res.WebBadRequestStatusDescription);
     }
     else
     {
         response.StatusCode        = (int)HttpStatusCode.InternalServerError;
         response.StatusDescription = Res.GetString(Res.WebRequestErrorStatusDescription);
     }
 }