Skip to content

Commit

Permalink
Merge pull request #1 from mcasella/master
Browse files Browse the repository at this point in the history
Updates for gamefly
  • Loading branch information
sbellone committed Feb 16, 2015
2 parents e547425 + 7349b04 commit 3865c34
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
21 changes: 14 additions & 7 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* MIT Licensed
*/

var soapNamespacePrefix = "soap";

function findKey(obj, val) {
for (var n in obj) if (obj[n] === val) return n;
}
Expand Down Expand Up @@ -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 = "<soap:Envelope " +
"xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " +

xml = "<"+soapNamespacePrefix+":Envelope " +
"xmlns:"+soapNamespacePrefix+"=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
encoding +
this.wsdl.xmlnsInEnvelope + '>' +
"<soap:Header>" +
"<"+soapNamespacePrefix+":Header>" +
(self.soapHeaders ? self.soapHeaders.join("\n") : "") +
(self.security ? self.security.toXML() : "") +
"</soap:Header>" +
"<soap:Body>" +
"</"+soapNamespacePrefix+":Header>" +
"<"+soapNamespacePrefix+":Body>" +
message +
"</soap:Body>" +
"</soap:Envelope>";
"</"+soapNamespacePrefix+":Body>" +
"</"+soapNamespacePrefix+":Envelope>";

self.lastRequest = xml;

Expand Down Expand Up @@ -164,3 +167,7 @@ Client.prototype._invoke = function(method, arguments, location, callback, optio
}

exports.Client = Client;

exports.setNamespacePrefix = function(newPrefix) {
soapNamespacePrefix = newPrefix;
};
1 change: 1 addition & 0 deletions lib/soap.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,4 @@ exports.createClient = createClient;
exports.passwordDigest = passwordDigest;
exports.listen = listen;
exports.WSDL = WSDL;
exports.setNamespacePrefix = require('./client').setNamespacePrefix;
1 change: 1 addition & 0 deletions lib/wsdl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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};
}

Expand Down

0 comments on commit 3865c34

Please sign in to comment.