Le 19/04/2012 15:01, Vladimir Rutsky a écrit :
Hello!
On 04/19/2012 12:09 PM, Remi Jolin wrote:
Hello,
I made a test case to transfer files from the server to the client
with SOAP. I used ByteArray on the server side and I got a stream of
base64 encoded bytes on the client side. Very easy to decode in
python :-)
Is data is streamed in socket or it first completely read into memory
and then pushed in socket?
I suspect data is read into memory even if you use an iterator...
Latter case is not an option because it's quite hard to keep in memory
1 GB binary data.
But if data is actually streamed, can you provide complete example?
Best regards.
Le 18/04/2012 18:34, Vladimir Rutsky a écrit :
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
--
Vladimir Rutsky
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap