Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info

    Hello everyone, I am trying to generate the following soap envelope:

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="" 

    I've tried several ways, if using an object I cannot obtain duplicate "idPersona" tags.
    If I use an array (with option namespaceArrayElements: false), my method is transformed to <getPersonaList_v2>, using "tns:getPersonaList_v2" as method name is not working too.


    Hello Everyone,

    I am trying to hit a soap request and whenever the size of my XML request increases, I get an error of ECONNRESET.

    Please, someone, help me.

    My SOAP call doesn't seem to be working as expected. The result of Client.MyMethod call is [object Object] but when I am doing client.lastResponse I can see the complete XML. Can someone please help?
    Can anyone tell me how to use GZIP in node-soap requests.
    It is urgent. Can someone help me with GZIP problem.
    Hi, I'm observing an issue with memory leak - it happens while soap.createClient creates multiple times and soap service responding with delay in 30 seconds, after 35 simultaneous connections in one time service starting to 'eat' memory and fail. The 'timeout' not really helps, it configured to 5sec, but since soap trying to createClient I assume it just making endless subscriptions to the emitter....May be someone faced this problem in past? I would like to get any help...
    Hey guys, hope you doing fine...
    does some one get this error before: TypeError [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:"
    really having a hard time trying to fixing it
    Ghulam Khwaja
    How to call a parameterized function of a php soap webservice using node-soap nodejs client?
    I was trying following but didn't work.
    var args = {username: 'admin', password:'admin'};
    soap.createClient(url, function(err, client) {
    client.authenticate(args, function(err, result) {
    Hey, i wanted to clerify somethig since i couldn't find it in the docs, does node-soap support wsdl's with multiple xsd reffrences and nested xsd refrences?
    Jan Opravil


    is it possible to remove namespace from xml request. I need to remove namespace "voip" from the xml? I already tried :

    client = await soap.createClientAsync(
            wsdl_options: {
              ignoredNamespaces: {
                namespaces: ['tns', 'targetNamespace', 'typedNamespace', 'voip'],
                override: true

    Thank you

    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap=""; 


    I'm not able to use ClientSSLSecurity with WSSTokenAuthentication. How to enable TLS with WSSToken authentication or any other authentication?

    Hi, when passing space chars inside a tag in request, the 'args' parameter passed to my end point function is trimmed... Any fix for this? I can't get any option to fix it... thanks!

    Hi folks I need help,
    trying to get this library with authentication working but I get connection refused.
    `var request = require('request');
    var soap = require('soap');
    var specialRequest = request.defaults({
    strictSSL: false

    var auth = "Basic " + new Buffer.from("USER:PASS").toString("base64");
    var options = { wsdl_headers: { Authorization: auth }, request: specialRequest };
    var url = 'wsdlpath'
    soap.createClient(url, options, function (err, client) {
    if(err) console.log(err);
    else {
    client.FUNCTION(ARGS, function (err, result) {
    if(err) console.log(err);
    else {

    I get this when calling the function:
    Error: connect ECONNREFUSED IP:8004 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) { errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: 'IP', port: 8004 }

    Hello every body , I have an incompleted defined WDSL , and get Cannot read property 'description' of undefined error for parsing response , How can I bypass this error?
    Or how can I use soap library without WSDL? or bad WSDL
    any body no there?
    @everybody I need help!
    @/all hello?
    Charles Burgess
    Hey there, new to the room and node-soap!
    I want a soapHeader with no prefixes but i do want an xmlns attribute.
    I tried this: client.addSoapHeader(json, "", "", xmlns);
    and had no luck - i tried undefined and it added the literal word "undefined"
    I want the result to look like the resulting code here:
    Charles Burgess
    I get the desired result if i set the prefix to TNS_PREFIX but that seems hacky to me
    Hi all. I'm new here, and I need help about parameters into URL.
    I need to define a web service (server) to hear from some paths: "/recipe" is one of them. This is done, and it's ok, as I define this service into my WSDL, start it, and ok. But I also need to define a different service which must start from the same path, but with additional components: "/recipe/tranID/{tranID}/patientID/{patientID}". With this, I don't know how to: first, receive those "tranID" and "patientID" parameters from URL (I received only posted parameters). And, then, how to call this service from client side (also with node-soap), as calling is done with JSON methods, without querying parameters. Could you please help me? Thanks in advance.
    Asaf Kfir
    Hey, I couldn't find any way that the node-soap will be able to retry a request. can this be configured?
    Hi. It's hard to believe that a such common operation won't be able with node-soap. I'm quite convinced that it could have a workaround. I'm now looking at customRequestHeader property of strong-soap.
    Asaf Kfir

    Hi. It's hard to believe that a such common operation won't be able with node-soap. I'm quite convinced that it could have a workaround. I'm now looking at customRequestHeader property of strong-soap.

    I couldn't find any way to do that. Have you found something? I've been researching for a few hours and ditched it for now. Will start researching again soon.

    I'm looking at addHttpHeader function, but it seems to send null values, as I saw in other webpages. Also, strong-soap has another property when calling client, customRequestHeader. In the worst case, it should be possible to manually work with the XML itself...
    I find a way to make addHttpHeader works. It's received from server side defining full properties to access req: prescriptions : function(args, callback, headers, req) { var idTransaccion = req.headers.idtransaccion; } . It must be accessed in lowercase, even if variable is defined in uppercase in client side. I can access and modify http headers, but not query parameters? This is weird...

    I can get some interesting parameters from server side accessing req.client.parser:

    I suppose _headers, 0, or _url could give us those URL parameters, but I cannot test it, as I don't know how to send those parameters from client side.

    Hi. No news from this topic? I'm really in a hurry with this, and it's the only remaining point to finish... At least, is it possible to call a web service with resources included into the URL? If so, I expect to be able to access to that property from server side.
    Kevin Wooten
    Hi all, can somebody explain the reason an HTTP 401 response with an empty body (i.e. Content-Length: 0) is treated as a valid empty response? This seems completely non-sensical.
    We discovered this and solved it ourselves using a request override, like this:
          createClientAsync(url, {request: (options: any, callback?: (error: any, res: any, body: any) => void): void => {
            req(options, (error: any, res: any, body: any) => {
              if (res.statusCode !== 200) {
                error = Error(res.statusMessage);
                error.statusCode = res.statusCode;
              callback?.(error, res, body);
    But why is something like this not the standard handler?
    Alex Vizcaino
    Hi all! I'm having some trouble with the Security Header. Due to specifications, my wsse:Security should be inside a saml:Assertion tag. Is there a way to do this?
    Has anyone here had success migrating from a .NET Framework project to this repo? More specifically using MTOM
    Chris Engelsma
    Has anyone here had success migrating from a .NET Framework project to this repo? More specifically using MTOM
    Greg Van Gorp
    Hey all, I'm trying to use this package for the first time to call one of my company's SOAP services. They have self signed certificates in place and other than disabling TLS, I can't seem to get around this. Is it possible for me to provide the cert as trusted for this package?
    Highly unlikely but is there any chance someone here has worked with the dealtrack api before?
    Hi, I'm having trouble with the Security Header. By default node soap sends the header with attribute "mustunderstand" to 1 when using WSSecurityCert (as you can see here One of my customer's API does not recognize that parameter and it returns an error. Is there a way to disable the "mustunderstand" attribute as is posible with normal WSSecurity object?
    In the Github page README, WSSecurity section: mustUnderstand: adds mustUnderstand=1 attribute to security tag (default: false)
    This option is not available for WSSecurityCert. Thank you!
    Parth Makadiya

    I am struggling with something. I want to create an app using node with Soap(server) and I am using our node-soap with node and express. I have predefined 100 responses which has S:Envelop and all you need for a res but now when I use to send with the function It will create a nested response with S:Envelop ,S:Body , FunctionName and inside I have CDATA and my xml file .

    I tried converting to object with some library and all but no luck.
    Can anyone help here? How can I send my custom response? (I just want to send response of my own from the file.)

    function getResponse(args, callback) {
      const number = args.Something.Number.$value;
      var output = "";
      const res = fs.readFileSync(`./data/${number}.xml`, { encoding: 'utf-8' });
      console.log(res);//get string xml response 
      parseString(res, function (err, result) {
        console.log('Done', result);//get the nodes
        callback({ res });
    / the service
    var serviceObject = {
    CJ Lazell
    Hi all! I am having an issue getting node-soap working, I keep running into this error TypeError: Cannot read property 'description' of undefined and I am wondering if it is because my wsdl file it is reading the xml is wrong?
    @marcinrog how did you go with WCF? I'm having the same issues
    Matteo Bertamini
    hi! I'm wondering if there's a way to remove a listener, so as to replace it
    Hi! i'm working in a simple consumer of service soap, but got a 400 bad request response, and i compare with a request from soapui and the most differents it's the namespaces "xmlns:xsi" and "xmlns:msc". I try ignore they with ignoredNamespaces, but still writting him on my XML request
    Kris Triplett
    I am having issues working with CDATA. If I format my element like so: <parent><![CDATA[Just some text]]></parent> it works fine, but as soon as there is additional XML inside the CDATA block (a requirement of the service I'm sending a request to), node-soap strips all data inside the <parent>.