我刚刚开始使用NodeJS,并且我正在使用milewise's node-soap开始与SOAP服务通话。我正在使用基本的电子邮件地址验证SOAP API作为我的测试用例。使用node-soap通过Soap在Soap中发送参数
我似乎不明白正确的方式来格式化我的参数列表。
我的SOAP客户端代码:
var url = "http://www.restfulwebservices.net/wcf/EmailValidationService.svc?wsdl";
soap.createClient(url, function(err, client){
console.log(client.describe().EmailValidationService.BasicHttpBinding_IEmailValidationService.Validate);
client.Validate({result:"[email protected]"}, function(err, result){
console.log(result);
});
});
的client.describe()命令告诉我的API是怎么想它的输入格式,以及它将如何返回它的输出。这是什么,是说:
{ input: { 'request[]': 'xs:string' }, output: { 'ValidateResult[]': 'xs:boolean' } }
然而,当我送参数作为一个对象:{request:"[email protected]"}
我感觉我的问题在于我如何定义arguments对象......什么做括号中的request[]
是什么意思?
这并没有真正回答这个问题。如果您有不同的问题,可以通过单击[提问](https://stackoverflow.com/questions/ask)来提问。您可以[添加赏金](https://stackoverflow.com/help/privileges/set-bounties)在您拥有足够的[声誉](https://stackoverflow.com/help/)后引起对此问题的更多关注什么声誉)。 - [来自评论](/ review/low-quality-posts/17793753) – Psi