cancel
Showing results for 
Search instead for 
Did you mean: 

Getting SOAPAction error

SOLVED
francisco_garci
Occasional Contributor

Getting SOAPAction error

Hi,

 

I'm trying to execute methods from our web services using javascript, but I'm getting the error on the response:

 

<script>// function writeContent(){ var c = document.getElementById("container"); c[("innerText" in c) ? "innerText" : "textContent"] = document.getElementById("dataIsland").innerHTML; }window.onload = writeContent; // </script> soap:ClientSystem.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.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& abortProcessing)

<?xml version="1.0"?>
<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><faultstr... 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.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>
 
I tried using the following line: 
 
 XmlHttpRequest.setRequestHeader("SOAPAction", "http://skywards.com/Mercator.CRIS.WS/GetCorporateProfile");
 
but if I add the line, I get the following error:
 
<script>// function writeContent(){ var c = document.getElementById("container"); c[("innerText" in c) ? "innerText" : "textContent"] = document.getElementById("dataIsland").innerHTML; }window.onload = writeContent; // </script> soap:ClientSystem.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://skywards.com/Mercator.CRIS.WS/GetCorporateProfile. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message) 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& abortProcessing)
<?xml version="1.0"?>
<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><faultstr... Server did not recognize the value of HTTP Header SOAPAction: http://skywards.com/Mercator.CRIS.WS/GetCorporateProfile.
   at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
   at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
   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>
 
Can you guys please help out?
1 ACCEPTED SOLUTION

Accepted Solutions
francisco_garci
Occasional Contributor

Re: Getting SOAPAction error

Alex,

 

I rechecked my code, and I noticed it was making the requests to a wrong WSDL. Thank you for your help. Lets close this one.

View solution in original post

4 REPLIES 4
AlexKaras
Community Hero

Re: Getting SOAPAction error

Hi,

 

Basically, the error means that the web service did not recognize the requested action and replied with some error text to the client.

If the web service is the same as in the http://community.smartbear.com/t5/Functional-Web-Testing/Cannot-assign-an-object-to-a-variant-array-... thread, then I could take a look. Otherwise, again, either the url of th web service or the contents of the WebServices folder of the test project is needed.

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
francisco_garci
Occasional Contributor

Re: Getting SOAPAction error

Hi Alex,

 

This is a whole different WSDL, so let me elaborate so you can get the whole picture. We have a Web Service Aplication server, which contains 3 different WSDLs and I currently have two issues with 2 of them:

 

- First issue, the web methods that use arrays, wont create objects inside each entry of the array. I used the code that Test Complete generates.

 

- Second issue, the web methods of one WSDL in particular, when the request is sent, the response contains a SOAP fault error that asks for a SOAP Action. The code used to construct, send and recieve the response is the same I use for the other 2 WSDLs tests.

 

For this thread in particular, my issue is with the SOAP Fault error asking for a SOAP Action. I can share with you the URL of the 3 WSDLs so you can take a look and identify either something that is missing from my code or other issues. I know this is maybe something hard to solve, but I currently have tried everything and I cant seem to find a solution. Please let me know how can I share the WSDLs with you.

 

Thanks in advance.

 

AlexKaras
Community Hero

Re: Getting SOAPAction error

Hi,

 

Thank you for the additional explanation - it might help.

 

> Please let me know how can I share the WSDLs with you.

 

The same way like for http://community.smartbear.com/t5/Functional-Web-Testing/Cannot-assign-an-object-to-a-variant-array-... (unless it does not work for you for some reason, then we'll find out some other way).

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
francisco_garci
Occasional Contributor

Re: Getting SOAPAction error

Alex,

 

I rechecked my code, and I noticed it was making the requests to a wrong WSDL. Thank you for your help. Lets close this one.

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors