Skip to content

Commit

Permalink
Add ability to alter xml before sent vpulim#943
Browse files Browse the repository at this point in the history
Add ability to alter xml before sent vpulim#943
  • Loading branch information
rafal83 authored Jun 25, 2017
1 parent 41982c1 commit b1c3fcb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/client-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,24 @@ var fs = require('fs'),
}, 'https://127.0.0.1:443');
});

it('should have xml request modified', function (done) {
soap.createClient(__dirname + '/wsdl/default_namespace.wsdl', meta.options, function (err, client) {
assert.ok(client);
assert.ok(!err);

client.MyOperation({}, function (err, result) {
assert.ok(result);
assert.ok(client.lastResponseHeaders);
assert.equal(client.lastResponseHeaders.status, 'pass');

done();
}, null, { postProcess: function(_xml) {
return _xml.replace('soap', 'SOAP');
}
});
}, baseUrl);
});

it('should have the correct extra header in the request', function (done) {
soap.createClient(__dirname + '/wsdl/default_namespace.wsdl', meta.options, function (err, client) {
assert.ok(client);
Expand Down

0 comments on commit b1c3fcb

Please sign in to comment.