Tag: wsdl

node-soap是否可以在单个WSDL中处理具有不同名称空间的多个模式?

我正在使用node-soap与现有的SOAP API进行接口。 我遇到了多个模式和命名空间的问题,从我正在阅读的内容可能是一个已知的问题。 这里是设置,我用一个WSDL文件和两个模式进行交互: WSDL(为简洁起见删除了属性和元素): <wsdl:definitions xmlns:tns="[rm-nsurl]" targetNamespace="[rm-nsurl]" …> <!– schema1 –> <schema xmlns:tns="[cm-nsurl]" targetNamespace="[cm-nsurl]" …> <complexType abstract="true" name="Operation"> <sequence> <element maxOccurs="1" minOccurs="0" name="operator" type="tns:Operator">…</element> </sequence> </<complexType </schema> <!– schema2 –> <schema xmlns:cm="[cm-nsurl]" xmlns:tns="[rm-nsurl]" targetNamespace="[rm-nsurl]" …> <complexType name="UserListOperation"> <complexContent> <extension base="cm:Operation">…</extension> </complexContent> </complexType> </schema> … </wsdl:definitions> 重要的细节是两个模式将tns定义为不同的值。 当schema2中的一个types引用了schema1( cm:Operation )中的一个元素时,它使用了cm的显式名称空间(目前为止还不错),但是随后跳转到schema1中的引用types中,我们现在看到了tns名称空间和schema1 tns是cm 。 这会导致问题,因为node-soap对于tns使用单个整体值,在这种情况下恰好是rm并且在需要时不显式使用cm命名空间。 这里是我看到问题的一个例子: 请求对象传递给WSDL方法: […]

我无法访问wsdl文件中定义的函数。提供了代码和错误代码片段

我无法访问wsdl文件中定义的ResloveIP函数。 我检查使用SoapUI的服务,它工作正常。 请帮忙! var soap=require('soap'); var url='http://ws.cdyne.com/ip2geo/ip2geo.asmx?wsdl'; soap.createClient(url, function(err, client) { if(err){ console.log(err); return; } //console.log(client.describe()); client.IP2Geo.IP2GeoSoap.ResolveIP('184.172.104.38');//the ResolveIP function cannot be accessed. }); 错误信息:

在节点JS肥皂Web服务

我正在尝试使用npm模块soap在节点js中构buildsoap web服务。 我正在使用soap.listen函数在节点js中启动soap服务器。 我包括的wsdl文件如下所示: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="wscalc1" targetNamespace="http://localhost:8100/api/orderStatusWsdl" xmlns="http://localhost:8100/api/orderStatusWsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <wsdl:message name="receiveOrderStatusRequest"> <wsdl:part name="a" type="xs:string"/> <wsdl:part name="b" type="xs:string"/> </wsdl:message> <wsdl:message name="receiveOrderStatusResponse"> <wsdl:part name="orderStatusResponse" type="xs:string"/> </wsdl:message> <wsdl:portType name="orderStatusPort"> <wsdl:operation name="receiveOrderStatus"> <wsdl:input message="receiveOrderStatusRequest"/> <wsdl:output message="receiveOrderStatusResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="orderStatusBinding" type="orderStatusPort"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="receiveOrderStatus"> <soap:operation soapAction="receiveOrderStatus"/> <wsdl:input> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/> </wsdl:input> […]

node-soap:“第一个标记之前的非空白”。

我的WSDL是有效的,但是这个错误(在title中)发生在soap.createClient 。 WSDL托pipe在服务器上。 在检查node-soap源码之后,看起来好像我是否可以禁用WSDL类中的“strict”标志,这个错误不会发生,但是我似乎无法弄清楚如何禁用它。 我尝试将选项传递给createClient方法,如下所示: soap.createClient(wsdl, { strict: false }, callback); 但是这似乎并没有解决这个问题。 不幸的是,我不能共享WSDL,但是可以确定它通过了validation,并且在开始标记之前没有“非空白”。 我相当肯定,如果我可以以某种方式禁用wsdl类中的严格选项,可以解决问题。 有没有人有过这种情况发生过?

Node.js Soap:rpc样式绑定的无效消息定义

我试图从节点使用wsdl。 使用'vpulim / node-soap'。 我可以加载wsdl,描述它,甚至调用某些函数。 但是,任何时候我试图调用一个不期望任何参数的函数,我得到的错误: assert.js:92 throw new assert.AssertionError({ ^ AssertionError: invalid message definition for rpc style binding at Client._invoke (/home/user/node_scripts/application/node_modules/soap/lib/client.js:126:12) at null.getManagedModules (/home/user/node_scripts/application/node_modules/soap/lib/client.js:87:10) at /home/user/node_scripts/application/client.js:9:12 at /home/user/node_scripts/application/node_modules/soap/lib/soap.js:48:5 at null.callback (/home/user/node_scripts/application/node_modules/soap/lib/soap.js:35:7) at /home/user/node_scripts/application/node_modules/soap/lib/wsdl.js:716:12 at WSDL._processNextInclude (/home/user/node_scripts/application/node_modules/soap/lib/wsdl.js:732:12) at WSDL.processIncludes (/home/user/node_scripts/application/node_modules/soap/lib/wsdl.js:762:8) at /home/user/node_scripts/application/node_modules/soap/lib/wsdl.js:678:10 at process._tickCallback (node.js:415:13) 这里是describe(): { AlertPollingService: { AlertPollingService: { getManagementModule: [Object], getEMConfig: [Object], […]

节点soap,消费密码保护的WSDL

我正在尝试使用Node构build一个SOAP客户端,我使用“soap”包( https://www.npmjs.org/package/soap )尝试使用受用户/密码保护的WSDL。 在“soap.createClient”创build客户端之前,我找不到如何传递这些凭据,当然,如果我没有提供正确的凭据,我无法检索到WSDL。 我试过了: soap.security.WSSecurity('user','pass'); 然后调用“createClient”但无济于事。 另外,我试图用node-soap-client来完成这个工作,我可以通过这个客户端(显然)连接到WSDL,但是之后我不知道该怎么去(如何调用方法)。 我究竟做错了什么? 感谢你的帮助!

无法为SOAP Node.js制定响应对象

我正在编写SOAP Node.js Web服务使用node-soap ,我无法弄清楚如何正确地制定响应。 我正在使用Web连接器将Web应用程序与QuickBooks 2013集成在一起。 客户端将请求进行身份validation,我可以logging传递的参数,所以我知道它被调用,但我无法得到正确的答复。 该文件说,它期待一个string数组作为响应。 WSDL的相关部分如下所示: <s:element name="authenticateResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="authenticateResult" type="tns:ArrayOfString" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="ArrayOfString"> <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" /> </s:sequence> </s:complexType> <wsdl:message name="authenticateSoapOut"> <wsdl:part name="parameters" element="tns:authenticateResponse" /> </wsdl:message> <wsdl:operation name="authenticate"> <wsdl:input message="tns:authenticateSoapIn" /> <wsdl:output message="tns:authenticateSoapOut" /> </wsdl:operation> <wsdl:operation name="authenticate"> <soap:operation soapAction="http://developer.intuit.com/authenticate" style="document" […]

简单的web服务与节点肥皂

我正在尝试使用SOAP实现一个简单的Web服务,使用Node Js和node-soap,但客户端似乎在使用服务器时遇到问题。 assert.js:92 throw new assert.AssertionError({ ^ AssertionError: invalid message definition for document style binding 我的wsdl文件是: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="wscalc1" targetNamespace="http://localhost:8000/wscalc1" xmlns="http://localhost:8000/wscalc1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <wsdl:message name="sumarRequest"> <wsdl:part name="a" type="xs:string"></wsdl:part> <wsdl:part name="b" type="xs:string"></wsdl:part> </wsdl:message> <wsdl:message name="multiplicarRequest"> <wsdl:part name="a" type="xs:string"></wsdl:part> <wsdl:part name="b" type="xs:string"></wsdl:part> </wsdl:message> <wsdl:message name="multiplicarResponse"> <wsdl:part name="res" type="xs:string"></wsdl:part> </wsdl:message> <wsdl:message name="sumarResponse"> <wsdl:part name="res" […]