Creating a request for ZSI

Kevin Geraghty KGeraghty at 360i.com
Thu Feb 19 13:55:37 CET 2009


Folks,
I am trying to access a WSDL and I used wsdl2py to create the needed files. My problem is that when I try to create a request object I get a request Holder object instead.

>>> get_rates_by_profile_name=ns0.get_rates_by_profile_name_Dec().pyclass
>>> req=get_rates_by_profile_name()
>>> req._username = username
>>> req._org_id = org_id
>>> req._profile_name = profile_name
>>> req
<HotelWebService_services_types.get_rates_by_profile_name_Holder object at 0xb7c04d8c>

When I try to get a response the isinstance() test rejects the request holder object as being of the wrong type.

>>> resp = portType.get_rates_by_profile_name(req)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "HotelWebService_services.py", line 487, in get_rates_by_profile_name
    raise TypeError, "%s incorrect request type" % (request.__class__)
TypeError: <class 'HotelWebService_services_types.get_rates_by_profile_name_Holder'> incorrect request type

How do I get a req object that ZSI will let me use to get a response?

Thanks
Kevin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090219/16e6c78f/attachment.html>


More information about the Python-list mailing list