Tag: wsdl

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" […]

SOAP请求使用nodejs

嗨,任何人都可以帮助我。 如何请求soap web服务并获取xml响应。 Senario:使用肥皂用户名,密码validation发送wsdlurl,我也将发送肥皂XML数据,我得到的回应。 同样的事情如何使用nodejs或sails进行存档。 在SoapUi中我的soap xml请求就像 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tier="http://HCSLN9191-GMS.gois.ito.unisys.com/Tier1ICLStd:Tier1ICLMB_StdDispatch"> <soapenv:Header/> <soapenv:Body> <tier:UnisysMB_Dispatch> <PayLoad>SomeData</PayLoad> </tier:UnisysMB_Dispatch> </soapenv:Body> </soapenv:Envelope> 和我的肥皂authentication是一样的 $用户名:xyz和密码:xyz 我的wsdlurl是http://esbuatt1wm.ito.xyz.com:7001/ws/Tier1ICLStd_New:Tier1ICLMB_StdDispatch_New?WSDL 提供这些信息之后,我得到了类似的XML响应 <ser-root:CommAck xmlns:ser-root="http://HCSLN1181-GMS.gois.ito.unisys.com/Tier1ICLStd_New:Tier1ICLMB_StdDispatch_New" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <CommAck> <MB_UUID>cbbb683d-e9b1-4d12-b0db-8006134aad27</MB_UUID> <ServiceID>McDonalds</ServiceID> <Acknowledge>0</Acknowledge> <Comment>Payload does not contain the pattermatch xpath.</Comment> </CommAck> </ser-root:CommAck> 我的问题是如何使用节点易皂上面的xml响应,我是新的肥皂概念。 可以anyboud帮助我给上述senario适当的片段…..

如何使用nodejs soap创buildwsdl soap请求

我用node.js的肥皂发送肥皂请求,但我不断收到错误。 在SoapUI中,我的xml如下所示: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:acl="http://schemas.datacontract.org/2004/07/Acl.WcfService.Model"> <soapenv:Header/> <soapenv:Body> <tem:GetOrder> <!–Optional:–> <tem:args> <!–Optional:–> <acl:ApiKey></acl:ApiKey> <!–Optional:–> <acl:OrderId></acl:OrderId> </tem:args> </tem:GetOrder> </soapenv:Body> </soapenv:Envelope> 这是我的代码: var args = { 'args': { 'ApiKey' : '***', 'OrderId' : '***' } }; soap.createClient(wsdlURL, function (err, soapClient) { soapClient.GetOrder(args, function (err, result) { //the result goes here if (err) { console.log(err); return; } console.log(result); […]

节点肥皂:如何创build具有特定属性的复杂消息?

这是我需要发送给wsdl的消息: <?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://WSDLPROVIDER" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:enqueue> <domain xsi:type="xsd:string">STH</domain> <messageBodies SOAP-ENC:arrayType="xsd:string[1]" xsi:type="SOAP-ENC:Array"> <item xsi:type="xsd:string">STHE</item> </messageBodies> <recipientNumbers SOAP-ENC:arrayType="xsd:string[2]" xsi:type="SOAP-ENC:Array"> <item xsi:type="xsd:string">09xxxxxxxx</item> <item xsi:type="xsd:string">09xxxxxxxx</item> </recipientNumbers> <senderNumbers SOAP-ENC:arrayType="xsd:string[1]" xsi:type="SOAP-ENC:Array"> <item xsi:type="xsd:string">3000xxxxx</item> </senderNumbers> <encodings xsi:nil="true" xsi:type="SOAP-ENC:Array" /> <udhs xsi:nil="true" xsi:type="SOAP-ENC:Array" /> <messageClasses xsi:nil="true" xsi:type="SOAP-ENC:Array" /> <priorities xsi:type="SOAP-ENC:Array" /> <checkingMessageIds SOAP-ENC:arrayType="xsd:long[2]" xsi:type="SOAP-ENC:Array"> <item […]

node-soap客户端中的数组字段的名称空间(Node.js)

如何为数组configurationnode-soap客户端集名称空间不仅用于对象? 我的“sendPatient”方法的参数: params = { patientCard: { patient: { firstName: 'test', lastName: 'test' }, identifiers: { code: "123456789", codeType: 1 } } }; client.sendPatient(params, …) 节点肥皂产生: <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/"> <soap:Header></soap:Header> <soap:Body> <tns:sendPatient xmlns:tns="http://xxx/patient/api/" xmlns="http://xxx/patient/api/"> <tns:patientCard> <ns1:patient xmlns:ns1="http://xxx/patient/"> <ns1:firstName>test</ns1:firstName> <ns1:lastName>test</ns1:lastName> </ns1:patient> <ns1:identifiers xmlns:ns1="http://xxx/patient/"> <ns1:code>123456789</ns1:code> <ns1:codeType>1</ns1:codeType> </ns1:identifiers> </tns:patientCard> </tns:sendPatient> </soap:Body> </soap:Envelope> 它的工作原理,但我需要发送标识符数组,不仅一个,所以当我把数组 params = { […]

在node.js中处理soap和wsdl webservice

我想从node.js处理soap和wsdl服务,对于最初的启动,我下载了node-soap模块并运行了示例js文件,它要求我下载像node-expat这样的模块,之后它给了我下面的错误 > Error: Cannot find module '../build/Release/node_expat.node' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:362:17) at require (module.js:378:17) at Object.<anonymous> (C:\Users\290495\Desktop\nodejs\nodejs\node_modules\no de-expat\lib\node-expat.js:4:13) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) 任何想法如何处理上述问题将是非常有益的! 提前致谢!

nodejs + vmware vsphere sdk soap连接

我正在尝试使用带有soap的NodeJS并连接到ESX或虚拟中心上的VMWare的WSDL,但一直无法这样做。 任何指针都会很有帮助。 我正在使用节点肥皂,我还发现了一个使用肥皂连接到ESX的PHP教程http://www.helixstorm.com/connecting-vsphere-api-php5-soap/ 谢谢!

使用node.js来使用soap

我试图学习node.js和使用node-soap包来使用这个简单的肥皂。 WSDL在这里给出: https : //www.dropbox.com/s/f9o79f8jejqwfp3/UserDataService.wsdl并导入一个在https://www.dropbox.com/s/4vz0eoh70kvx1bm/import_UserDataService.wsdl 注意父WSDL中的导入。 所以我执行以下消耗肥皂操作removeUser但即时通讯错误“无效的子types”。 这是否意味着import无法完成? var soap = require('soap'); var url = 'http://localhost/idmsrvc/UserDataService?wsdl'; var args = {id: 'bladigblahddfdfdfdfdfd'}; soap.createClient(url, function(err, client) { client.removeUser(args, function(err, result) { console.log(result); }); }); 节点test.js assert.js:92 throw new assert.AssertionError({ ^ AssertionError: Invalid child type at DefinitionsElement.addChild (/home/kasunt/node_modules/soap/lib/wsdl.js:383:5) at Element.endElement (/home/kasunt/node_modules/soap/lib/wsdl.js:143:14) at Object.p.onclosetag (/home/kasunt/node_modules/soap/lib/wsdl.js:1162:9) at emit (/home/kasunt/node_modules/soap/node_modules/sax/lib/sax.js:615:33) at […]

Node-soap client.describe()?

我试图通过使用本地WSDL文件来使用Web服务。 我已经使用了两个WDSL 。 GDSQueue.wsdl GDSQueueAbstract.wsdl 第一个, GDSQueue.wsdl 导入 GDSQueueAbstract.wsdl 。 但在node-soap中,当我使用client.describe() ,它显示如下输出: { GdsQueueService: { GdsQueueCountServicePort: {}, GdsQueueListServicePort: {}, GdsQueuePlaceServicePort: {}, GdsEnterQueueServicePort: {}, GdsExitQueueServicePort: {}, GdsNextOnQueueServicePort: {}, GdsClearQueueServicePort: {}, GdsQueueAgentListServicePort: {} } } 现在来调用服务,我应该使用 GdsQueueService.GdsQueueCountServicePort.service(params , callback) 但是没有任何调用这个Web服务的服务方法 。 因此,我不明白为什么node-soap不会创build服务方法 。

如何使用nodejs发送soap复杂types到axis wsdl服务器

我使用节点作为客户端与java轴wsdl服务进行通信(不熟悉这一点)。 有一个node-soap模块可以发送简单types的服务。 例如: <wsdl:message name="helloArgsRequest"> <wsdl:part name="str" type="xsd:string"/> <wsdl:part name="i" type="xsd:int"/> </wsdl:message> <!– … –> <wsdl:operation name="helloArgs" parameterOrder="str i"> <wsdl:input message="impl:helloArgsRequest" name="helloArgsRequest"/> <wsdl:output message="impl:helloArgsResponse" name="helloArgsResponse"/> </wsdl:operation> 节点: soap.createClient(url, function(err, client) { client.helloArgs({ str: "haha", i: 100 }, function(err, result) { console.log(result); // OK }); }); 但node-soap不支持complexType (找不到关于complexType的任何示例)。 所以我捕捉到的HTTP请求,并得到原始的XML数据发布服务,如下所示: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:impl="http://192.168.0.3:8080/axis/LoginService.jws" xmlns:intf="http://192.168.0.3:8080/axis/LoginService.jws" xmlns:tns1="http://DefaultNamespace"> <soap:Body> […]