Re: SOAPAction Woes

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



It still will.
What WS-R says is that there should be an 'Action' element in Header part in
Message.

And the value of this Action element must be same as that of SOAPAction
provided in HTTP-Headers.



--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------


"Zdenek Drlik" <drlik@xxxxxxxxxxxxxxx> wrote in message
news:enr3ul0eGHA.356@xxxxxxxxxxxxxxxxxxxxxxx
RisingFish napsal(a):
Hello Everyone,

I've set up a Webservice, and am trying to use XmlHttpRequest to hit
the service. I keep getting an error stating that I need to specifiy a
SOAPAction, but I am not using a SOAP Message for the initial request.
The XmlHttpRequest object is working fine and I'm using the following
headers:

var url = "http://webserver.company.com/path/service.asmx/method1
var params = "Var1=" + Var1 + "&Var2=" + Var2 + "&Var3=" + Var3;
httpreq.open("POST", url, true);
httpreq.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded")
httpreq.setRequestHeader("Content-Length", params.length)
httpreq.onreadystatechange = handleHttpResponse;
httpreq.send(params);

I know that my company is using SOAP 1.1 and .Net 1.1 on the web
servers. I've set the Web Service up on my local box, and I can
sucessfully call the Web Service using XmlHttpRequest, but my box is
running .Net 2.0 on IIS.

Thanks!

Hello,
try setting RoutingStyle to SoapServiceRoutingStyle.RequestElement on your
web service (in SoapDocumentServiceAttribute - see
http://msdn2.microsoft.com/en-US/library/system.web.services.protocols.soapdocumentserviceattribute.aspx).
After applying this attribute WS should not require SOAPAction HTTP header
in your request.

Zdenek Drlik, MCAD


.



Relevant Pages

  • Re: Authenticate to a Web Service
    ... Short answer you don't have a security header in your request. ... I have to interact with a Web Service exposed by a partner organisation. ... and the 'HEI Course Web Service User' values into the optional third ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: How to call web service with authentication
    ... header, I need to implement the IHeaderHandler interface. ... PROCEDURE IHeaderHandler_WriteHeaders(par_ISoapSerializer AS VARIANT, ... IntelliSense for your XML Web service. ...
    (microsoft.public.fox.helpwanted)
  • Add custom HTTP Header to all Web Service responses
    ... We have a web server farm with several servers hosting web services and I'd ... like to add a custom HTTP header to every web service response so our client ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: prefix in soap header
    ... I need to access to a Web service that implements authorization policy, ... by using a session token to be passed in the SOAP header. ... Is there a way to set the tag prefix for the XMLRootElement of the ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Executing server code
    ... I guess these days (with XMLHttpRequest being so popular) it's ... I wrote an article here about this header but cannot google it out - ... public HTTP specs. ...
    (comp.lang.javascript)