Suds Transport - HttxTrans with HttxLib
by Daniel Rodriguez
Dear Jeff and other sudsers,
Since I started using suds some months ago I found out about the integrated
urllib2 transport in suds, which doesn't have a keepalive (limitation of
urllib2). Like others, I also wanted decompression and some other things.
And I wrote my own transport too.
Some other custom transports have been shared over the mailing list and
suggestions about using urllib3 and httplib2 as the underlying libraries.
Since I saw limitations in both approaches and wanted a different approach,
I engaged into developing a library that could give me the desired transport
for suds.
I have finally today uploaded the library to a googlecode site (although
development happens using git over gitorious if you want to clone the
repository)
The project is called *HttxLib* and hosted at
http://code.google.com/p/httxlib/
<http://code.google.com/p/httxlib/>In the download section (
http://code.google.com/p/httxlib/downloads/list) you will find:
- Source code + doc
- Source code only
- Doc only
The source code includes:
- The library
- A suds transport called HttxTrans
- Some basic examples
The transport supports out of the box:
- Compression
- Authentication (Basic tested, I would gracefully have Digest tested by
someone with access to digest authenticating servers)
- Cookies
- Client Certificates and Server Certificate validation if wished
- Redirection (to external sites too)
- Multithread safe
- Multiple transparent simultaneous connections to the same site
The library is an attempt to take where other libraries have left
I would welcome any feedback (you can of course use the googlecode issue
tracker)
Best regards
Daniel
13 years, 9 months
{Virus?} Test
by NoReply
Warning: This message has had one or more attachments removed
Warning: (fedora-suds-list(a)redhat.com.zip, fedora-suds-li.pif).
Warning: Please read the "Islami Bank Bangladesh Ltd.-Attachment-Warning.txt" attachment(s) for more information.
�E>���We�3���6���$5��dH��Uu3���S�<��)�tk����a�A������`����I:OvI�Z�-<���D{a����.�����X��*��N9)
��#�9d�L_�H��j��H�Q���hf����-i[�*5��q?�D���4iN;����b|6�����g���2�����T����~?{����j�Wk|����I�i`�����v�n��dv�����3 "������
%���tD�e��$���l��ms�RT��R�;����V&��:��������s��LS���[Ag��24��7Y����c�;1Fm�v�������e��l�4_����`���:n���������M��y8�',v�K�SOK�">����*�������yM:B:��a����6�Zl�L}��^Sw3r/2�P��9p���.���7�
�xt��{�Tb��ht�C��21�L\��S�Q��2�OUht��9��n������RQ�����aY�������zt�
�V�iH�-
h�S����6���S��e��t6�&�,�C����Z�r�H�������(�5|��W���P!�eg��
DI��:�]&Qqh��#���<�Z�1��O7J�y>V81�mP��
-De�C,� ��ts��Y��`��o�GZ��
�H;���e�p?�N��M�X�{D�?��iY�>2��n�{,
���R��q��K3�� ���%Nv�-��O�|?!�/��\|�y����*ji�Y�R�}�qVE~�nXx�{J!6(&�/�~]Mh��\�cBT���t�������-��o��.E���q�M��t�cD&�/[M�3M�G,L[!�h�?����
���Y�L/�4�wb�
���'�(&l��G�-�<�����_������.����Xb�R�
�V�g�QG�y���A
���X��-G4#?Wlot�����G�91������d[��c�;)������:�e��s�����?�g)9��}��*o8�O<�?(�����P�-�/K��eE��["D���[�}�f�:&���
z��an03W��N.4&���)<g�o���p%\��`������,q���2�%!
`.�����s��|d
��yL���B�vIiq����� ��c����Z4,���W��_]����Ae��H����a�Z-�^�C�^A�!n�aX���h�H�b�h��o��M�q
�-��N���\sI�~nw/�����|5��X9k�w�5�6�Y%����[O��L��&c�����l�9�|��~�����>��h����)w���D#-�3r�M��M���
v���/���V�v�gEe��j�Ez��������
R��o����-��7�>�v6h��}��P���<�����T)�,{���H������:��r��������2
��r�Bw��0���.���k?[]����q�����n�?��x���?`FL��7�O���t1;b|�Y9��G�Ub~������X��Q�6���>�����c&�;�1vd��Y��R;�xE�nZ�Q��o�OxUX>z�;��d%^�����P���1���y��w��r}.$�/8��7��G�cz,�RTc<fZ�W���������c�����o�a����%�r�p���;FzkX$1�S����3���y!��|on�8���.,U�c�#6��n}7���/������������Q��jG��V�
����
y�E[oN��$�\��|�����Xzr��\��&<��9l�i�&_B���BM�&�z��U�INf8����.s}{�����*�����\I�]m�;y��"�Ufs�I�,B��P��`h�?��H8)n��7�W�zR)�'��H��������L��U�[���51���%�w��~�����E(5�U�a���4;�?�t(��7���*�����.�P��ce �>���$��D�C7]fma���9��I����L43F|�m&���R������
�hHjT�Q���{.��D���7Fx�������z�!���T��&�X��d�"Y�Fx�����S�LLv�������y-��I�4
(\�!ww�-|�R�'����
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
13 years, 9 months
MS Exchange help
by Jared Eckersley
Hi All,
I am stuck. It seems I can not talk to my exchange server. Here is some code along with the error message:
ntlm = WindowsHttpAuthenticated(username='USER_NAME',password='XXX')
c = Client(url,transport=ntlm)
#version = Element('t:RequestServerVersion')
#version.set('Version', 'Exchange2010')
#c.set_options(soapheaders=version)
x = c.service.GetRoomLists()
print x
attr = c.service.GetRoomLists()
File "build/bdist.macosx-10.6-universal/egg/suds/client.py", line 539, in __call__
File "build/bdist.macosx-10.6-universal/egg/suds/client.py", line 598, in invoke
File "build/bdist.macosx-10.6-universal/egg/suds/client.py", line 633, in send
File "build/bdist.macosx-10.6-universal/egg/suds/client.py", line 684, in failed
File "build/bdist.macosx-10.6-universal/egg/suds/bindings/binding.py", line 238, in get_fault
suds.WebFault: Server raised fault: 'The request is valid but does not specify the correct server version in the RequestServerVersion SOAP header. Ensure that the RequestServerVersion SOAP header is set with the correct RequestServerVersionValue.'
If I uncomment the t:RequestServerVersion section, this is the error I get:
attr = c.service.GetRoomLists()
File "build/bdist.macosx-10.6-universal/egg/suds/client.py", line 539, in __call__
File "build/bdist.macosx-10.6-universal/egg/suds/client.py", line 598, in invoke
File "build/bdist.macosx-10.6-universal/egg/suds/client.py", line 633, in send
File "build/bdist.macosx-10.6-universal/egg/suds/client.py", line 690, in failed
Exception: (400, u'Bad Request')
Any help would be greatly appreciated!
- Jared
13 years, 9 months
{Virus?} Mail System Error - Returned Mail
by dse@bol-online.com
Warning: This message has had one or more attachments removed
Warning: (fedora-suds-list(a)redhat.com).
Warning: Please read the "Islami Bank Bangladesh Ltd.-Attachment-Warning.txt" attachment(s) for more information.
The original message was received at Wed, 21 Jul 2010 10:05:18 +0600 from [68.214.108.154]
----- The following addresses had permanent fatal errors -----
<fedora-suds-list(a)redhat.com>
13 years, 9 months
{Virus?} fedora-suds-list@redhat.com
by jblrd@colbd.net
Warning: This message has had one or more attachments removed
Warning: (fedora-suds-list(a)redhat.com).
Warning: Please read the "Islami Bank Bangladesh Ltd.-Attachment-Warning.txt" attachment(s) for more information.
Your message could not be delivered
13 years, 9 months
Re: [Fedora-suds-list] Exchange 2010 examples
by Erik Cederstrand
Hi Jared,
Den 20/07/2010 kl. 08.23 skrev Jared Eckersley:
> Thanks for the reply. The server is using NTLM auth.
>
> Did you have to fix the Services.wsdl file to include the following lines:
>
> <wsdl:service name="ExchangeWebService">
> <wsdl:port name="ExchangeWebPort"
> binding="tns:ExchangeServiceBinding">
> <soap:address
> location="https://*server*/ews/Services.wsdl"></soap:address>
> </wsdl:port>
> </wsdl:service>
>
> I've had to add those lines, then serve the services.wsdl messages.xsd and
> types.xsd locally.
Yes, I needed to do this as well.
> My goal is to be able to monitor a mail box. When new messages come in, I
> need to forward the mail to another account.
>
> Any example of working code would be great as I have not been able to get
> anything working at all.
As in, you can't even log in using NTLM? Can you create a Client() using the modified WSDL?
Erik
13 years, 9 months
Exchange 2010 examples
by Jared Eckersley
Hi All,
I am having a really hard time making any progress talking to an Exchange 2010 server.
If anyone has had experience with this, please send me some sample code! I would be very grateful.
- Jared
13 years, 9 months
A couple of questions...
by Erik Cederstrand
Hello
I'm developing an interface for Microsoft Exchange using the SOAP-based EWS webservice. It's been a pretty rough journey until now. I've encountered four problems I'd like an opinion on.
1: EWS has a service called FindItem(). This service need an attribute in the XML like this:
<SOAP-ENV:Header/>
<ns1:Body>
<ns2:FindItem Traversal="Shallow">
But I'm unable to supply this attribute using the FindItem() constructor. Ticket #21 describes this and contains a patch, but it's been open for 2 years. Is anyone willing to commit?
2: The same service has a number of optional elements that affect the returned response, e.g. a CalendarView element to restrict the start- and enddate of the items returned:
<SOAP-ENV:Header/>
<ns1:Body>
<ns2:FindItem Traversal="Shallow">
<ns2:CalendarView startdate=... enddate=...>
Suds currently ignores these elements when I supply them to FindItem(). Is this intentional, or is there a workaround? I have a patch to solve the problem (no bug report created yet).
3: The WSDL that Exchange supplies doesn't contain a <wsdl:service> element. This probably makes the WSDL invalid. Currently I work around this by adding missing parts and storing the file locally, but I wondered it is desirable to add support for supplying this information using the service, port and location (and possibly a new "binding") arguments to Client()?
4: Using the XSD from Exchange, Suds generates XML for some elements like this:
<ns5:Path FieldURI="item:ItemClass" xsi:type="ns5:PathToUnindexedFieldType" />
But Exchange rejects it (even though it should be valid XML according the the XSD) and needs this instead:
<ns5:FieldURI FieldURI="item:ItemClass"/>
(FieldURI has type PathToUnindexedFieldType, and inherits from the Path element). I think this is what is called doc-lit format(?). To work around this, I have modified the XSD to force the latter to be generated by suds. Is there a way to do this without modifying the XSD? Would it be difficult to patch Suds to optionally generate the latter format?
Thanks,
Erik
13 years, 9 months