node-soap

Using Node to call SOAP Web Service over https

隐身守侯 提交于 2020-05-10 06:46:06
问题 I am trying to use node-soap https://github.com/vpulim/node-soap to call a web service but I am having trouble using the module with https . In the code below I am using http and I can see the functions and log a describe() of the About function. (Responses are empty, probably because the WS is setup like that when using http(?)) var soap = require('soap'); var url = "http://XXXXX/service.svc?DocArchiveService/DocArchiveV201409"; var auth = "Basic " + new Buffer("USERXXX" + ":" + "PWYYY")

How to pass Authentication Header to node-soap

纵饮孤独 提交于 2019-12-23 03:11:17
问题 I am trying to use a wsdl service as a client but I cannot find how to set some headers. The reason I need this is because the wsdl I am trying to use requires the username and password via the headers. this is wsdl > POST /Service.asmx HTTP/1.1 > Host: 210.12.155.16 > Content-Type: text/xml; charset=utf-8 > Content-Length: length > SOAPAction: "http://yyyy.com:1002/apability" > > <?xml version="1.0" encoding="utf-8"?> > <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >

How do you get the server url to give to the client when using Node-soap or Strong-soap

六眼飞鱼酱① 提交于 2019-12-11 07:35:40
问题 I am writing a service with node.js' node-soap package. The service seem to run okay when I do "node myService.js". Now, how do I get the url that would be given to the client? If you want my wsdl file, "myservice.wsdl" as per the code below please let me know. here is my code var http = require('http'); var soap = require('soap'); var express = require('express'); var bodyParser = require('body-parser'); var myService = { MyService: { MyPort: { post_csvDoc: function(csvDoc) { return 200; },

Send a request with arrays in Node-soap (node.js)

雨燕双飞 提交于 2019-12-11 03:13:43
问题 I am communicating to a web service using nodejs and node-soap. But i just can't seem to get the syntax right for passing the parameters to the service. The documentation says i need to send an array with the field uuid and its value. Here is the Php code i got as an example from the web service owner $uuid = "xxxx"; $param = array("uuid"=>new SoapVar($uuid, XSD_STRING, "string", "http://www.w3.org/2001/XMLSchema") ) and here is the code i am using in my node server function getSoapResponse()

How to see request and response data in node soap?

泪湿孤枕 提交于 2019-12-10 15:55:45
问题 I am trying to consume a soap api using node soap. My response cannot be parsed and I wonder how to see the request and response data to console to ease the error finding process. 回答1: As node soap uses the request library, one can debug it via: NODE_DEBUG=request node src/index.js as pointed out request's Readme.md: Debugging There are at least three ways to debug the operation of request : Launch the node process like NODE_DEBUG=request node script.js ( lib,request,otherlib works too). Set

How can I configure the Root Element of a node-soap request body?

a 夏天 提交于 2019-12-10 15:17:33
问题 I'm trying to call a SOAP method using the node-soap package. My service's WSDL is: <wsdl:definitions name="PublicoService" targetNamespace="http://tempuri.org/"> <wsdl:import namespace="" location="http://10.10.0.45:56777/Services/PublicoService.svc?wsdl=wsdl0"/> <wsdl:types/> <wsdl:binding name="CustomBinding_PublicoService" type="PublicoService"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="GetAllDepartamento"> <soap:operation soapAction="urn

Namespace for array field in node-soap client (Node.js)

。_饼干妹妹 提交于 2019-12-10 14:49:49
问题 How to configure node-soap client set namespace for array not only for objects? My params for 'sendPatient' method: params = { patientCard: { patient: { firstName: 'test', lastName: 'test' }, identifiers: { code: "123456789", codeType: 1 } } }; client.sendPatient(params, ...) node-soap produce: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://xxx/patient/api/" xmlns:bi="http://xxx/base/info/build/">