Error :-Unable to handle request without a valid action parameter.

Discussion in 'ASP .Net Web Services' started by Ram Krishna Tripathi, Apr 27, 2006.

  1. Hello Friends,

    I have made a small webservice.Webservice in working well.
    I have a created a small webapplication program.
    In it i have added a command button.
    In the click event of command button , I am passing the input of webservice
    in the SOAP envelope then it gives the soap fault in objHTTP.responseText()
    in webapplication.
    Soap fault and webapplication code are given at end.
    So please tell me what could be reason for it.

    Ram Krishna Tripathi


    ==
    Web application code is as follows:-

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles Button1.Click
    Dim objHTTP As New MSXML.XMLHTTPRequest
    Dim strEnvelope As String
    Dim strReturn As String
    Dim objReturn As New MSXML.DOMDocument
    Dim dblTax As Double
    Dim strQuery As String

    'Create the SOAP Envelope
    strEnvelope = _
    "<soap:Envelope
    xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
    xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
    xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & _
    "<soap:Body>" & _
    "<soap_web xmlns=""http://localhost/WebService1/Service1"">"
    & _
    "<variable>" + "hestring" + "</variable>" & _
    "</soap_web>" & _
    "</soap:Body>" & _
    "</soap:Envelope>"
    'Set up to post to our local server
    objHTTP.open("post", "http://localhost/WebService1/Service1.asmx",
    False)
    'Set a standard SOAP/ XML header for the content-type
    objHTTP.setRequestHeader("Content-Type", "text/xml")
    ' Response.Write()
    'Set a header for the method to be called
    objHTTP.setRequestHeader("SOAPMethodName",
    "urn:tempuri.org/WebService1/Service1.asmx?op=soap_web")
    'Make the SOAP call
    objHTTP.send(strEnvelope)
    'Get the return envelope
    TextBox1.Text = objHTTP.responseText()
    'Load the return envelope into a DOM
    objReturn.loadXML(strReturn)
    '/*'Query the return envelope
    Try
    strQuery = _
    "SOAP:Envelope/SOAP:Body/soap_webResponse/soap_web"
    TextBox1.Text = objReturn.selectSingleNode(strQuery).text

    Catch ex As Exception

    End Try
    ' Debug.Print(TextBox1.Text)
    End Sub
    End Class

    =========
    soap fault
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <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.Soap11ServerProtocolHelper.RouteRequest()
    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
    at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type,
    HttpContext context, HttpRequest request, HttpResponse response)
    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>
    ===

    webservice function is:--

    <WebMethod(Description:="DESCRIBING soap")> _
    Public Function soap_web(ByVal variable As String) As String
    Try
    Return "VARIABLE"
    Catch ES As Exception
    End Try
    End Function
     
    Ram Krishna Tripathi, Apr 27, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    1,506
    Barry Schwarz
    Nov 24, 2007
  2. Hiten
    Replies:
    0
    Views:
    403
    Hiten
    Apr 30, 2008
  3. Hiten
    Replies:
    0
    Views:
    396
    Hiten
    Apr 30, 2008
  4. frmo
    Replies:
    0
    Views:
    268
  5. Tauqir
    Replies:
    3
    Views:
    115
    Tauqir
    Aug 5, 2005
Loading...

Share This Page