Hey all, I am building a site with meteor and I am having an issue with setting up a connection to sertifi.com using their SOAP api. I am new to js and even newer to meteor so I’m having a hard time deciphering the wsdl and how to use it. I could use some help with this if anyone has done this before.
If you are on 1.2, this is my basic setup:
Use the meteorhacks:npm
package, and in your packages.json (I haven’t used/tested the newer releases of these npm packages):
{
"soap" : "0.12.0",
"fibers" : "1.0.9"
}
In Meteor.startup (or your method):
Future = Meteor.npmRequire('fibers/future');
Soap = Meteor.npmRequire('soap');
Then, your function/method looks like:
var future = new Future();
Soap.createClient(someURL, function (err, client) {
if (err) {
future.return(err);
}
else {
client.someFunction, function (error, result) {
if (error) {
console.log(error);
future.return(error);
}
else {
console.log(result);
future.return(result);
}
});
}
});
return future.wait();
Of course, this is just a boilerplate, but the basic idea is there…
https://www.npmjs.com/package/fibers
https://www.npmjs.com/package/soap
1 Like
Thanks, I will look into this more and see if I can get some data flowing.