如何在 node.js 中使用 WCF soap Web 服务(仅限 net tcp 绑定)
How to consume WCF soap web service(net tcp binding only) in node.js
我有仅使用 NetTcpBinding 托管的遗留 WCF 服务。我想在节点js中调用服务。有没有我可以使用的包或库?
这是我的 WCF 服务配置:
<wsdl:service name="Spedizioni_Avanzato_Out">
<wsdl:port name="NetTcpBinding_Spedizioni_Avanzato_Out" binding="tns:NetTcpBinding_Spedizioni_Avanzato_Out">
<soap12:address location="net.tcp://servername/SgaNetServiceInterop/Spedizioni_Avanzato_Out"/>
<wsa10:EndpointReference>
<wsa10:Address>
net.tcp://servername/SgaNetServiceInterop/Spedizioni_Avanzato_Out
</wsa10:Address>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
据我所知,没有JS库可以调用NetTcpBinding创建的WCF服务。这是非常复杂的。以下是一些可以调用WCF的JS库,但是none个支持NetTcpBinding
https://github.com/yaronn/wcf.js
https://github.com/vpulim/node-soap
更简单的方法是让 WCF 公开其他服务端点,例如 WebHttpBinding。这允许您创建 Restful 风格的服务。我们可以构造HTTP请求直接调用服务
我有仅使用 NetTcpBinding 托管的遗留 WCF 服务。我想在节点js中调用服务。有没有我可以使用的包或库?
这是我的 WCF 服务配置:
<wsdl:service name="Spedizioni_Avanzato_Out">
<wsdl:port name="NetTcpBinding_Spedizioni_Avanzato_Out" binding="tns:NetTcpBinding_Spedizioni_Avanzato_Out">
<soap12:address location="net.tcp://servername/SgaNetServiceInterop/Spedizioni_Avanzato_Out"/>
<wsa10:EndpointReference>
<wsa10:Address>
net.tcp://servername/SgaNetServiceInterop/Spedizioni_Avanzato_Out
</wsa10:Address>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
据我所知,没有JS库可以调用NetTcpBinding创建的WCF服务。这是非常复杂的。以下是一些可以调用WCF的JS库,但是none个支持NetTcpBinding
https://github.com/yaronn/wcf.js
https://github.com/vpulim/node-soap
更简单的方法是让 WCF 公开其他服务端点,例如 WebHttpBinding。这允许您创建 Restful 风格的服务。我们可以构造HTTP请求直接调用服务