Search code examples
soapsoapuieconnreset

CALLING A WEB SERVICE FROM THE CODE (NODE.jS) I GET ECONNRESET


Unfortunately I cannot overcome a problem by making a SAOP request. The problem is that I always get ECONNRESET from node.js. Strangely, with SOAPUI everything works without problems. For the moment I have tried to do the following tests without getting results:

  1. Turn off all antivirus
  2. Try to call the service from postman Now I wanted to try to write the code in Java but I'm not sure if it makes sense and while I think of a solution I write here hoping that someone can help me. I provide some information: Thanks in advance for any suggestions

From Node.js I raised the debug level the error I get is the following:

Error: ECONNRESET read

at TCP.onStreamRead (internal / stream_base_commons.js: 201: 27)
at Socket.Readable.on (_stream_readable.js: 867: 35)
at tickOnSocket (_http_client.js: 672: 10)
at onSocketNT (_http_client.js: 723: 5)
at processTicksAndRejections 
(internal / process / task_queues.js: 80: 21)
at ClientRequest.onSocket (_http_client.js: 711: 11)
at setRequestSocket (_http_agent.js: 366: 7)
at handleSocketCreation_Inner (_http_agent.js: 359: 7)
at oncreate (_http_agent.js: 231: 5)
at Agent.createSocket (_http_agent.js: 236: 5)
at Agent.addRequest (_http_agent.js: 193: 10)
at new ClientRequest (_http_client.js: 276: 16)
at Object.request (http.js: 44: 10)
at Request.start 

With SOAPUI everything works without problems:

Some information about the service runned correctly from soapUI:

---------------------------SOAPUI REQUEST-----------------------------------

POST http: // MY-IP: 7563 / recorderstatusservice / recorderstatusservice2.asmx HTTP / 1.1

Accept-Encoding: gzip, deflate

Content-Type: text / xml; charset = UTF-8

SOAPAction: "http://videoos.net/2/XProtectCSRecorderStatus2/GetRecorderStatus"

Content-Length: 375

Host: MY-IP : 7563

Connection: Keep-Alive

User-Agent: Apache-HttpClient / 4.1.1 (java 1.5)

------------------------------SOAPUI RESPONSE------------------------------

HTTP / 1.1 200 OK

Server: XProtect Recording Server 12.2a

Dates: Fri, Mar 19 2021 21:45:37 GMT

Cache-Control: private, max-age = 0

Content-Type: text / xml; charset = utf-8

Content-Length: 488


Solution

  • After several tests to understand I tried to use another nodes module called SOAP and I got over the problem.