Skip to content

Instantly share code, notes, and snippets.

@milewise
milewise / gist:2726844
Created May 18, 2012 18:20
node-soap logging example
var soapServer = soap.listen(httpServer, '/stockquote', service, wsdl);
soapServer.log = function(event, msg) {
console.log(event, msg) };
}
/*
Function: Multiply
Multiplies two integers.
Parameters:
x - The first integer.
y - The second integer.
var soap = require('soap');
var wsdl = 'http://www.soapclient.com/xml/SQLDataSoap.WSDL';
soap.createClient(wsdl, function(err, client) {
if (err) {
console.log(err.stack);
return;
}
else {
var mongode = require('mongode');
var db = mongode.connect('testdb', 'localhost');
db.collection('test', function(err) {
var x = { "a" : 5, "b" : 6}
db.test.insert(x);
console.log(x);
});
var mongode = require('mongode');
var db = mongode.connect('testdb', 'localhost');
db.collection('test');
setTimeout(function() {
var x = { "a" : 5, "b" : 6}
db.test.insert(x);
console.log(x);