Hi suds people.
I have to use suds for talking to a Microsoft Exchange Web Service in
order to do stuff like creating meetings. book rooms and stuffs. I do
it in python, and choosed suds for dealing with the SOAP.
So far I was using a patched version of suds 0.3.7, patched for
dealing better with EWS SOAP (suds-ews :
https://bitbucket.org/daevaorn/suds-ews/). But I don't want to use
that outdated version anymore.
I grabbed the last version of suds from pip, the one from jurko which
contains most of the patchs proposed since the development have
stalled, and I have got the following error (I have it too even with
the "regular" suds 0.4.0 release):
----------------
Traceback (most recent call last):
File "sudstest.py", line 15, in <module>
client.service.CreateItem(None, calitem)
File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line
293, in __getattr__
port = self.__find(0)
File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line
328, in __find
raise Exception, 'No services defined'
Exception: No services defined
----------------
The code that produce the error is a simple client snippet, which was
almost the same that was working fine with 0.3.7.
----------------
from suds.transport.https import WindowsHttpAuthenticated
from suds.client import Client
from suds.sax.element import Element
ntlm = WindowsHttpAuthenticated(username='xxx', password='xxx')
client = Client('https://exca010.encara.local.ads/ews/Services.wsdl',
transport=ntlm)
ns = ('t', 'http://schemas.microsoft.com/exchange/services/2006/types')
soap_headers = Element('RequestServerVersion', ns=ns)
soap_headers.attributes.append('Version="Exchange2010_SP1"')
client.set_options(soapheaders=soap_headers)
calitem = client.factory.create('t:CalendarItem')
client.service.CreateItem(None, calitem)
----------------
I'm really can't figure out what causes the problem. It should work
fine out of the box.
I hope you people of the suds ML can bring some help.
Thank you very much.