简短的版本是我试图弄清楚是否有办法在加载 WSDL 后列出所有可用于调用 Client.factory.create() 的类型。
我有一个复杂类型的参数,其中包含另一个复杂类型的数组。suds 工厂似乎不知道如何创建属于数组的类型,所以我不知道如何填充数组。当我将类型名称传递给 factory.create() 时,我得到了 suds.TypeNotFound。我希望我只是把名字弄错了,如果我能列出可用的类型,我就能把它挑出来。
您可以通过简单地打印客户端来获取方法和类型的列表。以下是输出示例:
Suds ( https://fedorahosted.org/suds/ ) version: 0.3.9 GA build: R659-20100219
Service ( PartnerAPI ) tns="http://exacttarget.com/wsdl/partnerAPI"
Prefixes (2)
ns0 = "http://exacttarget.com/wsdl/partnerAPI"
ns1 = "urn:fault.partner.exacttarget.com"
Ports (1):
(Soap)
Methods (13):
Configure(ConfigureOptions Options, xs:string Action, Configurations Configurations, )
Create(CreateOptions Options, APIObject[] Objects, )
Delete(DeleteOptions Options, APIObject[] Objects, )
Describe(ArrayOfObjectDefinitionRequest DescribeRequests, )
Execute(ExecuteRequest[] Requests, )
Extract(ExtractRequest[] Requests, )
GetSystemStatus(SystemStatusOptions Options, )
Perform(PerformOptions Options, xs:string Action, Definitions Definitions, )
Query(QueryRequest QueryRequest, )
Retrieve(RetrieveRequest RetrieveRequest, )
Schedule(ScheduleOptions Options, xs:string Action, ScheduleDefinition Schedule, Interactions Interactions, )
Update(UpdateOptions Options, APIObject[] Objects, )
VersionInfo(xs:boolean IncludeVersionHistory, )
Types (285):
ns1:APIFault
APIObject
APIProperty
Account
AccountDataItem
AccountPrivateLabel
AccountTypeEnum
AccountUser
AddressStatus
...
任何类型都可以用factory.create()
.