【发布时间】:2017-09-07 06:14:17
【问题描述】:
我是 nodejs 的新手,我正在尝试使用它的 soap 功能来调用soap web 服务。我在网上看到了各种示例,但无法弄清楚如何将它们与我拥有的数据一起使用。
我从我的 Java 应用程序中获得了肥皂请求,并在 SoapUI 应用程序中使用它,它工作得非常好。刚刚使用了 wsdl 链接和 XML。我需要一个关于如何将这些与 nodejs 一起使用的示例。提前致谢。
以下是我在 SoapUI 应用中使用的详细信息 -
WSDL - https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.141.wsdl
xml -
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-*****">
<wsse:Username>*****</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">*****</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.84">
<merchantID>*****</merchantID>
<merchantReferenceCode>*****</merchantReferenceCode>
<clientLibrary>Java Axis WSS4J</clientLibrary>
<clientLibraryVersion>1.4/1.5.1</clientLibraryVersion>
<clientEnvironment>Windows NT (unknown)/6.2/Sun Microsystems Inc./1.6.0_20</clientEnvironment>
<billTo>
<street1>2nd Street</street1>
<city>test</city>
<state>AL</state>
<postalCode>12345</postalCode>
<country>US</country>
</billTo>
<item id="0">
<unitPrice>2650.0</unitPrice>
<quantity>1</quantity>
<productCode>*****</productCode>
<productName>*****</productName>
<productSKU>*****</productSKU>
</item>
<taxService run="true">
<sellerRegistration />
</taxService>
</requestMessage>
</soapenv:Body>
</soapenv:Envelope>
【问题讨论】:
标签: node.js web-services soap