Hi Vladimir,

Rpclib's mtom implementation is 90% there. But because there are no test cases for it, it's not currently working, nor is it properly documented. For instance, you need to explicitly enable mtom passing the _mtom=True flag to the @rpc decorator.

rpclib.model.binary.File was not tested with soap, so I guess it requires a custom soap serializer routine to work properly.

Those said, I don't think suds supports mtom either. Did you check the suds side of things?

Why not just use http?

Best,
Burak


On 04/18/12 19:34, Vladimir Rutsky wrote:
Hello!

I need to write several Python web-services for local network that
will exchange with RPC commands with attached files with size 10-1000
MB. I'm trying to use SOAP for message exchanging since XML/JSON RPC
can't handle big messages, and SOAP have few features that allows to
stream files over network (SwA, MTOM).

I see some code related to MTOM in source code of rpclib, is it
possible to transfer big files with current version of rpclib? Is
there any examples of it?

Currently I try to modify binary_soap.py [1] example to return
rpclib.model.binary.File object, but without any luck:

     @srpc(String, _returns=File)
     def get(file_path):
         return [File("test.txt", "/tmp/test.txt")]

SUDS client receives just string:
[File(name='test.txt', path='/tmp/test.txt',
type='application/octet-stream', data=<generator object
to_string_iterable at 0xb6a18644>)]

Thanks in advance,
Vladimir Rutsky

[1] https://github.com/arskom/rpclib/blob/master/examples/binary_soap.py
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to