Skip to content

Commit

Permalink
add lastRequest property for logging soap requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem committed Sep 23, 2012
1 parent 16f0722 commit 69cf7eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Readme.md
Expand Up @@ -154,6 +154,8 @@ An instance of Client is passed to the soap.createClient callback. It is used t
- `namespace` prefix of xml namespace
- `xmlns` URI

### Client.*lastRequest* - the property that contains last full soap request for client logging

## WSSecurity

WSSecurity implements WS-Security. UsernameToken and PasswordText/PasswordDigest is supported. An instance of WSSecurity is passed to Client.setSecurity.
Expand Down
2 changes: 2 additions & 0 deletions lib/client.js
Expand Up @@ -135,6 +135,8 @@ Client.prototype._invoke = function(method, arguments, location, callback) {
"</soap:Body>" +
"</soap:Envelope>";

self.lastRequest = xml;

http.request(location, xml, function(err, response, body) {
if (err) {
callback(err);
Expand Down

0 comments on commit 69cf7eb

Please sign in to comment.