Published on WSO2 Oxygen Tank (http://wso2.org)

How to call SOAP 1.1 service without empty soapAction in WSDL?

By fadongle
Created 2008-03-18 21:44

I am using Mashup Server to wrap web service from XPlanner 0.7b7. However the wsdl generated by XPlanner does not have a soapAction name in it. I extract the snippet from wsdl as following:

 

<wsdl:operation name="getProjects">
<wsdlsoap:operation soapAction=""/>
    <wsdl:input name="getProjectsRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soap.xplanner.technoetic.com" use="encoded"/>
</wsdl:input>
    <wsdl:output name="getProjectsResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://atsg249.lss.emc.com/xplanner/soap/XPlanner" use="encoded"/>
</wsdl:output>
</wsdl:operation>

 

I encounter difficulty in calling such service since following ECMAscript totally does not work. The response equals to 2 instead of 4.

 

var xplannerService = new WSRequest();
var options = new Array();
options.useSOAP = 1.1;
options.HTTPMethod = "POST";
options.useWSA = 1.0;
options.action = "http://localhost:7070/soap/XPlanner?method=getProjects";
var endpoint = "http://localhost:7070/soap/XPlanner";
var payload = "<getProjectsRequest/>";
try {
  xplannerService.open(options, endpoint, false,"sysadmin","admin");
  xplannerService.send(payload);
  var response = xplannerService.readyState;
  return response;
} catch (e) {
    print(e);
}

 

I suspect that it is because the empty soapAction value in XPlanner's wsdl, but have not proved it. Does anyone have idea of how to call a web service without soapAction given in the WSDL?


Source URL:
http://wso2.org/forum/thread/3387