none
SOAP based Web service (framework 3.5) RRS feed

  • Question

  • Hi,

           I made a web service which consist 5 method which uses same URL. My service is soap based and calling process is by using poster. i post request xml in postman with service url. According to request xml mapped method will call. my question is :
          When i post invalid xml to post man with service url, service return soap fault exception in postman response i want to customize fault message and for each type post message, service should return an customize error message. any one please help me thanks.



    Thursday, August 20, 2015 1:35 PM

All replies

  • Thanks for giving Useful reply . but if i post invalid xml(Ex. some xml tags missing) in poster. in that case my web service method do not call so there is no mean if i apply try catch in service method write????

    my service return soap fault for ex. 

    <soap:Envelope >
        <soap:Body>
            <soap:Fault>
                <faultcode>soap:Client</faultcode>
                <faultstring>System.Web.Services.Protocols.SoapException: Unable to handle request without a valid action parameter. Please supply a valid soap action.
       at System.Web.Services.Protocols.Soap12ServerProtocolHelper.RouteRequest()
       at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
       at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
       at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean&amp; abortProcessing)</faultstring>
                <detail />
            </soap:Fault>
        </soap:Body>
    </soap:Envelope>

    i want this Response should be customize. thanks

    Thursday, August 20, 2015 3:52 PM
  • Thanks for giving Useful reply . but if i post invalid xml(Ex. some xml tags missing) in poster. in that case my web service method do not call so there is no mean if i apply try catch in service method write????

    my service return soap fault for ex. 

    <soap:Envelope >
        <soap:Body>
            <soap:Fault>
                <faultcode>soap:Client</faultcode>
                <faultstring>System.Web.Services.Protocols.SoapException: Unable to handle request without a valid action parameter. Please supply a valid soap action.
       at System.Web.Services.Protocols.Soap12ServerProtocolHelper.RouteRequest()
       at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
       at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
       at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean&amp; abortProcessing)</faultstring>
                <detail />
            </soap:Fault>
        </soap:Body>
    </soap:Envelope>

    i want this Response should be customize. thanks


    Issue should be addressed over there ----->   http://forums.asp.net/28.aspx/1?WCF+ASMX+and+other+Web+Services
    Thursday, August 20, 2015 4:06 PM
  • Thanks
    Thursday, August 20, 2015 4:10 PM