Hi.
On 12.6.2013. 14:39, Bob Kline wrote:
How does one build parameters in suds against WSDLs which use
anonymous types? Clearly it's not possible to invoke
client.factory.create(typeName) in such case, because there are no
named types. An example (in this case, from the travel industry) of
such a WSDL is:
http://ws-server-test.bookingcenter.com/hotel_availability_calendar.php?wsdl
You can and easily. For example, in your example, the following code
with create an object of the anonymous type defined for the
OTA_HotelAvailCalendarRQ.parameters.POS element:
import suds.client
c =
suds.client.Client("http://ws-server-test.bookingcenter.com/hotel_av...
pos = c.factory.create("import0:OTA_HotelAvailCalendarRQ.parameters.POS")
print(pos)
Suds's type name lookup works on both the elements & types defined in
the schema - so it correctly recognizes both named and anonymous types
(tested against the suds-jurko fork, did not test using a clean suds
release).
Hope this helps.
Best regards,
Jurko Gospodnetić