Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Luke Policinski
    Tommy Tran
    @lukepolo The request module was replaced with Axios in 0.40.0, so you should be able to upgrade to 0.39.0 in the meantime.
    Umang Kathuria

    HI there! Could anyone help me with following error ?

    I am using a WSDL file to create server. And I call my endpoint from SOAPUI. On my server console, I end up with error -

    TypeError: Cannot read property 'description' of undefined
    at SAXParser.p.onopentag (C:\Codebase\sample-domo\strong-soap-demo\node_modules\soap\lib\wsdl\index.js:238:37)
    at emit (C:\Codebase\sample-domo\strong-soap-demo\node_modules\sax\lib\sax.js:624:35)
    at emitNode (C:\Codebase\sample-domo\strong-soap-demo\node_modules\sax\lib\sax.js:629:5)
    at openTag (C:\Codebase\sample-domo\strong-soap-demo\node_modules\sax\lib\sax.js:825:5)
    at SAXParser.write (C:\Codebase\sample-domo\strong-soap-demo\node_modules\sax\lib\sax.js:1391:13)
    at WSDL.xmlToObject (C:\Codebase\sample-domo\strong-soap-demo\node_modules\soap\lib\wsdl\index.js:443:11)
    at Server._process (C:\Codebase\sample-domo\strong-soap-demo\node_modules\soap\lib\server.js:251:29)
    at Server._processRequestXml (C:\Codebase\sample-domo\strong-soap-demo\node_modules\soap\lib\server.js:166:18)
    at IncomingMessage.<anonymous> (C:\Codebase\sample-domo\strong-soap-demo\node_modules\soap\lib\server.js:235:25)

    I have done the same process for another WSDL, worked fine. But this time, its just weird. ANY help is appreciated!! Please reach out if you know anything about the issue.

    Marco Savelli
    Hi guys!
    Marco Savelli
    I've a problem: Error: Invalid WSDL URL: http://<omissis>/WCFService.svc?xsd=xsd0
    Code: 401
    I've set NTLM auth via client.setSecurity(new soap.NTLMSecurity(loginData));
    with loginData having username, password, domain and workstation
    here is my code
    var soap = require('soap');
    var url = './DocumentiWCFService.wsdl';
    soap.createClientAsync(url).then((client) => {
        var loginData = { username: MYUSER, password: MYPASS, domain: MYDOMAIN, workstation: MYWS };
        client.setSecurity(new soap.NTLMSecurity(loginData));
        return client.Documents_GetAll();
    }).then((result) => {
    Zach Perkins
    Hi! I have an application where we don't ever care about any of the XML attributes that come back, just the values of each returned field. When the API returns attributes, node-soap changes the shape of the object to put the value in $value and the attributes in attributes, but, when it doesn't, this object is not formed. Is there any way to make this function consistently one way or the other (either with the $value object or without the $value object, preferably without)?
    Matija Urh
    Hello (sorry if I'm not using correct terminology), I have a scenario where I "call some method" on WSDL and get response object, then I change something in this object and send it back to some other method on WSDL. But when I send object back I used rawRequest to inspect what I'm sending and I noticed that for example "date of birth" (which is in format 1979-11-24T23:00:00.000Z) is empty - any ideas why this gets omitted ?

    Any idea why the overrideRootElement option might sometimes not work?

    const options = {
        namespaceArrayElements: false, // This works!
        envelopeKey: 'SOAP-ENV', // This works!
        overrideRootElement: {
            namespace: 'ns1', // This DOES NOT work!
            xmlnsAttributes: [{ // This DOES NOT work!
                name: 'xmlns:ns1',
                value: "http://some.domain"
    const client = await soap.createClientAsync(MyWsdlUrl, options);
    client.myApiMethod(params, (result) => {

    This is the XML it generates:

    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                Name space and xmlns attributes are not changing!
    Hey! Can someone tell me if Node-Soap follows redirects, HTTP Status Code 301? And if so how I go about enabling that feature?

    Hey! Can someone tell me if Node-Soap follows redirects, HTTP Status Code 301? And if so how I go about enabling that feature?

    I should be a little more specific. I am specifically asking when making the SOAP calls if the client will handle the redirects or do I have to do something special to make this happen. Currently, it is not following the redirects and and I can't quite figure out how to accommodate for this.

    Orgad Shaneh
    Hi. formidable@v1 is deprecated. Do you plan upgrading to v2 or v3 anytime soon?

    Hi! This is my first time using SOAP, I have a node.js application that needs to integrate with an application that provides a SOAP api. They only have Java documentation so I am trying to figure out how to do this...

    I have managed to create the client but I get an error going any further. I am trying to authenticate, I have the 3 required params and an example Java snippet. The Java snippet is:

    IntimeServiceV3_0Stub.Authenticate auth=new IntimeServiceV3_0Stub.Authenticate();
    IntimeServiceV3_0Stub.AuthenticateResponse authResp=stub.authenticate(auth);
    String ticket=authResp.get_return();
    System.out.println("Authentication token:" + ticket);

    I am wondering how I go about converting that to using node-soap, I have at present:

    client.authenticateAsync("agencyRefCode", "username", "password")
            .then(res => {
            .catch(err => {

    I have tried a few variations of the aboe. There is also an authenticate method available on the client for non-async requests but the same error is returned each time. Any help would be greatly appreciated!

    how can i add name space to header
    i don't understand how to use client.addSoapHeader
    I add it by postProcess, is there better way?
    Hi Team, I faced a issue when launch a soap into a network through a proxy, any suggest?
    Israel Wegierski
    Hi folks, i am new in world of SOAP and can't understand if my code need any more. I use express-soap over node-soap and this is my code:
    const express = require('express')
    const { soap } = require('express-soap')
    const db = require('./db')
    const app = express()
    const port = 3000
            services: {
                TransactionService: {
                            idTransaccion, idCuenta, codigoRespuesta, codigoAutorizacion, importe, importeDevolucion, moneda,
                    ) {
                            `INSERT INTO transaction (idTransaccion, idCuenta, codigoRespuesta, codigoAutorizacion, importe, importeDevolucion, moneda) VALUES (?,?,?,?,?,?,?)`,
                                idTransaccion, idCuenta, codigoRespuesta, codigoAutorizacion, importe, importeDevolucion, moneda,
                            (err, results) => {
                                if (err) {
                                            'error for not have camps',
                                } else {
                                    if (results.insertId !== null) {
                                            TransactionResult: '00',
            wsdl: `<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema"
                        <s:schema elementFormDefault="qualified" targetNamespace="http://www.italcred.com">
                            <s:complexType name="Transaction">
                                    <s:element minOccurs="1" maxOccurs="1" name="idTransaccion" type="s:string" />
                                    <s:element minOccurs="1" maxOccurs="1" name="idCuenta" type="s:string" />
                                    <s:element minOccurs="1" maxOccurs="1" name="codigoRespuesta" type="s:string" />
                                    <s:element minOccurs="1" maxOccurs="1" name="codigoAutorizacion" type="s:string" />
                                    <s:element minOccurs="1" maxOccurs="1" name="importe" type="s:double" />
                                    <s:element minOccurs="1" maxOccurs="1" name="importeDevolucion" type="s:double" />
                                    <s:element minOccurs="1" maxOccurs="1" name="moneda" type="s:string" />
                            <s:element name="TransactionResponse">
                                        <s:element minOccurs="1" maxOccurs="1" name="TransactionResult" type="tns:string" />
                    <wsdl:message name="TransactionSoapIn">
                        <wsdl:part name="parameters" element="tns:Transaction" />
      <wsdl:message name="TransactionSoapOut">
                        <wsdl:part name="parameters" element="tns:TransactionResponse" />
                    <wsdl:portType name="TransactionService">
                        <wsdl:operation name="Transaction">
                            <wsdl:input name="Transaction" message="tns:TransactionSoapIn" />
                            <wsdl:output name="Transaction" message="tns:TransactionSoapOut" />
                    <wsdl:binding name="TransactionService" type="tns:TransactionService">
                        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
                        <wsdl:operation name="Transaction">
                            <soap:operation soapAction="http://localhost:3000/soap/transaction" style="document" />
                                <soap:body use="literal" />
                                <soap:body use="literal" />
                    <wsdl:service name="Servicio">
                        <wsdl:port name="TransactionService" binding="tns:TransactionService">
                            <soap:address location="http://localhost:3000/soap/transaction" />
                </wsdl:definitions>`, // or xml (both options are valid)
    app.listen(port, () => {
        console.log(`App listening on port ${port}`)
    when send
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <Transaction xmlns="http://localhost:3000/soap/transaction">
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:tns="http://www.italcred.com" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/">
                    <soap:Text>TypeError: Cannot read property &apos;outputName&apos; of undefined</soap:Text>
    i can't understand what part need outputName
    Venkata Maddineni
    I could someone please help me here please. i am getting this error when i am making a call to the endpoint. am running node soap on an express backend project. . But the response is 200
    TypeError: Cannot read properties of undefined (reading 'description')
    at SAXParser.p.onopentag (/Users/jupiterblue/Projects/sandbox/soap/node_modules/soap/lib/wsdl/index.js:241:37)
    at emit (/Users/jupiterblue/Projects/sandbox/soap/node_modules/sax/lib/sax.js:624:35)
    at emitNode (/Users/jupiterblue/Projects/sandbox/soap/node_modules/sax/lib/sax.js:629:5)
    at openTag (/Users/jupiterblue/Projects/sandbox/soap/node_modules/sax/lib/sax.js:825:5)
    at SAXParser.write (/Users/jupiterblue/Projects/sandbox/soap/node_modules/sax/lib/sax.js:1391:13)
    at WSDL.xmlToObject (/Users/jupiterblue/Projects/sandbox/soap/node_modules/soap/lib/wsdl/index.js:446:11)
    at parseSync (/Users/jupiterblue/Projects/sandbox/soap/node_modules/soap/lib/client.js:289:36)
    at /Users/jupiterblue/Projects/sandbox/soap/node_modules/soap/lib/client.js:496:24
    at /Users/jupiterblue/Projects/sandbox/soap/node_modules/soap/lib/http.js:199:13
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
    3 replies
    hello how can I sign a header
    Lukas Prömer

    Hey. Has someone experience using soap in an Angular App.

    I do get a lot of errors like:
    Error: ./node_modules/xml-crypto/lib/signed-xml.js
    Module not found: Error: Can't resolve 'fs' in 'project-folder\node_modules\xml-crypto\lib'

    Previously we used ngx-soap. But ngx-soap has no updates for angular11+

    1 reply
    Michael Schramm


    I'm having problems with a WSDL File that has complex types that are extended from oneanthother.

    in a operation it will then resolve all fields to be of the same namespace while they are actually from different namespaces.

    A { a: string }, B extends A { b: number } - operation(B)

    doing something like operation({ a: "1", b: "2" }) I would need the xml to be something like <A.a>1</A.a><B.b>2</B.b>. But the Result is then <B.a>1</B.a><B.b>2</B.b>

    any Idea how I could best debug this within the code? Right now I'm trying to print out everything in WSD.objectToXML and just see that the nsPrefix is then always B (also for the ones that should have namespace A)

    Michael Schramm
    I am thinking right now that the problem is coming from within the wsdl parser -> as only arrays seem to have the correct namespace assigned.
      input: {
        VUNr: 'VUNr|xsd:string|minLength,maxLength',
        ClientId: 'xsd:string',
        'TechnischeParameter[]': {
          Key: 'xsd:string',
          Value: 'xsd:string',
          targetNSAlias: '__tns__',
          targetNamespace: 'urn:CommonServiceTypes-1-1-0'
    Helder Afonso de Morais
    HI. I am getting this error: Failed to bind to WSDL. I have the same WSDL fila working in PHP, so, it is ok.
    Yan-Fa Li

    Hi, I'm trying to use v0.43, but it ships with a very old version of Axios 0.21, because of this it fails typescript checks when I pass it an AxiosInstance 0.26 using options.request. A couple of thoughts, I can work around it by making axios: any, not optimal.

    Is there a way to not bundle axios but refer to a dependency? Or alternatively, could you just upgrade to a newer release? I believe 0.21 has security issues. https://snyk.io/vuln/npm:axios@0.21.1

    Yan-Fa Li
    It's not stated in the docs, but is the assumption that clients must be created per request? i.e. you should not share a client between different parallel requests? Or is it possible to create a request pool of clients and re-use them?
    Dean Vaughan


    im having a issue with parsing a soap file

    RangeError: Maximum call stack size exceeded
    at ElementElement.description
    anyone else had this issue an found any workarounds?
    When using WSSecurityCert, is it possible to override theBinarySecurityToken?
    It appears a critical vulnerability was raised recently on 'formidable' in Snyk - https://security.snyk.io/vuln/SNYK-JS-FORMIDABLE-2838956
    Recommended fix is to update to 3.2.4 and above. Are there any plans to update this dependency? I did see an open PR but that is only to update to v2 and seems to be facing build issues.
    Guillaume Ambrois
    Hey, I'm having this error when making a SOAP call that responds with something not expected in the WSDL file, does that ring a bell to anyone?
    Error occurred in handler for 'MSSANTE_LIST_EMAILS': TypeError: Cannot read property 'description' of undefined
        at SAXParser.p.onopentag (/Users/myUser/Saturn/dist/webpack:/node_modules/soap/lib/wsdl/index.js:238:1)
        at emit (/Users/myUser/Saturn/dist/webpack:/node_modules/sax/lib/sax.js:624:1)
        at emitNode (/Users/myUser/Saturn/dist/webpack:/node_modules/sax/lib/sax.js:629:1)
        at openTag (/Users/myUser/Saturn/dist/webpack:/node_modules/sax/lib/sax.js:825:1)
        at SAXParser.write (/Users/myUser/Saturn/dist/webpack:/node_modules/sax/lib/sax.js:1391:1)
        at WSDL../node_modules/soap/lib/wsdl/index.js.WSDL.xmlToObject (/Users/myUser/Saturn/dist/webpack:/node_modules/soap/lib/wsdl/index.js:443:1)
        at parseSync (/Users/myUser/Saturn/dist/webpack:/node_modules/soap/lib/client.js:289:1)
        at /Users/myUser/Saturn/dist/webpack:/node_modules/soap/lib/client.js:496:1
        at /Users/myUser/Saturn/dist/webpack:/node_modules/soap/lib/http.js:199:1
        at processTicksAndRejections (internal/process/task_queues.js:93:5) {
    3 replies
    Daniel Saewitz
    Has anyone been able to use node-soap with Cloudflare workers?
    Kurt Smith

    I am trying to use WSSecurityCert. And I am using additionalReferences :['was:To'] to sign the tag but I am getting

    Error: the following xpath cannot be signed because it was not found: //*[name(.)='wsa:To']

    and also
    TypeError: Cannot read property 'setSecurity' of undefined

    mohamad arifin
    hello,, this code use 'easy-soap-request',, i want to use node-soap but i dont know how,,please somebody change this code for node-soap use
    exports.findAll = (req, res, next) => {
        let server = req.body.server;
        let agencyCode = req.body.agencyCode;
        let branchCode = req.body.branchCode;
        let transactionCode = req.body.transactionCode;
        let userId = req.body.userId;
        let ic = req.body.input_ic;
        var date = new Date(); // Or the date you'd like converted.
        var reqDate = new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString();
        reqDate = reqDate.substring(0, reqDate.length - 5);
        const soapRequest = require('easy-soap-request');
        const fs = require('fs');
        const xml2js = require('xml2js');
        const url = `${server}`;
        const header = {
            'user-agent': 'SSIPR',
            'Content-Type': 'text/xml;charset=UTF-8',
        const xml = `<?xml version="1.0" encoding="UTF-8"?>
            <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:crs="http://tempuri.org/CRSService">
        // usage of module
        (async () => {
                const { response } = await soapRequest({ url: url, headers: header, xml: xml, timeout: 30000 }); // Optional timeout parameter(milliseconds)
                const { headers, body, statusCode } = response;
                    { tagNameProcessors: [ xml2js.processors.stripPrefix ]},
                        function (err, result) {
    1 reply
    Kendell R
    does anyone have any recommendations for soap clients that work with cloudflare workers/pages (no builtin node libraries)?
    Would be cool if we could await the addHeaders method of the client's security. I'm using a token which times out after 1h and refreshing that token could be done in the addHeaders method but for that to work it would become async and the client would have to await it in its _inspect method. Maybe we could add another optional method to the ISecurity interface called addHeadersAsync to be backwards-compatible.
    Sævar Már Atlason
    On master I see you have added the support of creating a soap Client from WSDL string. When can I expect that version to be published on npm?
    anyone faced "TypeError: Cannot read properties of undefined (reading 'description')" error ?
    i don't know what could cause this to happen when i tried a dummy soap service with a dummy wsdl the client.methodAsync worked fine but when i tried a real soap webservice and wsdl i got this error ,same service works fine with soapui .any help will be appreciated .

    Hello, I'm having this error in a Firebase Function using soap that was working fine for the last past two years

    Error: socket hang up
    >      at connResetException (node:internal/errors:692:14)
    >      at TLSSocket.socketOnEnd (node:_http_client:478:23)
    >      at TLSSocket.emit (node:events:539:35)
    >      at endReadableNT (node:internal/streams/readable:1345:12)
    >      at processTicksAndRejections (node:internal/process/task_queues:83:21) {
    >    code: 'ECONNRESET',

    I made no code change no library update in the two weeks before having this issue.

    I have posted on StackOverflow if you need more information :