Answer the question
In order to leave comments, you need to log in
How to properly pass parameter string to SOAP?
Good afternoon! Please tell me how to correctly pass parameters in a soap message through nodejs.
I am passing the soap package to
nodejs in the usual way
const str = 'Hello, im string';
client.TestConnect(str, function(err, result, rawResponse, soapHeader, rawRequest) {
console.log(rawRequest);
});
<?xml version="1.0" encoding="utf-8"?><soap:Envelopexmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://tempuri.org/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"><soap:Body><TestConnect xmlns="http://tempuri.org/">Hello, im string</TestConnect></soap:Body></soap:Envelope>
Answer the question
In order to leave comments, you need to log in
If you use the wsdl analysis tools (for example , www.wsdl-analyzer.com ), you can see that the TestConnect method accepts a request in the form
<s11:Envelope xmlns:s11='http://schemas.xmlsoap.org/soap/envelope/'>
<s11:Body>
<ns1:TestConnect xmlns:ns1='http://tempuri.org/'>
<!-- optional -->
<ns1:s>?XXX?</ns1:s>
</ns1:TestConnect>
</s11:Body>
</s11:Envelope>
client.TestConnect({s:str}, function(err, result, rawResponse, soapHeader, rawRequest) {
console.log(rawRequest);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question