{"id":18806,"library":"soap-x509-http","title":"soap-x509-http","description":"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.","status":"maintenance","version":"1.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/front/soap-x509-http","tags":["javascript","soap","x509","http"],"install":[{"cmd":"npm install soap-x509-http","lang":"bash","label":"npm"},{"cmd":"yarn add soap-x509-http","lang":"bash","label":"yarn"},{"cmd":"pnpm add soap-x509-http","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency, the SOAP client library that uses this HTTP client","package":"soap","optional":false},{"reason":"Peer dependency, used for XML signing via ws.js","package":"ws","optional":false}],"imports":[{"note":"Package is CommonJS only, ESM import will fail.","wrong":"import X509HttpClient from 'soap-x509-http';","symbol":"X509HttpClient","correct":"const X509HttpClient = require('soap-x509-http');"},{"note":"Export is a single constructor, not a named export. Destructuring works too.","wrong":"const X509 = require('soap-x509-http').X509HttpClient;","symbol":"X509HttpClient","correct":"const { X509HttpClient } = require('soap-x509-http');"},{"note":"No default export. Use module.exports directly.","wrong":"const X509HttpClient = require('soap-x509-http').default;","symbol":"X509HttpClient","correct":"const X509HttpClient = require('soap-x509-http');"}],"quickstart":{"code":"const fs = require('fs');\nconst soap = require('soap');\nconst X509HttpClient = require('soap-x509-http');\n\nconst myX509Client = new X509HttpClient(\n  {\n    pfx: fs.readFileSync('./client.pfx'),\n    passphrase: 'password',\n    rejectUnauthorized: false,\n  },\n  {\n    key: fs.readFileSync('./client-key.pem'),\n  }\n);\n\nsoap.createClient('./service.wsdl', { httpClient: myX509Client }, (err, client) => {\n  if (err) return console.error(err);\n  client.MyFunction({ name: 'test' }, (err, result) => {\n    console.log(result);\n  });\n});","lang":"javascript","description":"Creates an X.509 HTTP client with PFX and signing key for node-soap."},"warnings":[{"fix":"Always provide the signingCredentials object with a 'key' property for xml signing.","message":"Request signing with the second argument (signingCredentials) may be required, without it the client may not work correctly for WS-Security.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Consider alternative solutions like using a custom HTTP client with native TLS and xml-crypto directly.","message":"The package depends on the 'ws' package (ws.js) which is unmaintained and has known issues with newer Node.js versions.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Refer to Node.js https.request options documentation for each Node version.","message":"TLS options like pfx, passphrase, ca are passed directly to Node.js https module. Some options may behave differently across Node versions.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install ws' or 'yarn add ws'.","cause":"Peer dependency 'ws' is not installed automatically by npm/yarn.","error":"Cannot find module 'ws'"},{"fix":"Check the path and contents of the .wsdl file.","cause":"WSDL file path is incorrect or the file is malformed.","error":"Error: Unable to parse WSDL"},{"fix":"Use 'const X509HttpClient = require(\"soap-x509-http\");'","cause":"Using ESM import instead of require(). The package exports the constructor as module.exports.","error":"TypeError: X509HttpClient is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}