【发布时间】:2014-08-13 23:41:12
【问题描述】:
我正在尝试使用节点 SOAP npm 模块(https://github.com/vpulim/node-soap) 服务。
var soap = require('soap');
var soapWSDL = "https://webservice.s7.exacttarget.com/etframework.wsdl";
soap.createClient(soapWSDL, function (err, client) {
if (err) {
return callback(err, null);
}
client.setSecurity(new soap.WSSecurity(self.username, self.password));
console.log("describe", client.describe());
console.log("retrieve", client.describe().PartnerAPI.Soap.Retrieve);
});
第一个日志显示了可用的方法...
但我正在尝试从第二个 console.log 中了解参数所需的确切格式...
更具体地说,当我打电话给client.Retrieve(options,function(e,r){}); 时,options 的要求格式应该是什么?
这是两个 console.logs 的输出
描述:
{ PartnerAPI:
{ Soap:
{ Create: [Object],
Retrieve: [Object],
Update: [Object],
Delete: [Object],
Query: [Object],
Describe: [Object],
Execute: [Object],
Perform: [Object],
Configure: [Object],
Schedule: [Object],
VersionInfo: [Object],
Extract: [Object],
GetSystemStatus: [Object] } } }
检索:
{ input:
{ RetrieveRequest:
{ 'ClientIDs[]': [Object],
ObjectType: 'xsd:string',
'Properties[]': 'xsd:string',
Filter: [Object],
'RespondTo[]': [Object],
'PartnerProperties[]': [Object],
ContinueRequest: 'xsd:string',
QueryAllAccounts: 'xsd:boolean',
RetrieveAllSinceLastBatch: 'xsd:boolean',
RepeatLastResult: 'xsd:boolean',
Retrieves: [Object],
Options: [Object],
targetNSAlias: 'tns',
targetNamespace: 'http://exacttarget.com/wsdl/partnerAPI' } },
output:
{ OverallStatus: 'xsd:string',
RequestID: 'xsd:string',
'Results[]':
{ Client: [Object],
PartnerKey: 'xsd:string',
'PartnerProperties[]': [Object],
CreatedDate: 'xsd:dateTime',
ModifiedDate: 'xsd:dateTime',
ID: 'xsd:int',
ObjectID: 'xsd:string',
CustomerKey: 'xsd:string',
Owner: [Object],
CorrelationID: 'xsd:string',
ObjectState: 'xsd:string',
targetNSAlias: 'tns',
targetNamespace: 'http://exacttarget.com/wsdl/partnerAPI' } } }
【问题讨论】: