Tag: soap

格式化SOAP请求信封

我正尝试使用节点js格式化SOAP请求信封,应该如下所示: <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://xml.apache.org/xml-soap" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"> <env:Body> <env:getStaffRecords env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> <params xsi:type="ns1:Map"> <item> <key xsi:type="xsd:string">limit</key> <value xsi:type="xsd:string">3</value> </item> <item> <key xsi:type="xsd:string">page</key> <value xsi:type="xsd:string">1</value> </item> </params> </env:getStaffRecords> </env:Body> </env:Envelope> 我提到: https : //loopback.io/doc/en/lb3/Strong-soap.html#xml-attributes 但是,我无法得到预期的产出。 下面是我的演示代码和输出。 "use strict"; var soap = require('strong-soap').soap; var WSDL = soap.wsdl; var url = "https://testrequest.ch/api/soap/whoswho/wsdl"; // var args = […]

用xml2jsparsing

我是node.js新手,需要parsingXML 。 在JS中,我只是使用DOMParser并使用getElementsByTagName来获取我想要的值。 我刚刚切换到节点,并正在使用xml2js (愿意考虑替代品)。 我一直无法弄清楚如何parsing通过响应得到我所期待的。 代码如下: function parseBody(body){ var parseString = require('xml2js').parseString; var xml = body parseString(xml, function (err, result) { console.dir(result); }); 这里是传递给函数的XML: <soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:int=\"realURLHere"> <soapenv:Header/> <soapenv:Body> <int:readResponse> <response> <request>?</request> <cust> <fName>?</fName> </cust> </response> </int:readResponse> </soapenv:Body> </soapenv:Envelope> 这是我的function的输出: { 'soapenv:Envelope': { '$': { 'xmlns:soapenv': 'http://schemas.xmlsoap.org/soap/envelope/', 'xmlns:int': 'realURLHere' }, 'soapenv:Body': [ [Object] ] […]

使用base64string节点js soap空结果

我试图发送一个文件(大小为64Kb)的base64格式到我的.Net Web服务节点js使用soap,但结果是空的。 我不知道是否是因为base64string的大小,因为当我发送这个string为空时,它正常响应。 file = req.file; if(file){ file64 = base64_encode('public/assets/uploads/' + file.filename); } var args = {file: file64}; soapClient.uploadFile(args, function(err, result) { if(err){ console.log(err); }else{ var response = JSON.parse(result.uploadFileResult); if(!response.response){ console.log(response.message); }else{ //Handlers } } }); 当我在控制台中输出结果时,显示:{}

SOAP / AXL请求到CUCM失败,Node.js

所有, 感谢您抽出时间检查这个问题。 任何帮助表示赞赏,因为我是一个初学者。 我正在尝试使用Node.js将SOAP / AXL呼叫转移到v11.5 Cisco Callmanager。 我已经从这个人的博客复制代码有一个非常真棒解释: http : //blog.darrenparkinson.uk/2014/04/accessing-cisco-administrative-xml-axl.html 我已经validation用户具有AXL权限,并且在CAllmanager上启用了AXL服务。 我能够成功地运行相同的SOAP / AXL调用使用相同的凭据使用SoapUI相同的Callmanager成功。 但是,当我运行这个我得到一个http.599错误。 我有一个有趣的感觉,这与安全有关,但我不能把它放在手指上。 这是我的代码。 var https = require("https"); var authentication = 'username:password'; var headers = { 'SoapAction':'CUCM:DB ver=11.5', 'Authorization': 'Basic ' + new Buffer(authentication).toString('base64'), 'Content-Type': 'text/xml; charset=utf-8' } var soapBody = new Buffer('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axl="http://www.cisco.com/AXL/API/11.5">' + '<soapenv:Header/>' + '<soapenv:Body>' + […]

Node-SOAP不支持对参数进行编码

我有一个用专有语言编写的SOAP Web服务。 WSDL如下所示: <?xml version='1.0' encoding='UTF-8'?> <definitions name='UKBacklineService' targetNamespace='urn:CompanyName:SOAP/UKBackline' xmlns:wsdlns='urn:CompanyName:SOAP/UKBackline' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsdk='urn:CompanyName:SOAP/UKBackline/Schema' xmlns:kcml='http://www.kcml.com' xmlns='http://schemas.xmlsoap.org/wsdl/'> <message name='SOAP_UpdatePriorityCasesIn'> <part name='sJsonData' type='xsd:string' /> </message> <message name='SOAP_UpdatePriorityCasesOut'> <part name='return' type='xsd:string' /> </message> <portType name='UKBacklineIFInterface'> <operation name='SOAP_UpdatePriorityCases'> <documentation>Returns solution information in JSON format</documentation> <input message='wsdlns:SOAP_UpdatePriorityCasesIn'/> <output message='wsdlns:SOAP_UpdatePriorityCasesOut'/> </operation> </portType> <binding name='UKBacklineIFBinding' type='wsdlns:UKBacklineIFInterface'> <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/> <operation name='SOAP_UpdatePriorityCases'> <soap:operation style='rpc' […]

Soap请求使用Node.Js

我必须连接到一些使用SOAP 1.1 standard服务,并且用C#和Java编写的类向我发送文档。 我不能build立连接,它给了我错误的400错误的请求。 我从来没有使用SOAP请求的经验,也没有C#和Java的经验。 我可以放在这里是这个代码 const wsse = require('wsse'); const token = wsse({ username: config.get('serviceToConnect.auth.testUsername'), password: config.get('serviceToConnect.auth.testPassword') }); // eg 'UsernameToken Username="bob", PasswordDigest="quR/EWLAV4xLf9Zqyw4pDmfV9OY=", Nonce="d36e316282959a9ed4c89851497a717f", Created="2003-12-15T14:43:07Z"' request.post( { url: config.get('serviceToConnect.url.sessionRequestUrl'), body: new Buffer(bodyRequest), encoding: 'utf-8', headers: { 'Content-Type': 'text/xml; charset=utf-8', 'Content-Length': bodyRequest.length, 'Security': token.getWSSEHeader(), 'SOAPAction': 'urn:#AuthenticateUser' } }) 这是wsdl文件。 我想我需要提取SOAP操作URL。 但是这是什么? PS。 我用www.myService.com取代了原来的Url <?xml version="1.0" […]

node-expat导致npm与节点安装soap失败

我试图在Mac OSX上通过NPM安装节点js soap模块,试图手动安装,并指向expat.h等没有工作 npm安装肥皂 npm http GET https://registry.npmjs.org/soap npm http 304 https://registry.npmjs.org/soap npm http GET https://registry.npmjs.org/node-expat npm http GET https://registry.npmjs.org/request npm http 304 https://registry.npmjs.org/node-expat npm http 304 https://registry.npmjs.org/request > node-expat@1.6.0 install /Users/test/test1/node_modules/soap/node_modules/node-expat > node-waf configure build Checking for program g++ or c++ : /usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : […]

带有node.js和socket.io的SOAP客户端

我正在尝试使用Node.js创build一个Web应用程序。 我想使用socket.io来传输从soap服务中提取的数据。 我无法find关于此的任何信息。 什么是这种情况的最佳select。 马上: 我使用PHP来调用soap服务并检索数据。 我的客户端Java脚本使用AJAX对包含SOAP调用的PHP函数进行间隔调用(这是低效的,这就是为什么我想切换到socket.io设置)。 我想做什么: Node.js应用程序可能与高速 如果可能,使用PHP或Node.js进行SOAP调用。 从SOAP到客户端的数据stream使用socket.io进行查看 我不知道如果这个设置是可能的,我还没有find和良好的文档。 这可能吗? 如果是这样,那么最好的方法是什么,或者有一个教程呢?

NodeJS发送HTTPS SOAP请求

我试图使用nodejs在特定的终点发送一个SOAP请求。 我的请求如下所示: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://company.com/nse/types"> <soapenv:Header/> <soapenv:Body> <typ:Login> <!–You have a CHOICE of the next 2 items at this level–> <typ:Credential userName="x" password="y"/> </typ:Login> </soapenv:Body> </soapenv:Envelope> 我也有一个https端点 (例如https://hostname.com/box/ )和一个WSDL文件。 有人可以告诉我这样做的最好方法吗? 我正在通过英里/节点肥皂寻找,似乎无法find一个地方进入我所需的端点。

npm安装soap错误

我刚刚遇到了milewise / node-soap,当我运行npm install soap时,它失败,出现以下错误: sudo npm install soap npm http GET https://registry.npmjs.org/soap npm http 304 https://registry.npmjs.org/soap npm http GET https://registry.npmjs.org/node-expat npm http GET https://registry.npmjs.org/request npm http 304 https://registry.npmjs.org/node-expat npm http 304 https://registry.npmjs.org/request npm http GET https://registry.npmjs.org/qs npm http GET https://registry.npmjs.org/json-stringify-safe npm http GET https://registry.npmjs.org/forever-agent npm http GET https://registry.npmjs.org/tunnel-agent npm http GET https://registry.npmjs.org/http-signature npm http […]