4

I am getting this error. When i call the c# WebService using HttpWebRequest.

System.Web.Services.Protocols.SoapException: Unable to handle request without a valid action parameter. Please supply a valid soap action.

from wsdl i found the soap action and i added in the request, still it is showing the error

HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://localhost:33333/AccountService.asmx");
request.Method = "POST";
request.ContentType = "text/xml";
request.Accept = "text/xml";
request.Headers.Add("SOAPAction", "https://ttt/test.aspx"

Thanks

2
  • 2
    Did you try "supply[ing] a valid soap action"? Jan 20, 2012 at 6:10
  • 1
    We need to see more code. How are you calling the service? What method are you calling and what parameters are you passing in?
    – tobias86
    Jan 20, 2012 at 6:11

2 Answers 2

4

The action is specified by the url you post the soap envelope to. Chances are the url either has a typo or you are trying to execute an action that the SOAP service doesn't understand. Check the WSDL for the service and make sure you are calling the proper action.

2
request.Headers.Add("SOAPAction", "https://ttt/test.aspx/methodname")

Method name should be specified after 'test.aspx/' in above URL.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.