Registry / http-networking / soap-x509-http

soap-x509-http

JSON →
library1.0.2jsnpmunverified

An HTTP client for node-soap that supports X.509 certificate authentication and signing, based on ws.js. Version 1.0.2 is the latest stable release, last updated in 2016. It extends the default HTTP client of node-soap to use TLS client certificates and XML signing. This package is for Node.js only and requires both 'soap' and 'ws' as peer dependencies. Alternatives include custom HTTP clients for node-soap using native TLS, but this package provides integrated signing and certificate support.

npm install soap-x509-http
INSTALL
IMPORT
SIG · SOAP-X509-HTTP
S
soap-x509-http
http-networkingjavascriptv1.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

X509HttpClient
const X509HttpClient = require('soap-x509-http');
import X509HttpClient from 'soap-x509-http';
Package is CommonJS only, ESM import will fail.
X509HttpClient
const { X509HttpClient } = require('soap-x509-http');
const X509 = require('soap-x509-http').X509HttpClient;
Export is a single constructor, not a named export. Destructuring works too.
X509HttpClient
const X509HttpClient = require('soap-x509-http');
const X509HttpClient = require('soap-x509-http').default;
No default export. Use module.exports directly.

Creates an X.509 HTTP client with PFX and signing key for node-soap.

const fs = require('fs'); const soap = require('soap'); const X509HttpClient = require('soap-x509-http'); const myX509Client = new X509HttpClient( { pfx: fs.readFileSync('./client.pfx'), passphrase: 'password', rejectUnauthorized: false, }, { key: fs.readFileSync('./client-key.pem'), } ); soap.createClient('./service.wsdl', { httpClient: myX509Client }, (err, client) => { if (err) return console.error(err); client.MyFunction({ name: 'test' }, (err, result) => { console.log(result); }); });
Debug
Known issues
breakingRequest signing with the second argument (signingCredentials) may be required, without it the client may not work correctly for WS-Security.
fix
Always provide the signingCredentials object with a 'key' property for xml signing.
affects: >=0.0.0
gotchaThe package depends on the 'ws' package (ws.js) which is unmaintained and has known issues with newer Node.js versions.
fix
Consider alternative solutions like using a custom HTTP client with native TLS and xml-crypto directly.
affects: >=0.0.0
gotchaTLS options like pfx, passphrase, ca are passed directly to Node.js https module. Some options may behave differently across Node versions.
fix
Refer to Node.js https.request options documentation for each Node version.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'ws'
Peer dependency 'ws' is not installed automatically by npm/yarn.
fix
Run 'npm install ws' or 'yarn add ws'.
Error: Unable to parse WSDL
WSDL file path is incorrect or the file is malformed.
fix
Check the path and contents of the .wsdl file.
TypeError: X509HttpClient is not a constructor
Using ESM import instead of require(). The package exports the constructor as module.exports.
fix
Use 'const X509HttpClient = require("soap-x509-http");'
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies
soaprequiredPeer dependency, the SOAP client library that uses this HTTP client
wsrequiredPeer dependency, used for XML signing via ws.js
Agent activity
14 hits · last 30 days
node
10
OpenAI (training)
1
Resources
soap-x509-http — npm install soap-x509-http · libregistry