I'm trying to call a SOAP method using the node-soap package. My service's WSDL is:
<wsdl:definitions name="PublicoService" targetNamespace="http://tempuri.org/">
<wsdl:import namespace="" location="http://10.10.0.45:56777/Services/PublicoService.svc?wsdl=wsdl0"/>
<wsdl:types/>
<wsdl:binding name="CustomBinding_PublicoService" type="PublicoService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetAllDepartamento">
<soap:operation soapAction="urn:PublicoService/GetAllDepartamento" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
.....
And my client code:
soap.createClient(url, {}, function(err, client) {
client.GetAllDepartamento({}, function(err, result, raw, soapHeader) {
console.log(result);
});
});
The request is made, but I get this Envelope body:
<soap:Body>
<PublicoService_GetAllDepartamento_InputMessage></PublicoService_GetAllDepartamento_InputMessage>
</soap:Body>
Which results in an error, because <PublicoService_GetAllDepartamento_InputMessage>
should be <GetAllDepartamento>
.
I've tried but couldn't change that tag, it's created automatically. Any help?