How to send a file through Soap in python?

前端 未结 3 970
一个人的身影
一个人的身影 2020-12-10 22:36

I want to send a zip file through SOAP (from a SOAP client to a SOAP server) in python.

Following the reading of this SO question, I choose to use suds as my python

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-10 23:38

    Attachments are best way to send binary file through SOAP. If you can't use any other method but only SOAP, just encode your binaries with Base64 and paste it into SOAP method as a parameter. It isn't pure, but works great with small attachments. Large binaries? Use FTP, WebDAV and all others native ways for sending files between hosts.

提交回复
热议问题