forked from piotr-gawlowski/node-soap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
npm-debug.log
121 lines (121 loc) · 34.1 KB
/
npm-debug.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'publish' ]
2 info using [email protected]
3 info using [email protected]
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
7 verbose parsed url host: null,
7 verbose parsed url port: null,
7 verbose parsed url hostname: null,
7 verbose parsed url hash: null,
7 verbose parsed url search: null,
7 verbose parsed url query: null,
7 verbose parsed url pathname: '.',
7 verbose parsed url path: '.',
7 verbose parsed url href: '.' }
8 silly lockFile 3a52ce78- .
9 verbose lock . /home/d3vilroot/.npm/3a52ce78-.lock
10 verbose tar pack [ '/home/d3vilroot/.npm/soap-ntlm/0.6.1/package.tgz', '.' ]
11 verbose tarball /home/d3vilroot/.npm/soap-ntlm/0.6.1/package.tgz
12 verbose folder .
13 info prepublish [email protected]
14 silly lockFile 1f1177db-tar tar://.
15 verbose lock tar://. /home/d3vilroot/.npm/1f1177db-tar.lock
16 silly lockFile 286cbf6c--npm-soap-ntlm-0-6-1-package-tgz tar:///home/d3vilroot/.npm/soap-ntlm/0.6.1/package.tgz
17 verbose lock tar:///home/d3vilroot/.npm/soap-ntlm/0.6.1/package.tgz /home/d3vilroot/.npm/286cbf6c--npm-soap-ntlm-0-6-1-package-tgz.lock
18 silly lockFile 1f1177db-tar tar://.
19 silly lockFile 1f1177db-tar tar://.
20 silly lockFile 286cbf6c--npm-soap-ntlm-0-6-1-package-tgz tar:///home/d3vilroot/.npm/soap-ntlm/0.6.1/package.tgz
21 silly lockFile 286cbf6c--npm-soap-ntlm-0-6-1-package-tgz tar:///home/d3vilroot/.npm/soap-ntlm/0.6.1/package.tgz
22 silly lockFile d8ef808f-root-npm-soap-ntlm-0-6-1-package /home/d3vilroot/.npm/soap-ntlm/0.6.1/package
23 verbose lock /home/d3vilroot/.npm/soap-ntlm/0.6.1/package /home/d3vilroot/.npm/d8ef808f-root-npm-soap-ntlm-0-6-1-package.lock
24 silly lockFile d8ef808f-root-npm-soap-ntlm-0-6-1-package /home/d3vilroot/.npm/soap-ntlm/0.6.1/package
25 silly lockFile d8ef808f-root-npm-soap-ntlm-0-6-1-package /home/d3vilroot/.npm/soap-ntlm/0.6.1/package
26 silly lockFile 3a52ce78- .
27 silly lockFile 3a52ce78- .
28 silly publish { name: 'soap-ntlm',
28 silly publish version: '0.6.1',
28 silly publish description: 'A minimal node SOAP client with ntlm authentication',
28 silly publish engines: { node: '>=0.8.0' },
28 silly publish author: { name: 'Vinay Pulim', email: '[email protected]' },
28 silly publish dependencies:
28 silly publish { httpntlm: '^1.5.0',
28 silly publish lodash: '~2.4.1',
28 silly publish request: '>=2.9.0',
28 silly publish sax: '>=0.6',
28 silly publish 'strip-bom': '~0.3.1' },
28 silly publish repository:
28 silly publish { type: 'git',
28 silly publish url: 'https://github.com/piotr-gawlowski/node-soap.git' },
28 silly publish main: './index.js',
28 silly publish directories: { lib: './lib' },
28 silly publish scripts:
28 silly publish { pretest: 'jshint index.js lib test',
28 silly publish test: 'mocha test/*-test.js test/security/*.js' },
28 silly publish keywords: [ 'soap' ],
28 silly publish licenses:
28 silly publish [ { type: 'MIT License',
28 silly publish url: 'http://www.opensource.org/licenses/mit-license.php' } ],
28 silly publish devDependencies:
28 silly publish { mocha: '~1.17.0',
28 silly publish jshint: '2.3.0',
28 silly publish glob: '~3.2.8',
28 silly publish should: '~3.3.0',
28 silly publish timekeeper: '~0.0.4' },
28 silly publish readme: '# Soap [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url]\n> A SOAP client and server for node.js.\n\nThis module lets you connect to web services using SOAP. It also provides a server that allows you to run your own SOAP services.\n\n## Features:\n\n* Very simple API\n* Handles both RPC and Document schema types\n* Supports multiRef SOAP messages (thanks to [@kaven276](https://github.com/kaven276))\n* Support for both synchronous and asynchronous method handlers\n* WS-Security (currently only UsernameToken and PasswordText encoding is supported)\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n```\n npm install soap-ntlm\n```\n## Module\n\n### soap.createClient(url[, options], callback) - create a new SOAP client from a WSDL url. Also supports a local filesystem path.\n\n``` javascript\n var soap = require(\'soap\');\n var url = \'http://example.com/wsdl?wsdl\';\n var args = {name: \'value\'};\n soap.createClient(url, function(err, client) {\n\n client.setSecurity(new soap.NtlmSecurity(\'email\', \'password\'));\n\n client.MyFunction(args, function(err, result) {\n console.log(result);\n });\n });\n```\n\nWithin the options object you may provide an `endpoint` property in case you want to override the SOAP service\'s host specified in the `.wsdl` file.\n\n### soap.listen(*server*, *path*, *services*, *wsdl*) - create a new SOAP server that listens on *path* and provides *services*.\n*wsdl* is an xml string that defines the service.\n\n``` javascript\n var myService = {\n MyService: {\n MyPort: {\n MyFunction: function(args) {\n return {\n name: args.name\n };\n }\n\n // This is how to define an asynchronous function.\n MyAsyncFunction: function(args, callback) {\n // do some work\n callback({\n name: args.name\n })\n }\n }\n }\n }\n\n var xml = require(\'fs\').readFileSync(\'myservice.wsdl\', \'utf8\'),\n server = http.createServer(function(request,response) {\n response.end("404: Not Found: "+request.url)\n });\n\n server.listen(8000);\n soap.listen(server, \'/wsdl\', myService, xml);\n```\n\n### server logging\n\nIf the log method is defined it will be called with \'received\' and \'replied\'\nalong with data.\n\n``` javascript\n server = soap.listen(...)\n server.log = function(type, data) {\n // type is \'received\' or \'replied\'\n };\n```\n\n### server security example using PasswordDigest\n\nIf server.authenticate is not defined no authentation will take place.\n\n``` javascript\n server = soap.listen(...)\n server.authenticate = function(security) {\n var created, nonce, password, user, token;\n token = security.UsernameToken, user = token.Username,\n password = token.Password, nonce = token.Nonce, created = token.Created;\n return user === \'user\' && password === soap.passwordDigest(nonce, created, \'password\');\n };\n```\n\n### server connection authorization\n\nThis is called prior to soap service method\nIf the method is defined and returns false the incoming connection is\nterminated.\n\n``` javascript\n server = soap.listen(...)\n server.authorizeConnection = function(req) {\n return true; // or false\n };\n```\n\n\n## Client\n\nAn instance of Client is passed to the soap.createClient callback. It is used to execute methods on the soap service.\n\n### Client.describe() - description of services, ports and methods as a JavaScript object\n\n``` javascript\n client.describe() // returns\n {\n MyService: {\n MyPort: {\n MyFunction: {\n input: {\n name: \'string\'\n }\n }\n }\n }\n }\n```\n\n### Client.setSecurity(security) - use the specified security protocol\n`node-soap` has several default security protocols. You can easily add your own\nas well. The interface is quite simple. Each protocol defines 2 methods:\n* addOptions - a method that accepts an options arg that is eventually passed directly to `request`\n* toXML - a method that reurns a string of XML.\n\nBy default there are 3 protocols:\n\n####BasicAuthSecurity\n\n``` javascript\n client.setSecurity(new soap.BasicAuthSecurity(\'username\', \'password\'));\n```\n\n####ClientSSLSecurity\n_Note_: If you run into issues using this protocol, consider passing these options\nas default request options to the constructor:\n* rejectUnauthorized: false\n* strictSSL: false\n* secureOptions: constants.SSL_OP_NO_TLSv1_2//this is likely needed for node >= 10.0\n\n``` javascript\n client.setSecurity(new soap.ClientSSLSecurity(\n \'/path/to/key\'\n , \'/path/to/cert\'\n , {/*default request options*/}\n ));\n```\n\n####WSSecurity\n\n``` javascript\n client.setSecurity(new soap.WSSecurity(\'username\', \'password\'))\n```\n\n####BearerSecurity\n\n``` javascript\n client.setSecurity(new soap.BearerSecurity(\'token\'));\n```\n\n### Client.*method*(args, callback) - call *method* on the SOAP service.\n\n``` javascript\n client.MyFunction({name: \'value\'}, function(err, result, raw, soapHeader) {\n // result is a javascript object\n // raw is the raw response\n // soapHeader is the response soap header as a javascript object\n })\n```\n### Client.*service*.*port*.*method*(args, callback[, options]) - call a *method* using a specific *service* and *port*\n\n``` javascript\n client.MyService.MyPort.MyFunction({name: \'value\'}, function(err, result) {\n // result is a javascript object\n })\n```\n#### Options (optional)\n - Accepts any option that the request module accepts, see [here.](https://github.com/mikeal/request)\n - For example, you could set a timeout of 5 seconds on the request like this:\n``` javascript\n client.MyService.MyPort.MyFunction({name: \'value\'}, function(err, result) {\n // result is a javascript object\n }, {timeout: 5000})\n```\n\n### Client.*addSoapHeader*(soapHeader[, name, namespace, xmlns]) - add soapHeader to soap:Header node\n#### Options\n\n - `soapHeader` Object({rootName: {name: "value"}}) or strict xml-string\n\n##### Optional parameters when first arg is object :\n - `name` Unknown parameter (it could just a empty string)\n - `namespace` prefix of xml namespace\n - `xmlns` URI\n\n### Client.*lastRequest* - the property that contains last full soap request for client logging\n\n## WSSecurity\n\nWSSecurity implements WS-Security. UsernameToken and PasswordText/PasswordDigest is supported. An instance of WSSecurity is passed to Client.setSecurity.\n\n``` javascript\n new WSSecurity(username, password, passwordType)\n //\'PasswordDigest\' or \'PasswordText\' default is PasswordText\n```\n\n## Handling XML Attributes, Value and XML (wsdlOptions).\nSometimes it is necessary to override the default behaviour of `node-soap` in order to deal with the special requirements\nof your code base or a third library you use. Therefore you can use the `wsdlOptions` Object, which is passed in the\n`#createClient()` method and could have any (or all) of the following contents:\n```javascript\nvar wsdlOptions = {\n attributesKey: \'theAttrs\',\n valueKey: \'theVal\',\n xmlKey: \'theXml\'\n}\n```\nIf nothing (or an empty Object `{}`) is passed to the `#createClient()` method, the `node-soap` defaults (`attributesKey: \'attributes\'`, `valueKey: \'$value\'` and `xmlKey: \'$xml\'`) are used.\n\n###Overriding the `value` key\nBy default, `node-soap` uses `$value` as key for any parsed XML value which may interfere with your other code as it\ncould be some reserved word, or the `$` in general cannot be used for a key to start with.\n\nYou can define your own `valueKey` by passing it in the `wsdl_options` to the createClient call like so:\n```javascript\nvar wsdlOptions = {\n valueKey: \'theVal\'\n};\n\nsoap.createClient(__dirname + \'/wsdl/default_namespace.wsdl\', wsdlOptions, function (err, client) {\n // your code\n});\n```\n\n###Overriding the `xml` key\nAs `valueKey`, `node-soap` uses `$xml` as key. The xml key is used to pass XML Object without adding namespace or parsing the string.\n\nExample :\n\n```javascript\ndom = {\n $xml: \'<parentnode type="type"><childnode></childnode></parentnode>\'\n};\n```\n\n```xml\n<tns:dom>\n <parentnode type="type">\n <childnode></childnode>\n </parentnode>\n</tns:dom>\n```\n\nYou can define your own `xmlKey` by passing it in the `wsdl_options` to the createClient call like so:\n```javascript\nvar wsdlOptions = {\n xmlKey: \'theXml\'\n};\n\nsoap.createClient(__dirname + \'/wsdl/default_namespace.wsdl\', wsdlOptions, function (err, client) {\n // your code\n});\n```\n\n###Overriding the `attributes` key\nYou can achieve attributes like:\n``` xml\n<parentnode>\n <childnode name="childsname">\n </childnode>\n</parentnode>\n```\nBy attaching an attributes object to a node.\n``` javascript\n{\n parentnode: {\n childnode: {\n attributes: {\n name: \'childsname\'\n }\n }\n }\n}\n```\nHowever, "attributes" may be a reserved key for some systems that actually want a node\n```xml\n<attributes>\n</attributes>\n```\n\nIn this case you can configure the attributes key in the `wsdlOptions` like so.\n```javascript\nvar wsdlOptions = {\n attributesKey: \'$attributes\'\n};\n\nsoap.createClient(__dirname + \'/wsdl/default_namespace.wsdl\', wsdlOptions, function (err, client) {\n client.*method*({\n parentnode: {\n childnode: {\n $attributes: {\n name: \'childsname\'\n }\n }\n }\n });\n});\n```\n\n## Handling "ignored" namespaces\nIf an Element in a `schema` definition depends on an Element which is present in the same namespace, normally the `tns:`\nnamespace prefix is used to identify this Element. This is not much of a problem as long as you have just one `schema` defined\n(inline or in a separate file). If there are more `schema` files, the `tns:` in the generated `soap` file resolved mostly to the parent `wsdl` file,\n which was obviously wrong.\n\n `node-soap` now handles namespace prefixes which shouldn\'t be resolved (because it\'s not necessary) as so called `ignoredNamespaces`\n which default to an Array of 3 Strings (`[\'tns\', \'targetNamespace\', \'typedNamespace\']`).\n\n If this is not sufficient for your purpose you can easily add more namespace prefixes to this Array, or override it in its entirety\n by passing an `ignoredNamespaces` object within the `options` you pass in `soap.createClient()` method.\n\n A simple `ignoredNamespaces` object, which only adds certain namespaces could look like this:\n ```\n var options = {\n ignoredNamespaces: {\n namespaces: [\'namespaceToIgnore\', \'someOtherNamespace\']\n }\n }\n ```\n This would extend the `ignoredNamespaces` of the `WSDL` processor to `[\'tns\', \'targetNamespace\', \'typedNamespace\', \'namespaceToIgnore\', \'someOtherNamespace\']`.\n\n If you want to override the default ignored namespaces you would simply pass the following `ignoredNamespaces` object within the `options`:\n ```\n var options = {\n ignoredNamespaces: {\n namespaces: [\'namespaceToIgnore\', \'someOtherNamespace\'],\n override: true\n }\n }\n ```\n This would override the default `ignoredNamespaces` of the `WSDL` processor to `[\'namespaceToIgnore\', \'someOtherNamespace\']`. (This shouldn\'t be necessary, anyways).\n\n## Contributors\n\n * Author: [Vinay Pulim](https://github.com/vpulim)\n * Lead Maintainer: [Joe Spencer](https://github.com/jsdevel)\n * [All Contributors](https://github.com/vpulim/node-soap/graphs/contributors)\n\n[downloads-image]: http://img.shields.io/npm/dm/soap.svg\n[npm-url]: https://npmjs.org/package/soap\n[npm-image]: http://img.shields.io/npm/v/soap.svg\n\n[travis-url]: https://travis-ci.org/vpulim/node-soap\n[travis-image]: http://img.shields.io/travis/vpulim/node-soap.svg\n',
28 silly publish readmeFilename: 'Readme.md',
28 silly publish gitHead: 'b4769ca763ea1fd959bd8c1e66b4f88d7aefdbc9',
28 silly publish bugs: { url: 'https://github.com/piotr-gawlowski/node-soap/issues' },
28 silly publish homepage: 'https://github.com/piotr-gawlowski/node-soap',
28 silly publish _id: '[email protected]',
28 silly publish _shasum: '7303c2ce3116666fd77c4ea9440f1dd772eaf66b',
28 silly publish _from: '.' }
29 verbose request where is /soap-ntlm
30 verbose request registry https://registry.npmjs.org/
31 verbose request id 114f24e4fae34440
32 verbose url raw /soap-ntlm
33 verbose url resolving [ 'https://registry.npmjs.org/', './soap-ntlm' ]
34 verbose url resolved https://registry.npmjs.org/soap-ntlm
35 verbose request where is https://registry.npmjs.org/soap-ntlm
36 info trying registry request attempt 1 at 12:15:26
37 http PUT https://registry.npmjs.org/soap-ntlm
38 http 403 https://registry.npmjs.org/soap-ntlm
39 verbose headers { date: 'Mon, 02 Feb 2015 11:15:28 GMT',
39 verbose headers server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
39 verbose headers 'content-type': 'application/json',
39 verbose headers 'cache-control': 'max-age=60',
39 verbose headers 'content-length': '17083',
39 verbose headers 'accept-ranges': 'bytes',
39 verbose headers via: '1.1 varnish',
39 verbose headers 'x-served-by': 'cache-ams4145-AMS',
39 verbose headers 'x-cache': 'MISS',
39 verbose headers 'x-cache-hits': '0',
39 verbose headers 'x-timer': 'S1422875726.941297,VS0,VE1128',
39 verbose headers connection: 'close' }
40 error publish Failed PUT 403
41 error Error: forbidden cannot modify pre-existing version: 0.6.1
41 error old={"name":"soap-ntlm","version":"0.6.1","description":"A minimal node SOAP client with ntlm authentication","engines":{"node":">=0.8.0"},"author":{"name":"Vinay Pulim","email":"[email protected]"},"dependencies":{"httpntlm":"^1.5.0","lodash":"~2.4.1","request":">=2.9.0","sax":">=0.6","strip-bom":"~0.3.1"},"repository":{"type":"git","url":"https://github.com/piotr-gawlowski/node-soap.git"},"main":"./index.js","directories":{"lib":"./lib"},"scripts":{"pretest":"jshint index.js lib test","test":"mocha test/*-test.js test/security/*.js"},"keywords":["soap"],"licenses":[{"type":"MIT License","url":"http://www.opensource.org/licenses/mit-license.php"}],"devDependencies":{"mocha":"~1.17.0","jshint":"2.3.0","glob":"~3.2.8","should":"~3.3.0","timekeeper":"~0.0.4"},"gitHead":"aff9f08d7a00662e87ad0a3c73dd29eabee15d27","bugs":{"url":"https://github.com/piotr-gawlowski/node-soap/issues"},"homepage":"https://github.com/piotr-gawlowski/node-soap","_id":"[email protected]","_shasum":"822689d5ba2c5b85979ec020d25d7c6c8e82d0f7","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"piotr-gawlowski","email":"[email protected]"},"maintainers":[{"name":"piotr-gawlowski","email":"[email protected]"}],"dist":{"shasum":"822689d5ba2c5b85979ec020d25d7c6c8e82d0f7","tarball":"http://registry.npmjs.org/soap-ntlm/-/soap-ntlm-0.6.1.tgz"}}
41 error new={"name":"soap-ntlm","version":"0.6.1","description":"A minimal node SOAP client with ntlm authentication","engines":{"node":">=0.8.0"},"author":{"name":"Vinay Pulim","email":"[email protected]"},"dependencies":{"httpntlm":"^1.5.0","lodash":"~2.4.1","request":">=2.9.0","sax":">=0.6","strip-bom":"~0.3.1"},"repository":{"type":"git","url":"https://github.com/piotr-gawlowski/node-soap.git"},"main":"./index.js","directories":{"lib":"./lib"},"scripts":{"pretest":"jshint index.js lib test","test":"mocha test/*-test.js test/security/*.js"},"keywords":["soap"],"licenses":[{"type":"MIT License","url":"http://www.opensource.org/licenses/mit-license.php"}],"devDependencies":{"mocha":"~1.17.0","jshint":"2.3.0","glob":"~3.2.8","should":"~3.3.0","timekeeper":"~0.0.4"},"readme":"# Soap [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url]\u000a> A SOAP client and server for node.js.\u000a\u000aThis module lets you connect to web services using SOAP. It also provides a server that allows you to run your own SOAP services.\u000a\u000a## Features:\u000a\u000a* Very simple API\u000a* Handles both RPC and Document schema types\u000a* Supports multiRef SOAP messages (thanks to [@kaven276](https://github.com/kaven276))\u000a* Support for both synchronous and asynchronous method handlers\u000a* WS-Security (currently only UsernameToken and PasswordText encoding is supported)\u000a\u000a## Install\u000a\u000aInstall with [npm](http://github.com/isaacs/npm):\u000a\u000a```\u000a npm install soap-ntlm\u000a```\u000a## Module\u000a\u000a### soap.createClient(url[, options], callback) - create a new SOAP client from a WSDL url. Also supports a local filesystem path.\u000a\u000a``` javascript\u000a var soap = require('soap');\u000a var url = 'http://example.com/wsdl?wsdl';\u000a var args = {name: 'value'};\u000a soap.createClient(url, function(err, client) {\u000a\u000a client.setSecurity(new soap.NtlmSecurity('email', 'password'));\u000a\u000a client.MyFunction(args, function(err, result) {\u000a console.log(result);\u000a });\u000a });\u000a```\u000a\u000aWithin the options object you may provide an `endpoint` property in case you want to override the SOAP service's host specified in the `.wsdl` file.\u000a\u000a### soap.listen(*server*, *path*, *services*, *wsdl*) - create a new SOAP server that listens on *path* and provides *services*.\u000a*wsdl* is an xml string that defines the service.\u000a\u000a``` javascript\u000a var myService = {\u000a MyService: {\u000a MyPort: {\u000a MyFunction: function(args) {\u000a return {\u000a name: args.name\u000a };\u000a }\u000a\u000a // This is how to define an asynchronous function.\u000a MyAsyncFunction: function(args, callback) {\u000a // do some work\u000a callback({\u000a name: args.name\u000a })\u000a }\u000a }\u000a }\u000a }\u000a\u000a var xml = require('fs').readFileSync('myservice.wsdl', 'utf8'),\u000a server = http.createServer(function(request,response) {\u000a response.end(\"404: Not Found: \"+request.url)\u000a });\u000a\u000a server.listen(8000);\u000a soap.listen(server, '/wsdl', myService, xml);\u000a```\u000a\u000a### server logging\u000a\u000aIf the log method is defined it will be called with 'received' and 'replied'\u000aalong with data.\u000a\u000a``` javascript\u000a server = soap.listen(...)\u000a server.log = function(type, data) {\u000a // type is 'received' or 'replied'\u000a };\u000a```\u000a\u000a### server security example using PasswordDigest\u000a\u000aIf server.authenticate is not defined no authentation will take place.\u000a\u000a``` javascript\u000a server = soap.listen(...)\u000a server.authenticate = function(security) {\u000a var created, nonce, password, user, token;\u000a token = security.UsernameToken, user = token.Username,\u000a password = token.Password, nonce = token.Nonce, created = token.Created;\u000a return user === 'user' && password === soap.passwordDigest(nonce, created, 'password');\u000a };\u000a```\u000a\u000a### server connection authorization\u000a\u000aThis is called prior to soap service method\u000aIf the method is defined and returns false the incoming connection is\u000aterminated.\u000a\u000a``` javascript\u000a server = soap.listen(...)\u000a server.authorizeConnection = function(req) {\u000a return true; // or false\u000a };\u000a```\u000a\u000a\u000a## Client\u000a\u000aAn instance of Client is passed to the soap.createClient callback. It is used to execute methods on the soap service.\u000a\u000a### Client.describe() - description of services, ports and methods as a JavaScript object\u000a\u000a``` javascript\u000a client.describe() // returns\u000a {\u000a MyService: {\u000a MyPort: {\u000a MyFunction: {\u000a input: {\u000a name: 'string'\u000a }\u000a }\u000a }\u000a }\u000a }\u000a```\u000a\u000a### Client.setSecurity(security) - use the specified security protocol\u000a`node-soap` has several default security protocols. You can easily add your own\u000aas well. The interface is quite simple. Each protocol defines 2 methods:\u000a* addOptions - a method that accepts an options arg that is eventually passed directly to `request`\u000a* toXML - a method that reurns a string of XML.\u000a\u000aBy default there are 3 protocols:\u000a\u000a####BasicAuthSecurity\u000a\u000a``` javascript\u000a client.setSecurity(new soap.BasicAuthSecurity('username', 'password'));\u000a```\u000a\u000a####ClientSSLSecurity\u000a_Note_: If you run into issues using this protocol, consider passing these options\u000aas default request options to the constructor:\u000a* rejectUnauthorized: false\u000a* strictSSL: false\u000a* secureOptions: constants.SSL_OP_NO_TLSv1_2//this is likely needed for node >= 10.0\u000a\u000a``` javascript\u000a client.setSecurity(new soap.ClientSSLSecurity(\u000a '/path/to/key'\u000a , '/path/to/cert'\u000a , {/*default request options*/}\u000a ));\u000a```\u000a\u000a####WSSecurity\u000a\u000a``` javascript\u000a client.setSecurity(new soap.WSSecurity('username', 'password'))\u000a```\u000a\u000a####BearerSecurity\u000a\u000a``` javascript\u000a client.setSecurity(new soap.BearerSecurity('token'));\u000a```\u000a\u000a### Client.*method*(args, callback) - call *method* on the SOAP service.\u000a\u000a``` javascript\u000a client.MyFunction({name: 'value'}, function(err, result, raw, soapHeader) {\u000a // result is a javascript object\u000a // raw is the raw response\u000a // soapHeader is the response soap header as a javascript object\u000a })\u000a```\u000a### Client.*service*.*port*.*method*(args, callback[, options]) - call a *method* using a specific *service* and *port*\u000a\u000a``` javascript\u000a client.MyService.MyPort.MyFunction({name: 'value'}, function(err, result) {\u000a // result is a javascript object\u000a })\u000a```\u000a#### Options (optional)\u000a - Accepts any option that the request module accepts, see [here.](https://github.com/mikeal/request)\u000a - For example, you could set a timeout of 5 seconds on the request like this:\u000a``` javascript\u000a client.MyService.MyPort.MyFunction({name: 'value'}, function(err, result) {\u000a // result is a javascript object\u000a }, {timeout: 5000})\u000a```\u000a\u000a### Client.*addSoapHeader*(soapHeader[, name, namespace, xmlns]) - add soapHeader to soap:Header node\u000a#### Options\u000a\u000a - `soapHeader` Object({rootName: {name: \"value\"}}) or strict xml-string\u000a\u000a##### Optional parameters when first arg is object :\u000a - `name` Unknown parameter (it could just a empty string)\u000a - `namespace` prefix of xml namespace\u000a - `xmlns` URI\u000a\u000a### Client.*lastRequest* - the property that contains last full soap request for client logging\u000a\u000a## WSSecurity\u000a\u000aWSSecurity implements WS-Security. UsernameToken and PasswordText/PasswordDigest is supported. An instance of WSSecurity is passed to Client.setSecurity.\u000a\u000a``` javascript\u000a new WSSecurity(username, password, passwordType)\u000a //'PasswordDigest' or 'PasswordText' default is PasswordText\u000a```\u000a\u000a## Handling XML Attributes, Value and XML (wsdlOptions).\u000aSometimes it is necessary to override the default behaviour of `node-soap` in order to deal with the special requirements\u000aof your code base or a third library you use. Therefore you can use the `wsdlOptions` Object, which is passed in the\u000a`#createClient()` method and could have any (or all) of the following contents:\u000a```javascript\u000avar wsdlOptions = {\u000a attributesKey: 'theAttrs',\u000a valueKey: 'theVal',\u000a xmlKey: 'theXml'\u000a}\u000a```\u000aIf nothing (or an empty Object `{}`) is passed to the `#createClient()` method, the `node-soap` defaults (`attributesKey: 'attributes'`, `valueKey: '$value'` and `xmlKey: '$xml'`) are used.\u000a\u000a###Overriding the `value` key\u000aBy default, `node-soap` uses `$value` as key for any parsed XML value which may interfere with your other code as it\u000acould be some reserved word, or the `$` in general cannot be used for a key to start with.\u000a\u000aYou can define your own `valueKey` by passing it in the `wsdl_options` to the createClient call like so:\u000a```javascript\u000avar wsdlOptions = {\u000a valueKey: 'theVal'\u000a};\u000a\u000asoap.createClient(__dirname + '/wsdl/default_namespace.wsdl', wsdlOptions, function (err, client) {\u000a // your code\u000a});\u000a```\u000a\u000a###Overriding the `xml` key\u000aAs `valueKey`, `node-soap` uses `$xml` as key. The xml key is used to pass XML Object without adding namespace or parsing the string.\u000a\u000aExample :\u000a\u000a```javascript\u000adom = {\u000a $xml: '<parentnode type=\"type\"><childnode></childnode></parentnode>'\u000a};\u000a```\u000a\u000a```xml\u000a<tns:dom>\u000a <parentnode type=\"type\">\u000a <childnode></childnode>\u000a </parentnode>\u000a</tns:dom>\u000a```\u000a\u000aYou can define your own `xmlKey` by passing it in the `wsdl_options` to the createClient call like so:\u000a```javascript\u000avar wsdlOptions = {\u000a xmlKey: 'theXml'\u000a};\u000a\u000asoap.createClient(__dirname + '/wsdl/default_namespace.wsdl', wsdlOptions, function (err, client) {\u000a // your code\u000a});\u000a```\u000a\u000a###Overriding the `attributes` key\u000aYou can achieve attributes like:\u000a``` xml\u000a<parentnode>\u000a <childnode name=\"childsname\">\u000a </childnode>\u000a</parentnode>\u000a```\u000aBy attaching an attributes object to a node.\u000a``` javascript\u000a{\u000a parentnode: {\u000a childnode: {\u000a attributes: {\u000a name: 'childsname'\u000a }\u000a }\u000a }\u000a}\u000a```\u000aHowever, \"attributes\" may be a reserved key for some systems that actually want a node\u000a```xml\u000a<attributes>\u000a</attributes>\u000a```\u000a\u000aIn this case you can configure the attributes key in the `wsdlOptions` like so.\u000a```javascript\u000avar wsdlOptions = {\u000a attributesKey: '$attributes'\u000a};\u000a\u000asoap.createClient(__dirname + '/wsdl/default_namespace.wsdl', wsdlOptions, function (err, client) {\u000a client.*method*({\u000a parentnode: {\u000a childnode: {\u000a $attributes: {\u000a name: 'childsname'\u000a }\u000a }\u000a }\u000a });\u000a});\u000a```\u000a\u000a## Handling \"ignored\" namespaces\u000aIf an Element in a `schema` definition depends on an Element which is present in the same namespace, normally the `tns:`\u000anamespace prefix is used to identify this Element. This is not much of a problem as long as you have just one `schema` defined\u000a(inline or in a separate file). If there are more `schema` files, the `tns:` in the generated `soap` file resolved mostly to the parent `wsdl` file,\u000a which was obviously wrong.\u000a\u000a `node-soap` now handles namespace prefixes which shouldn't be resolved (because it's not necessary) as so called `ignoredNamespaces`\u000a which default to an Array of 3 Strings (`['tns', 'targetNamespace', 'typedNamespace']`).\u000a\u000a If this is not sufficient for your purpose you can easily add more namespace prefixes to this Array, or override it in its entirety\u000a by passing an `ignoredNamespaces` object within the `options` you pass in `soap.createClient()` method.\u000a\u000a A simple `ignoredNamespaces` object, which only adds certain namespaces could look like this:\u000a ```\u000a var options = {\u000a ignoredNamespaces: {\u000a namespaces: ['namespaceToIgnore', 'someOtherNamespace']\u000a }\u000a }\u000a ```\u000a This would extend the `ignoredNamespaces` of the `WSDL` processor to `['tns', 'targetNamespace', 'typedNamespace', 'namespaceToIgnore', 'someOtherNamespace']`.\u000a\u000a If you want to override the default ignored namespaces you would simply pass the following `ignoredNamespaces` object within the `options`:\u000a ```\u000a var options = {\u000a ignoredNamespaces: {\u000a namespaces: ['namespaceToIgnore', 'someOtherNamespace'],\u000a override: true\u000a }\u000a }\u000a ```\u000a This would override the default `ignoredNamespaces` of the `WSDL` processor to `['namespaceToIgnore', 'someOtherNamespace']`. (This shouldn't be necessary, anyways).\u000a\u000a## Contributors\u000a\u000a * Author: [Vinay Pulim](https://github.com/vpulim)\u000a * Lead Maintainer: [Joe Spencer](https://github.com/jsdevel)\u000a * [All Contributors](https://github.com/vpulim/node-soap/graphs/contributors)\u000a\u000a[downloads-image]: http://img.shields.io/npm/dm/soap.svg\u000a[npm-url]: https://npmjs.org/package/soap\u000a[npm-image]: http://img.shields.io/npm/v/soap.svg\u000a\u000a[travis-url]: https://travis-ci.org/vpulim/node-soap\u000a[travis-image]: http://img.shields.io/travis/vpulim/node-soap.svg\u000a","readmeFilename":"Readme.md","gitHead":"b4769ca763ea1fd959bd8c1e66b4f88d7aefdbc9","bugs":{"url":"https://github.com/piotr-gawlowski/node-soap/issues"},"homepage":"https://github.com/piotr-gawlowski/node-soap","_id":"[email protected]","_shasum":"7303c2ce3116666fd77c4ea9440f1dd772eaf66b","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"piotr-gawlowski","email":"[email protected]"},"maintainers":[{"name":"piotr-gawlowski","email":"[email protected]"}],"dist":{"shasum":"7303c2ce3116666fd77c4ea9440f1dd772eaf66b","tarball":"http://registry.npmjs.org/soap-ntlm/-/soap-ntlm-0.6.1.tgz"}}: soap-ntlm
41 error at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:300:14)
41 error at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:238:65)
41 error at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:123:22)
41 error at Request.emit (events.js:110:17)
41 error at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:893:14)
41 error at Request.emit (events.js:129:20)
41 error at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:844:12)
41 error at IncomingMessage.emit (events.js:129:20)
41 error at _stream_readable.js:903:16
41 error at process._tickCallback (node.js:343:11)
42 error If you need help, you may report this *entire* log,
42 error including the npm and node versions, at:
42 error <http://github.com/npm/npm/issues>
43 error System Linux 3.13.0-24-generic
44 error command "/usr/local/bin/node" "/usr/local/bin/npm" "publish"
45 error cwd /home/d3vilroot/Desktop/PHILIPS/node-soap
46 error node -v v0.13.0-pre
47 error npm -v 1.4.21
48 verbose exit [ 1, true ]