Created
November 22, 2014 17:39
-
-
Save AVGP/630dfafab3c6a67b5bca to your computer and use it in GitHub Desktop.
Demo of node.js SOAP client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var soap = require("soap"); | |
soap.createClient("http://www.w3schools.com/webservices/tempconvert.asmx?WSDL", function(err, client) { | |
if(err) { | |
console.error("Can't create client", err); | |
return; | |
} | |
client.CelsiusToFahrenheit({Celsius: "25"}, function(err, result) { | |
if(err) { | |
console.error("Can't call method", err); | |
return; | |
} | |
console.log(result); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get a really nice error stack while parsing my wsdl:
On the other hand I can parse the same wsdl with soap-attrib, but it then fails to construct the correct request.
I'm currently diffing the two to see if I can fix this, but I'm quite open to ideas since I'm not a SOAP expert, in fact it's my first big adventure with soap services.