Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    John Rossitter
    @johnatzark
    I got a quick Q: I am using the soap tool to access a 3rd party SOAP based API.
    I was able to connect to their API and get WSDL discovery working, however Im a bit confused about how to pass the paramenter/arguments stack to them.
    Their API takes all arguments in the Body, but broken up into objects. I tried making a JSON flavored version of the argument stack, but just cant seem to make it work
    sinksar
    @sinksar

    Hi,
    I hope that someone could help me. I have invested now months into Soap but still getting an confusing error: My Soap Service is communicating with another one. We are using both the same wsdl file. When I am sending informations to him there is no problem but if he is using my service he couldn't read my message (The other service is like a black box and I cannot read the error out of it)
    Anyhow:
    If I send a message the raw_result looks like this

    <tns:SomAction>
    <tns:MessageA>A</tns:MessageA>
    <tns:MessageB>B</tns:MessageB>
    <tns:MessageC>C</tns:MessageC>
    </tns:SomeAction>

    If I receive a message the result looks like this

    <SomAction>
    <MessageA></MessageA>
    <MessageB></MessageB>
    <MessageC></MessageC>
    </SomeAction>

    How can i get rid oft he tns stuff?

    John Rossitter
    @johnatzark
    Sadly it seems like this chat is not used very much by the team.
    many many unanswered questions
    sinksar
    @sinksar
    @johnatzark i have switched now to strong-soap => and finally all my problems are gone. Maybe you can give it a try to. See you there ;)
    John Rossitter
    @johnatzark
    I was able to get mine working finally too,
    I find the namespace mapping to be very troublesome in this tool. My soap envelop3 has over 279 namespace mappings to the exact same thing and the validation on the server takes FOREVER to process all of that
    LukasK07
    @LukasK07
    We are using node-soap in an angular application for consuming Webservice from the clients. Does anyone know how to this client as a signleton? At the moment we are permanently creating new client instances (incl. .wsdl/.xsd... request).
    Zach Luther
    @zluther89
    How can i look at the raw request? I'm getting an unexpected response from a server and I want to look at the raw request being sent to make sure it matches as expected?
    palbornoz
    @palbornoz_twitter

    We need to add both a SSL and a X509 Certificate in node-soap. Is possible?

    SSL Certificate
    client.setSecurity(new soap.ClientSSLSecurityPFX(
    './xxxxxxx.p12',
    'passw',
    {strictSSL: false,
    rejectUnauthorized: false,
    //secureOptions: require('constants').SSL_OP_NO_TLSv1_2
    }));

    and WS-Security X509 Certificate

    Thanks,
    Pablo

    Navi0419
    @Navi0419
    Hello anyone redirect me simple node soap request using certificate pfx
    Angel Kurten
    @angelkurten
    I need help
    var args = {
    codigoInformaciom: 3058,
    numeroItendiciacion: 1190747,
    tipoIdentificacion: 1,
    };
    var auth =
      'Basic ' + Buffer.from('419984' + ':' + 'Credi9').toString('base64');
    var options = {
      wsdl_options: {
        pfx: fs.readFileSync(__dirname + '/../creditoApp.pfx'),
        rejectUnauthorized: false,
        passphrase: 'creditoApp',
      },
      wsdl_headers: { Authorization: auth },
    };
    
    soap
      .createClientAsync(url, options)
      .then((client) => {
        log(client.describe());
        log(
          client.ProspectaPlusWSService.ProspectaPlus.consultaProspecta(args),
        );
        //return client.consultaProspecta(args);
      })
      .then((result) => {});
    The response is

    callback(error, result, rawResponse, soapHeader, rawRequest);
    ^

    TypeError: callback is not a function

    Navi0419
    @Navi0419

    Any help why I am gettig this error var request = require('request');
    var soap = require('soap');
    const fs = require('fs')
    const path = require('path');
    const https = require('https');
    var options = {
    'method': 'POST',
    wsdl_options: {
    forever: true,
    rejectUnauthorized: false,
    strictSSL: false,
    pfx: fs.readFileSync(path.join(__dirname, 'key/cis-client-dev.pfx')),
    passphrase: 'client@123!',
    secureProtocol : 'TLSv1_2_method',
    gzip : true,
    // key: fs.readFileSync('./cis-client-dev-key.pem', 'utf8'),
    // cert: fs.readFileSync('./cis-client-dev.cer', 'utf8')
    },
    wsdl_headers: {
    'Content-Type': 'text/xml',
    'Authorization': 'uat_admin',
    'Accept-Encoding': 'gzip, deflate, br',
    'Connection': 'keep-alive'
    },

    body: '<XML part>'
    };

    var url = 'https://gateway.integr-test.domain.uk:port/test/services/DocumentUploadService'
    soap.createClient(url, options, function (err, client) {
    console.log('Error' + err);
    console.log('Response back from DRS: ' + client);
    });

    Error
    ErrorError: Invalid WSDL URL: https://gateway.integr-url/test/services/DocumentUploadService

    Code: 500

    Response Body: <faultstring>The endpoint reference (EPR) for the Operation not found is /test/services/DocumentUploadService and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.</faultstring>
    Response back from DRS: undefined

    tp-dev1
    @tp-dev1
    Hi everyone, sorry for the noob question but this is my first time using a SOAP API. I'm trying to call a SOAP function which expects an object defined in its WSDL as an object. How do I reference this object in this package?
    I've had success doing this in C#, but Visual Studio created proxy objects automatically when I imported the WSDL file. Do I need to do that in Node.js too somehow?
    Jiří Pešík
    @pesikj

    Hello, I have a .NET application with a SOAP client with the following custom binding. Is it possible to rewrite this custom binding using node-soap? I have tried Python libraries zeep and suds and it did not work, probably because it does not fully support the specified settings. Is it possible to configure the node-soap to be compliant with the following settings? I am especially concerned by the MutualCertificate mode. Thank you.

    <binding name="X">
    <security defaultAlgorithmSuite="Basic128" authenticationMode="MutualCertificate" enableUnsecuredResponse="true" requireDerivedKeys="false" includeTimestamp="true" messageProtectionOrder="EncryptBeforeSign" messageSecurityVersion="WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" requireSignatureConfirmation="false">
    <localClientSettings detectReplays="false" />
    <localServiceSettings detectReplays="false" />
    </security>
    <textMessageEncoding messageVersion="Soap11" />
    <httpsTransport authenticationScheme="Basic" />
    </binding>

    ramnathan84
    @ramnathan84
    Hi can this module be used in react-native project?
    Matt St Jean
    @mattstjean
    Is it possible to use a string for port name with the client? The port for the service I am consuming is named "MyPort.1" but I keep getting errors when I try to call: client.MyService.MyPort.1.MyFunction(...). I've tried client.MyService.'MyPort.1'.MyFunction(...), and things like underscores etc. When I use client.describe() I get:
    { MyService: {
    MyPort: { MyFunction: [Object] },
    'MyPort.1': { MyFunction: [Object]},
    ...
    }}
    Matt St Jean
    @mattstjean
    Oh I missed the little bit about bracket notation, woops
    Teascade
    @Allexit:matrix.org
    [m]
    Hey. I'm attempting to develop something with node-soap and I'm having a weird issue
    When I call a method (no matter with methodAsync or method, or even with MyService.MyPort.method), I receive an empty response.
    The weird part is that if I use soapui and copy-and-paste the result from client.lastRequest, it works perfectly fine. node-soap just returns an empty response
    Any ideas?
    EviCoach
    @EviCoach
    I'm using the soap module, how can I get the raw xml request in my service, not in the client , but in the soap server?
    mads | she/her
    @1MaddieX
    how can we have multiple elements with the same name get returned?
    return { getMetadataResult: { index: 0, count: 1, total: 1, mediaCollection: { id: "trending", itemType: "container", title: "Trending", }, mediaCollection: { id: "new", itemType: "container", title: "New", }, }, };
    the last one just gets overtaken, but i need to have two or xml elements returned
    cameron-ethicalprofiling
    @cameron-ethicalprofiling
    Is it possible to have a node-soap's wsdl server act as "middleware", rather than as listener to a different port?
    Maty Ramirez
    @matigastirami_gitlab
    Hi people! I'm having a problem with the module
    I've fought a lot trying to mount the request correctly but when y finally did it, the services continues returning error 400
    that's my code:
    let client = await soap.createClientAsync(this.environmentUrl, {
                    ignoreBaseNameSpaces: true,
                    overrideRootElement: {
                        namespace: 'fac:',
                        xmlnsAttributes: [{
                            name: 'xmlns:fac',
                            value: "http://www.facturante.com.API"
                        },{
                            name: 'xmlns:fac1',
                            value: "http://schemas.datacontract.org/2004/07/FacturanteMVC.API"
                        }, {
                            name: 'xmlns:fac2',
                            value: "http://schemas.datacontract.org/2004/07/FacturanteMVC.API.DTOs"
                        }]
                    },
                    /*ignoredNamespaces: {
                        namespaces: ['targetNamespace', 'typedNamespace', 'tns', 'wsu', 'msc', 'i0'],
                        override: true
                    }*/
                });
    
                client.addHttpHeader('Content-Type', 'application/soap+xml; charset=utf-8');
                client.addHttpHeader('Connection', 'Keep-Alive');
    
                let resp = await client.CrearComprobanteAsync({
                    //'fac:CrearComprobante': {
                        'fac:request': {
                            'fac1:Autenticacion': this.parseSecondLevelObj(data.Autenticacion),
                            'fac1:Cliente': this.parseSecondLevelObj(data.Cliente),
                            'fac1:Encabezado': this.parseSecondLevelObj(data.Encabezado),
                            'fac1:Items': [ ...data.Items.map((item, i) => { 
                                return { 'fac2:ComprobanteItem': this.parseSecondLevelObj(item) }
                            }) ]
                        }
                    //}
                    /*...data, 
                    Items: data.Items.map((item, i) => { 
                        return { ComprobanteItem: {...item} }
                    })*/
                });
    If I copy the generated XML and put it into soap UI, it works well

    I tried to delete the next line too:

    client.addHttpHeader('Content-Type', 'application/soap+xml; charset=utf-8');

    But the service returns error 415

    Alexandre Tiertant
    @atiertant
    hi ! i just install with 'npm install soap' and just execute 'var soap = require('soap');' throw an error: TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    is the last version of npm buggy ?
    damix96
    @damix96
    Hi!
    How can i feed an wsdl string to soap client without saving it on filesystem?
    Luis Morales
    @luismoralescondor
    Hi people, nice to meet you
    I have a simple question, ¿How can we change default verb used by the request?
    My request is using POST, but i need yo use PUT
    Jon
    @jrista
    Anyone using the latest npm soap lib run into issues with tons of extra xmlns being generated and used in the document?
    This message was deleted
    Lea Reimann
    @lkreimann
    Hello everyone, is possible to remove or exchange the package httpntlm from the dependencies? We're getting security warnings bc of httpntlms dependency underscore and unfortunately httpntlm wasn't updated the last 3 years so I don't think they're going to update their package any time soon. Any thoughts on this? Sorry if this has been posted already!
    Kelly Hilliard
    @skhilliard
    Just wanted to add my request along with @lkreimann . Updating/replacing the httpntlm dependency would be greatly appreciated to get rid of this vulnerability that was just reported for underscore (https://npmjs.com/advisories/1674)
    Stephane
    @stondini

    @vpulim
    Hi Vinay,
    First, thank you for the great job you did with this library. I forked your code to add a test involving a very complex WSDL (WSDLs import, XSD with different namespace, complex types inheritence, etc.) :
    stondini/node-soap@533ff7c

    I'm not a JavaScript developer so it's hard to figure out the issue but the request seems not to be generated with the correct namespaces.
    The request XML is not generated as expect.
    Did you already face this kind of issue ?

    8 replies
    Jacob Page
    @DullReferenceException
    I believe that the version bump for the httpntlm package was recently merged: SamDecrock/node-http-ntlm#93
    1 reply
    Cliff Mayson
    @CliffMayson_twitter

    Hi Guys, can't seem to get the unit tests running on the project on master with no changes, eg after npm i, then npm run test I get the folllow error:

    should allow customization of httpClient and the wsdl file download should pass through it: Uncaught AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value: ,

    currently running node 16.1.0

    1 reply
    Jan Kowalski
    @johnykov
    hello, fellow, first of all I love node-soap! Amazing lib, helps a lot. But I still don't know and can't find an example of how to consume response with attachment that is of content-type type="application/xop+xml"
    and ideas?
    Jan Kowalski
    @johnykov
    ok I see one proposition of solution in PR
    Mukhammad Pardaboev
    @linc96pm

    Hi James, @allout58 did you solved this issue? cause I am facing the same problem right now. Any one can help please!

    Hi, I've got a problem creating the client. I've been able to get it working with another WSDL, but on pointing it to the new WSDL, it crashes with the following stacktrace

    TypeError: Cannot read property 'postProcess' of undefined
    at subElement.OperationElement.postProcess (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:651:12)
    at subElement.PortTypeElement.postProcess (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:671:11)
    at subElement.BindingElement.postProcess (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:685:14)
    at subElement.ServiceElement.postProcess (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:721:17)
    at C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:1038:26
    at WSDL._processNextInclude (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:1158:12)
    at WSDL.processIncludes (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:1201:8)
    at C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:1028:10
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
    at new WSDL (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:1021:11)
    at C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:2246:16
    at Request._callback (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\http.js:117:5)
    at Request.self.callback (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\request\request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\request\request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\request\request.js:1091:12)
    at emitNone (events.js:91:20)
    at Request.init (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\request\request.js:191:10)
    at new Request (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\request\request.js:130:8)
    at HttpClient.request [as _request] (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\request\index.js:54:10)
    at HttpClient.request (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\http.js:112:18)
    at open_wsdl (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\wsdl.js:2242:16)
    at C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\soap.js:21:7
    at _requestWSDL (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\soap.js:47:5)
    at createClient (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\soap.js:58:3)
    at C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\soap\lib\soap.js:68:5
    at Promise._execute (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\bluebird\js\release\debuggability.js:303:9)
    at Promise._resolveFromExecutor (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\bluebird\js\release\promise.js:483:18)
    at new Promise (C:\Users\jhollowell\WebProjects\swampticket2-backend\node_modules\bluebird\js\release\promise.js:79:10)`

    Here is my error stack trace TypeError: Cannot read property 'postProcess' of undefined
    at OperationElement.postProcess (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\elements.ts:874:15)
    at PortTypeElement.postProcess (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\elements.ts:914:13)
    at BindingElement.postProcess (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\elements.ts:968:16)
    at ServiceElement.postProcess (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\elements.ts:1042:19)
    at D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\index.ts:112:30
    at WSDL._processNextInclude (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\index.ts:1186:14)
    at WSDL.processIncludes (D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\index.ts:173:10)
    at D:\MY_PROJECTS\NODE-SOAP\node-soap-ts\node_modules\soap\src\wsdl\index.ts:101:12
    at processTicksAndRejections (internal/process/task_queues.js:75:11)
    1 reply