Hi,
I'm trying to use suds to work with the ServiceU WSDL
<
http://webservices.serviceu.com/v1/PublicCalendar.asmx?WSDL>. I used
ImportDoctor to import both the XMLSchema and soap encoding:
xml =
Import('http://www.w3.org/2001/XMLSchema')
xml.filter.add('http://webservices.serviceU.com/')
enc =
Import('http://schemas.xmlsoap.org/soap/encoding/')
enc.filter.add('http://webservices.serviceU.com/')
doc = ImportDoctor(xml, enc)
and when I create and print a Client, everything appears happy:
url = 'http://webservices.serviceu.com/v1/PublicCalendar.asmx?WSDL'
client = Client(url, doctor=doc)
print client
[See attached file for the output]
Now, when I try and call a method:
try:
result = client.service.GetCategories(ORG_ID, error)
print result, error
except Exception, e
print "exception:", e
I get the following output:
exception: Type not found: 'xs:complexType'
Unfortunately, I am not an expert when it comes to SOAP, so I'm not
sure how to fix this error. Looking at the examples, the WSDL defines
complex types as <complexType name="Person">, however, the ServiceU
WSDL has this:
<s:element name="SearchEvents">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="OrgID"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1"
name="FromDate"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1"
name="ToDate"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1"
name="DepartmentID"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1"
name="CategoryID"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1"
name="EventName"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1"
name="ErrorMessage"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
Do I need to be manually importing another schema?
Thanks,
Wes
Thanks,
Wes