node-soap icon indicating copy to clipboard operation
node-soap copied to clipboard

invalid message definition for document style binding

Open 0x80 opened this issue 15 years ago • 2 comments

I'm getting this error trying to call one of my services.

AssertionError: invalid message definition for document style binding at [object Object]._invoke (/Users/me/node/node_modules/soap/lib/client.js:97:16) at [object Object].hello (/Users/me/node/node_modules/soap/lib/client.js:63:14) at /Users/me/node/sketches/simpleclient.js:50:9

However when I comment out the assertion... assert.ok(style == 'rpc', 'invalid message definition for document style binding'); ... it works.

I can find no reference to rpc in my wsdl. Any idea what's wrong? Here's the wsdl: http://dl.dropbox.com/u/8165817/media2.wsdl

0x80 avatar Nov 29 '11 11:11 0x80

A related issue is when I am trying to call a method with an object as arguments it is not correctly converted to xml. Instead [object Object] is passed a a string. This seems to be related to the fact that somehow the library things its dealing with rpc style it seems. I just commented out part of the client.js to get it working:

// if (input.parts) {
//     assert.ok(style == 'rpc', 'invalid message definition for document style binding');
//     message = self.wsdl.objectToRpcXML(name, arguments);
//     encoding = 'soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" ';
// }
// else {
    assert.ok(style == 'document', 'invalid message definition for rpc style binding');
    message = self.wsdl.objectToDocumentXML(input.$name, arguments);
//}

0x80 avatar Dec 12 '11 16:12 0x80

fixed in soap >=0.0.9

milewise avatar Dec 15 '11 22:12 milewise