Wcf.js 介绍
Wcf.js 可以让你直接在 Node.js 上调用 WCF Web 服务。
示例代码:
var BasicHttpBinding = require('wcf.js').BasicHttpBinding , Proxy = require('wcf.js').Proxy , binding = new BasicHttpBinding( { SecurityMode: "TransportWithMessageCredential" , MessageClientCredentialType: "UserName" }) , proxy = new Proxy(binding, "http://localhost:7171/Service/clearUsername") , message = "<Envelope xmlns='http://schemas.xmlsoap.org/soap/envelope/'>" + "<Header />" + "<Body>" + "<GetData xmlns='http://tempuri.org/'>" + "<value>123</value>" + "</GetData>" + "</Body>" + "</Envelope>" proxy.ClientCredentials.Username.Username = "yaron" proxy.ClientCredentials.Username.Password = "1234" proxy.send(message, "http://tempuri.org/IService/GetData", function(response, ctx) { console.log(response) });
Wcf.js 官网
https://github.com/yaronn/wcf.js
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。