Wsdl2.js没有't将json数据带入帐户
Wsdl2.js doesn't take json data in to the accoutn
我刚刚通过npm安装了包wsdl2.js,现在我不想使用is。我的json数据有问题,因为它总是空的
这是我的代码测试1
var Service = require('/home/valor/development/test/User');
var json = {subscriberUid : 'd7f3ea63-1118-44bb-ba97-f6f0c417313a'};
requestT = new Service.UserSoapServiceBeanPort.getSubscriber(json);
requestT.debug();
console.log(json);
requestT.request(function(err, response) {
console.log(arguments);
});
和响应失败,因为json为空,因为subscriberUid是必须的
{
"method": "getSubscriber",
"type": "Request",
"json": {},
"xml": "<getSubscriber></getSubscriber>",
"validates": true
}
{ subscriberUid: 'd7f3ea63-1118-44bb-ba97-f6f0c417313a' }
{
"method": "getSubscriber",
"took": 92
}
{ '0': 'Invalid response to getSubscriber' }
Process finished with exit code 0
然后我试着按照教程/示例中的解释这样做
测试2
var Service = require('/home/valor/development/test/User');
requestT = new Service.UserSoapServiceBeanPort.getSubscriber();
requestT.subscriberUid = 'd7f3ea63-1118-44bb-ba97-f6f0c417313a';
requestT.debug();
requestT.request(function(err, response) {
console.log(arguments);
});
再次失败的响应
/usr/local/bin/node test.js
{
"method": "getSubscriber",
"type": "Request",
"json": {},
"xml": "<getSubscriber></getSubscriber>",
"validates": true
}
{
"method": "getSubscriber",
"took": 90
}
{ '0': 'Invalid response to getSubscriber' }
Process finished with exit code 0
测试3
var service = require("/home/valor/development/test/user");
service.Settings.debugSoap = true;
var request = new service.UserSoapServiceBeanPort.getSubscriber();
console.log(request);
console.log(request.subscriberUid = 'd7f3ea63-1118-44bb-ba97-f6f0c417313a');
request.subscriberUid = 'd7f3ea63-1118-44bb-ba97-f6f0c417313a'
request.debug();
响应
/usr/local/bin/node test.js
{ getSubscriber: [Getter/Setter] }
d7f3ea63-1118-44bb-ba97-f6f0c417313a
{
"method": "getSubscriber",
"type": "Request",
"json": {},
"xml": "<getSubscriber></getSubscriber>",
"validates": true
}
Process finished with exit code 0
我发现的另一件奇怪的事情是
console.log(Service.UserSoapServiceBeanPort.getSubscriber);
[Function]
而
console.log(Service.UserSoapServiceBeanPort.getSubscriber());
undefined
现在我不知道我还能做什么,所以我希望你们能帮助我。
提前感谢
在与wsdl2.js开发人员交谈后,我们发现wsdl2.js不支持在工作代码中转换WSDL,因为它与标准WSDL略有不同。我们使用xs:elements,而wsdl2.js可以转换xsd:elements
相关文章:
- 无法使用变量访问数据 JSON
- 使用 ng-repeat解析不均匀数据/ json对象
- 在没有jsonp的情况下从另一个域获取数据(json格式)
- 如何获取带参数的数据json
- 如何在android中显示实时雅虎金融股票数据..json格式如下所示
- 使用 JavaScript 将数据 json 显示到网页中
- 高位图表来源于API数据(JSON)
- 使用动态数据json初始化同位素
- Django:将数据JSON从视图传递给javascript
- 存储配置数据 (json)
- 未捕获的SyntaxError:意外的标识符图像数据json
- 接收数据json/jquery
- Jquery数据表数据json
- 不能在cakephp中使用数组数据json
- 在不锁定浏览器的情况下,将大数据JSON从REST请求反序列化为对象
- 如何读取数据JSON格式数组的字符串数据
- 我有一个流星应用程序,需要从/public/_assets/results/mmresults读取数据.Json文件,在
- 数据json不显示在html
- 使用2个下拉列表创建2个并排的表行来比较数据- JSON
- 需要将复杂的json对象转换为合适的angularjs UI树数据json结构