Comparing version 0.21.0 to 0.22.0
@@ -0,0 +0,0 @@ # Contribution Guidelines |
@@ -0,1 +1,12 @@ | ||
0.22.0 / 2017-10-02 | ||
=================== | ||
* [ENHANCEMENT] Added `forever` option to `ClientSSLSecurity` in order to allow `keep-alive` connections. (#974) | ||
* [ENHANCEMENT] Added `preserveWhitespace` option to prevent the client from trimming resolved `String` values. (#972) | ||
* [MAINTENANCE] Removed `compres` dependency in favor of `zlib`. (#971) | ||
* [MAINTENANCE] (Security) Updated `debug` dependency to avoid possible vulnerability. (#973) | ||
* [FIX] Updated `.travis.yml` to test against latest `node.js 4.8.x` release to avoid Travis CI error. | ||
* [FIX] Fix performance bug at POJO to XML conversion. (#968) | ||
* [ENHANCEMENT] Added possibility to override the `bluebird.js` suffix (default: "async"). (#961) | ||
* [DOC] Updated the `Security` section by listing all available optional methods. (#966) | ||
0.21.0 / 2017-08-28 | ||
@@ -2,0 +13,0 @@ =================== |
"use strict"; | ||
module.exports = require('./lib/soap'); |
@@ -27,3 +27,4 @@ /* | ||
this.httpClient = options.httpClient || new HttpClient(options); | ||
BluebirdPromise.promisifyAll(this); | ||
var suffixOption = options.overridePromiseSuffix ? { suffix: options.overridePromiseSuffix } : null; | ||
BluebirdPromise.promisifyAll(this, suffixOption); | ||
}; | ||
@@ -129,2 +130,3 @@ util.inherits(Client, events.EventEmitter); | ||
this.wsdl.options.envelopeKey = options.envelopeKey || 'soap'; | ||
this.wsdl.options.preserveWhitespace = !!options.preserveWhitespace; | ||
if(options.ignoredNamespaces !== undefined) { | ||
@@ -131,0 +133,0 @@ if(options.ignoredNamespaces.override !== undefined) { |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -51,2 +51,4 @@ 'use strict'; | ||
_.merge(this.defaults, defaults); | ||
this.agent = null; | ||
} | ||
@@ -59,2 +61,4 @@ | ||
ClientSSLSecurity.prototype.addOptions = function(options) { | ||
var httpsAgent = null; | ||
options.key = this.key; | ||
@@ -64,5 +68,18 @@ options.cert = this.cert; | ||
_.merge(options, this.defaults); | ||
options.agent = new https.Agent(options); | ||
if (!!options.forever) { | ||
if (!this.agent) { | ||
options.keepAlive = true; | ||
this.agent = new https.Agent(options); | ||
} | ||
httpsAgent = this.agent; | ||
} else { | ||
httpsAgent = new https.Agent(options); | ||
} | ||
options.agent = httpsAgent; | ||
}; | ||
module.exports = ClientSSLSecurity; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -21,3 +21,3 @@ /* | ||
var url = require('url'), | ||
compress = null, | ||
zlib = null, | ||
events = require('events'), | ||
@@ -28,3 +28,3 @@ util = require('util'), | ||
try { | ||
compress = require("compress"); | ||
zlib = require("zlib"); | ||
} catch (error) { | ||
@@ -192,20 +192,15 @@ } | ||
var chunks = [], gunzip; | ||
if (compress && req.headers["content-encoding"] === "gzip") { | ||
gunzip = new compress.Gunzip(); | ||
gunzip.init(); | ||
var chunks = [], gunzip, source = req; | ||
if (req.headers["content-encoding"] === "gzip") { | ||
gunzip = zlib.createGunzip(); | ||
req.pipe(gunzip); | ||
source = gunzip; | ||
} | ||
req.on('data', function (chunk) { | ||
if (gunzip) | ||
chunk = gunzip.inflate(chunk, "binary"); | ||
source.on('data', function (chunk) { | ||
chunks.push(chunk); | ||
}); | ||
req.on('end', function () { | ||
source.on('end', function () { | ||
var xml = chunks.join(''); | ||
var result; | ||
var error; | ||
if (gunzip) { | ||
gunzip.end(); | ||
gunzip = null; | ||
} | ||
self._processRequestXml(req, res, xml); | ||
@@ -212,0 +207,0 @@ }); |
@@ -0,0 +0,0 @@ /// <reference types="node" /> |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ |
{ | ||
"name": "soap", | ||
"version": "0.21.0", | ||
"version": "0.22.0", | ||
"description": "A minimal node SOAP client", | ||
@@ -11,5 +11,4 @@ "engines": { | ||
"bluebird": "^3.5.0", | ||
"compress": "^0.99.0", | ||
"concat-stream": "^1.5.1", | ||
"debug": "~0.7.4", | ||
"debug": "^2.6.9", | ||
"ejs": "~2.5.5", | ||
@@ -16,0 +15,0 @@ "finalhandler": "^1.0.3", |
@@ -0,0 +0,0 @@ Publishing |
@@ -125,2 +125,3 @@ # Soap [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] | ||
- envelopeKey: to set specific key instead of `<pre><<b>soap</b>:Body></<b>soap</b>:Body></pre>`. | ||
- preserveWhitespace: to preserve leading and trailing whitespace characters in text and cdata. | ||
- escapeXML: escape special XML characters in SOAP message (e.g. `&`, `>`, `<` etc), default: `true`. | ||
@@ -135,2 +136,3 @@ - suppressStack: suppress the full stack trace for error messages. | ||
- disableCache: don't cache WSDL files, request them every time. | ||
- overridePromiseSuffix: If your wsdl operations contains names with Async suffix, you will need to override the default promise suffix to a custom one, default: `Async`. | ||
@@ -205,3 +207,3 @@ Note: for versions of node >0.10.X, you may need to specify `{connection: 'keep-alive'}` in SOAP headers to avoid truncation of longer chunked responses. | ||
Server options include the below: | ||
Server options include the below: | ||
`pfx`: A string or Buffer containing the private key, certificate and CA certs of the server in PFX or PKCS12 format. (Mutually exclusive with the key, cert and ca options.) | ||
@@ -399,3 +401,3 @@ `key`: A string or Buffer containing the private key of the server in PEM format. (Could be an array of keys). (Required) | ||
### Client.*method*(args, callback) - call *method* on the SOAP service. | ||
### Client.*method*(args, callback, options) - call *method* on the SOAP service. | ||
@@ -412,2 +414,7 @@ ``` javascript | ||
The `options` object is optional and is passed to the `request`-module. | ||
Interesting properties might be: | ||
* `timeout`: Timeout in milliseconds | ||
* `forever`: Enables keep alive connections | ||
### Client.*method*Async(args) - call *method* on the SOAP service. | ||
@@ -491,3 +498,3 @@ | ||
``` | ||
#### Extra Headers (optional) | ||
@@ -571,5 +578,7 @@ | ||
`node-soap` has several default security protocols. You can easily add your own | ||
as well. The interface is quite simple. Each protocol defines 2 methods: | ||
* `addOptions` - a method that accepts an options arg that is eventually passed directly to `request` | ||
* `toXML` - a method that returns a string of XML. | ||
as well. The interface is quite simple. Each protocol defines these optional methods: | ||
* `addOptions(options)` - a method that accepts an options arg that is eventually passed directly to `request`. | ||
* `addHeaders(headers)` - a method that accepts an argument with HTTP headers, to add new ones. | ||
* `toXML()` - a method that returns a string of XML to be appended to the SOAP headers. Not executed if `postProcess` is also defined. | ||
* `postProcess(xml, envelopeKey)` - a method that receives the the assembled request XML plus envelope key, and returns a processed string of XML. Executed before `options.postProcess`. | ||
@@ -596,2 +605,4 @@ ### BasicAuthSecurity | ||
If you want to reuse tls sessions, you can use the option `forever: true`. | ||
``` javascript | ||
@@ -608,2 +619,3 @@ client.setSecurity(new soap.ClientSSLSecurity( | ||
// secureOptions: constants.SSL_OP_NO_TLSv1_2, | ||
// forever: true, | ||
}, | ||
@@ -610,0 +622,0 @@ )); |
@@ -0,0 +0,0 @@ var _ = require('lodash'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
205050
13
3793
973
- Removedcompress@^0.99.0
- Removedcompress@0.99.0(transitive)
- Removeddebug@0.7.4(transitive)
Updateddebug@^2.6.9