soap 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +23 -2
- package/package.json +10 -10
package/Readme.md
CHANGED
|
@@ -852,7 +852,7 @@ Construct a WSDL instance from either the WSDL content or the URL to the WSDL.
|
|
|
852
852
|
|
|
853
853
|
#### Parameters
|
|
854
854
|
|
|
855
|
-
- wsdl:
|
|
855
|
+
- wsdl: a WSDL string or an URL to the WSDL
|
|
856
856
|
- baseURL: base URL for the SOAP API
|
|
857
857
|
- options: options (see source for details), use `{}` as default.
|
|
858
858
|
|
|
@@ -895,7 +895,7 @@ import { IProspectType } from './types';
|
|
|
895
895
|
const WSDL_CONTENT = "...";
|
|
896
896
|
|
|
897
897
|
const httpClient: AxiosInstance = /* ... instantiate ... */;
|
|
898
|
-
const
|
|
898
|
+
const baseURL = 'http://example.org/SoapService.svc';
|
|
899
899
|
|
|
900
900
|
const wsdl = new WSDL(WSDL_CONTENT, baseURL, {});
|
|
901
901
|
|
|
@@ -1025,6 +1025,7 @@ the `options` object is optional and can contain the following properties:
|
|
|
1025
1025
|
- `hasNonce`: adds Nonce element (default: `false`)
|
|
1026
1026
|
- `mustUnderstand`: adds mustUnderstand=1 attribute to security tag (default: `false`)
|
|
1027
1027
|
- `actor`: if set, adds Actor attribute with given value to security tag (default: `''`)
|
|
1028
|
+
- `appendElement`: A string containing XML element to append to the end of the WSSecurity element. This can be used to add custom elements like certificates or other security tokens (default: `''`)
|
|
1028
1029
|
|
|
1029
1030
|
### WSSecurityCert
|
|
1030
1031
|
|
|
@@ -1062,6 +1063,7 @@ The `options` object is optional and can contain the following properties:
|
|
|
1062
1063
|
- `prefix`: (optional) Adds this value as a prefix for the generated signature tags.
|
|
1063
1064
|
- `attrs`: (optional) A hash of attributes and values attrName: value to add to the signature root node
|
|
1064
1065
|
- `idMode`: (optional) either 'wssecurity' to generate wsse-scoped reference Id on <Body> or undefined for an unscoped reference Id
|
|
1066
|
+
- `appendElement`: (optional) A string containing XML element to append to the end of the WSSecurity element. This can be used to add custom elements like certificates or other security tokens.
|
|
1065
1067
|
|
|
1066
1068
|
### WSSecurityPlusCert
|
|
1067
1069
|
|
|
@@ -1204,6 +1206,25 @@ client.setSecurity(wsSecurityPlusCert);
|
|
|
1204
1206
|
</soap:Header>
|
|
1205
1207
|
```
|
|
1206
1208
|
|
|
1209
|
+
`appendElement: '<custom:Element>test</custom:Element>'`
|
|
1210
|
+
|
|
1211
|
+
```xml
|
|
1212
|
+
<soap:Header>
|
|
1213
|
+
<wsse:Security soap:mustUnderstand="1">
|
|
1214
|
+
<wsse:BinarySecurityToken>XXX</wsse:BinarySecurityToken>
|
|
1215
|
+
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
|
|
1216
|
+
<SignedInfo>
|
|
1217
|
+
...
|
|
1218
|
+
</SignedInfo>
|
|
1219
|
+
</Signature>
|
|
1220
|
+
<!-- Custom element is appended to the end of the security block -->
|
|
1221
|
+
<custom:MyCustomElement xmlns:custom="http://example.com/custom">
|
|
1222
|
+
foo
|
|
1223
|
+
</custom:MyCustomElement>
|
|
1224
|
+
</wsse:Security>
|
|
1225
|
+
</soap:Header>
|
|
1226
|
+
```
|
|
1227
|
+
|
|
1207
1228
|
### WSSecurityCertWithToken
|
|
1208
1229
|
|
|
1209
1230
|
WS-Security X509 Certificate support. Just like WSSecurityCert, except that it accepts the input properties as a single object, with two properties added `username` and `password`. Which if added, will add a UsernameToken Element to the xml security element.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soap",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "A minimal node SOAP client",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=14.17.0"
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
],
|
|
46
46
|
"license": "MIT",
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@eslint/js": "^9.
|
|
48
|
+
"@eslint/js": "^9.38.0",
|
|
49
49
|
"@types/debug": "^4.1.12",
|
|
50
|
-
"@types/formidable": "^3.4.
|
|
50
|
+
"@types/formidable": "^3.4.6",
|
|
51
51
|
"@types/lodash": "^4.17.20",
|
|
52
52
|
"@types/node": "^14.0.0",
|
|
53
53
|
"@types/sax": "^1.2.7",
|
|
@@ -57,22 +57,22 @@
|
|
|
57
57
|
"diff": "^8.0.2",
|
|
58
58
|
"doctoc": "^2.2.1",
|
|
59
59
|
"duplexer": "~0.1.2",
|
|
60
|
-
"eslint": "^9.
|
|
60
|
+
"eslint": "^9.38.0",
|
|
61
61
|
"express": "^5.1.0",
|
|
62
62
|
"finalhandler": "^2.1.0",
|
|
63
|
-
"glob": "^11.0.
|
|
64
|
-
"mocha": "^11.7.
|
|
63
|
+
"glob": "^11.0.3",
|
|
64
|
+
"mocha": "^11.7.4",
|
|
65
65
|
"nyc": "^17.1.0",
|
|
66
66
|
"prettier": "^3.6.2",
|
|
67
67
|
"readable-stream": "^4.7.0",
|
|
68
|
-
"semver": "^7.7.
|
|
68
|
+
"semver": "^7.7.3",
|
|
69
69
|
"serve-static": "^2.2.0",
|
|
70
70
|
"should": "^13.2.3",
|
|
71
71
|
"sinon": "^21.0.0",
|
|
72
72
|
"source-map-support": "^0.5.21",
|
|
73
73
|
"timekeeper": "^2.3.1",
|
|
74
|
-
"typedoc": "^0.28.
|
|
75
|
-
"typescript": "^5.9.
|
|
76
|
-
"typescript-eslint": "^8.
|
|
74
|
+
"typedoc": "^0.28.14",
|
|
75
|
+
"typescript": "^5.9.3",
|
|
76
|
+
"typescript-eslint": "^8.46.1"
|
|
77
77
|
}
|
|
78
78
|
}
|