diff --git a/lib/client.js b/lib/client.js index 80597692c..c50a08c9d 100755 --- a/lib/client.js +++ b/lib/client.js @@ -3,6 +3,8 @@ * MIT Licensed */ +var soapNamespacePrefix = "soap"; + function findKey(obj, val) { for (var n in obj) if (obj[n] === val) return n; } @@ -123,18 +125,19 @@ Client.prototype._invoke = function(method, arguments, location, callback, optio assert.ok(!style || style == 'document', 'invalid message definition for rpc style binding'); message = self.wsdl.objectToDocumentXML(input.$name, arguments, input.targetNSAlias, input.targetNamespace); } - xml = "' + - "" + + "<"+soapNamespacePrefix+":Header>" + (self.soapHeaders ? self.soapHeaders.join("\n") : "") + (self.security ? self.security.toXML() : "") + - "" + - "" + + "" + + "<"+soapNamespacePrefix+":Body>" + message + - "" + - ""; + "" + + ""; self.lastRequest = xml; @@ -164,3 +167,7 @@ Client.prototype._invoke = function(method, arguments, location, callback, optio } exports.Client = Client; + +exports.setNamespacePrefix = function(newPrefix) { + soapNamespacePrefix = newPrefix; +}; \ No newline at end of file diff --git a/lib/soap.js b/lib/soap.js index e99411543..f401fad98 100755 --- a/lib/soap.js +++ b/lib/soap.js @@ -150,3 +150,4 @@ exports.createClient = createClient; exports.passwordDigest = passwordDigest; exports.listen = listen; exports.WSDL = WSDL; +exports.setNamespacePrefix = require('./client').setNamespacePrefix; \ No newline at end of file diff --git a/lib/wsdl.js b/lib/wsdl.js index ee4135022..ede7f398a 100755 --- a/lib/wsdl.js +++ b/lib/wsdl.js @@ -747,6 +747,7 @@ WSDL.prototype.xmlToObject = function(xml) { refs[id].hrefs.push({par:top.object,key:name,obj:obj}); } if(id=attrs.id) { + obj = id; //Gamefly update to get id attribute returned if(!refs[id]) refs[id] = {hrefs:[],obj:null}; }