Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Israel Wegierski
    @israelmw
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <Transaction xmlns="http://localhost:3000/soap/transaction">
          <idTransaccion>"123456"</idTransaccion>
          <idCuenta>"1231"</idCuenta>
          <codigoRespuesta>"00"</codigoRespuesta>
          <codigoAutorizacion>"00"</codigoAutorizacion>
          <importe>500.0</importe>
          <importeDevolucion>500.0</importeDevolucion>
          <moneda>"PESOS"</moneda>  
        </Transaction>
      </soap:Body>
    </soap:Envelope>
    Obtain:
    <?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:Body>
            <soap:Fault>
                <soap:Code>
                    <soap:Value>SOAP-ENV:Server</soap:Value>
                    <soap:Subcode>
                        <soap:Value>InternalServerError</soap:Value>
                    </soap:Subcode>
                </soap:Code>
                <soap:Reason>
                    <soap:Text>TypeError: Cannot read property &apos;outputName&apos; of undefined</soap:Text>
                </soap:Reason>
            </soap:Fault>
        </soap:Body>
    </soap:Envelope>
    i can't understand what part need outputName
    Venkata Maddineni
    @venstack
    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
    Leoromero.Dev
    @Micnick
    hello how can I sign a header
    Lukas Prömer
    @LProemer

    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
    @wodka

    Hi,

    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
    @wodka
    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
    @helderam
    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
    @yanfali

    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

    :pray:
    Yan-Fa Li
    @yanfali
    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
    @DeanVau49163658_twitter

    Hi,

    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?
    Max
    @MrMaximus
    When using WSSecurityCert, is it possible to override theBinarySecurityToken?
    Eoin
    @EoinGr3y
    Hi,
    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
    @Epono
    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
    @switz
    Has anyone been able to use node-soap with Cloudflare workers?
    Kurt Smith
    @ksmith:matrix.org
    [m]

    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
    @mohamadarifin97.ma50_gitlab
    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">
                        <soapenv:Header/>
                        <soapenv:Body>
                        <crs:retrieveCitizensDataReq>
                            <AgencyCode>${agencyCode}</AgencyCode>
                            <BranchCode>${branchCode}</BranchCode>
                            <UserId>${userId}</UserId>
                            <TransactionCode>${transactionCode}</TransactionCode>
                            <RequestDateTime>${reqDate}</RequestDateTime>
                            <ICNumber>${ic}</ICNumber>
                            <RequestIndicator>A</RequestIndicator>
                        </crs:retrieveCitizensDataReq>
                        </soapenv:Body>
                    </soapenv:Envelope>`;
    
        // usage of module
        (async () => {
            try{
                const { response } = await soapRequest({ url: url, headers: header, xml: xml, timeout: 30000 }); // Optional timeout parameter(milliseconds)
                const { headers, body, statusCode } = response;
                xml2js.parseString(body.toString(),
                    { tagNameProcessors: [ xml2js.processors.stripPrefix ]},
                        function (err, result) {
                            res.status(200).json(result);
                    })
            }catch(err){
                next(err);
            }
        })();
    }
    1 reply
    Kendell R
    @ktibow:matrix.org
    [m]
    does anyone have any recommendations for soap clients that work with cloudflare workers/pages (no builtin node libraries)?
    Oscar
    @Kexplx
    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
    @saevarma
    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?
    Sbsouhail
    @Sbsouhail
    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 .
    CromSoldier
    @CromSoldier

    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 :
    https://stackoverflow.com/questions/73907048/firebase-functions-using-soap-finishing-with-econnreset-socket-hang-up

    CromSoldier
    @CromSoldier
    To add more information on my problem, I see that the protocol used by the service to which I want to connect is TCL1.3, could it be a conflict with the lib if it uses TLC1.2 ?
    pbmzero
    @pbmzero
    Has anyone tried using a WSDL with xs:date and passing dates that include the time zone? If my remote server sends a valid xs:date date such as 2022-10-30-07:00 for pacific time, the parser seems to return Invalid Date even though this complies with the w3 XML schema for DataTypes. To work around the issue I have to save the WSDL locally and hack it so that it comes as a xs:string then convert that to a Javascript Date field. Seems unusual it can't deal with regular SOAP specifications that have been around forever.
    2 replies
    CRISNAMURTI EVARISTO SILVA DO VALE
    @crisnamurti
    Hi, how can i create node-soap server that wsdl imports another wsdl???
    5 replies
    Eric Wein
    @ewein
    Hi, can anyone show me how to create a node-soap server which uses mutual ssl authentication?
    1 reply
    [pihentagy]
    @pihentagy:matrix.org
    [m]

    Hi!
    I am new to combining node.js and soap (but not new to them separately)

    I have the following snippet:

      console.log('About to fetch client');
      const res = await fetch(wsdl);
      console.log('It is available!');
      console.log(await res.text());
      const soapClient = createClientAsync(wsdl);

    What could cause the last line to throw an error if all the previous lines succeed?

    I got back

    backend_1  | [ERROR] 16:57:04 TypeError: Cannot read properties of undefined (reading 'create')
    5 replies
    Serezha
    @Serezhaua

    TypeError: Cannot read properties of undefined (reading 'create')
    at new HttpClient (/var/www/html/node_modules/soap/lib/http.js:40:59)
    at Object.open_wsdl (/var/www/html/node_modules/soap/lib/wsdl/index.js:1270:48)
    at openWsdl (/var/www/html/node_modules/soap/lib/soap.js:70:16)
    at /var/www/html/node_modules/soap/lib/soap.js:48:13
    at _requestWSDL (/var/www/html/node_modules/soap/lib/soap.js:76:9)
    at createClient (/var/www/html/node_modules/soap/lib/soap.js:94:5)
    at /var/www/html/node_modules/soap/lib/soap.js:104:9
    at new Promise (<anonymous>)
    at Object.createClientAsync (/var/www/html/node_modules/soap/lib/soap.js:103:12)
    at /var/www/html/scenes/cabinetScene.js:21:35

    How to solve this problem ?

    const client = await soap.createClientAsync(urlWSDL, {
    wsdl_headers: {Authorization: auth1С}
    } );
    await client.addHttpHeader('Authorization', auth1С)

        const phoneAbonent = phoneClient 
        const abonent = {phone: phoneAbonent}
    
        client.GetOsobr(abonent, async function (err, res) {
            const result = JSON.parse(res.return)
            const item = result.data
            if (item.length) {
                item.forEach(el => {
                    const numberClient1C = el.phone
                    ctx.session.osobrPhoneAbonent = numberClient1C
                    client.GetPhoneName(abonent, async function (err, res) {
                        const result = JSON.parse(res.return)
                        const item = await result.data
                        let name = ''
    
                        item.forEach(el => {
                            name = el.nameo
                        })
                        ctx.session.NameAbonet = name
                        await ctx.replyWithHTML(`\u{1F44B} <b>${name}</b>, `,
                            Markup
                                .keyboard([['\u{1F4DD}  '\u{1F440} '], ['\u{1F4CB} '], ['\u{1F50D}'], ['\u{1F4CE} ']],)
                                .oneTime()
                                .resize())
                    })
                    ctx.scene.enter('usercabinet')
                })
    Serezha
    @Serezhaua
    how to solve this problem?
    [pihentagy]
    @pihentagy:matrix.org
    [m]
    Downgraded to 0.42
    Serezha
    @Serezhaua
    @pihentagy:matrix.org
    downgrade what?
    [pihentagy]
    @pihentagy:matrix.org
    [m]
    soap npm package
    Marcos Munoz
    @marcosmunoz__twitter
    It worked! I downgraded to 0.43
    [pihentagy]
    @pihentagy:matrix.org
    [m]
    Any maintainers here?
    Tommy Tran
    @tommyhtran
    @Serezhaua @marcosmunoz__twitter Is Axios a dependency in your package.json?
    1 reply
    pihentagy
    @pihentagy:matrix.org
    [m]
    It is a popular package, and
    • has version 0.x 😱
    • has bug in latest version for months ☹️
    Tommy Tran
    @tommyhtran
    A lot of popular packages don't get maintained very well
    I'm quite sure your issue is that you don't have Axios in your package.json
    [pihentagy]
    @pihentagy:matrix.org
    [m]
    And what is different in say 0.42?
    Tommy Tran
    @tommyhtran
    Marcos downgraded to 0.43 and says that worked. In 0.44, Axios became a peer dependency. npm v3 - v6 does not install peer dependencies by default.
    [pihentagy]
    @pihentagy:matrix.org
    [m]
    My test failes right when you just parse the wsdl with the lib. Is it the same reason? const soapClient = createClientAsync(wsdl);
    And how date parsing is related to axios btw?
    Is defining Axios a peer dependency a good step?
    Tommy Tran
    @tommyhtran
    If your stack trace matches Serezha's, then yes. The error is coming from https://github.com/vpulim/node-soap/blob/master/src/http.ts#L42 when it tries to call Axios's create() function. Date parsing is not related to Axios. I don't know if defining it as a peer dependency is a good idea. The argument for it is that it allows users to update Axios in their own projects independently from node-soap.
    [pihentagy]
    @pihentagy:matrix.org
    [m]
    Thanks for the explanation. As you pointed out (and as the docs says), the default request module is axios since 0.40.
    IMHO the constructor should at least complain about axios being not available. Or, better: it should not provide a default request and persuade callers to specify the request option.
    If it is decided, I would try to make a PR for it.
    [pihentagy]
    @pihentagy:matrix.org
    [m]
    Hm, should npm i axios resolve the issue?
    [pihentagy]
    @pihentagy:matrix.org
    [m]
    And eh, I cannot replace it with http.request, or how can I match this option? request?: req.AxiosInstance;