我为$table->table_category()->first()->name
服务使用spyne
库。我有这条线:
soap
。
问题是__in_protocol__ = Soap11(validator='lxml')
文件的最大大小。它是10 mb。这意味着我无法通过lxml
传输超过10 MB的文件。我该如何解决?
增添。
此脚本已调用此错误:
spyne
这个脚本的答案是第500个错误,我明白了:
# -*- coding: utf-8 -*-
import base64
from suds.client import Client
from suds.sax.element import Element
# My local server
LOCAL = 'http://localhost:5555/api/containerize?wsdl'
# ------------------ Creating new Client object ---------------------- #
client = Client(LOCAL)
# ------------------ Adding session key for soap header ------------------ #
el = Element('xsi:sessionkey').setText('87242d1869a344a4a64db2241771343b')
RequestHeader = Element('xsi:RequestHeader').insert(el)
client.set_options(soapheaders=RequestHeader)
container = client.factory.create('Container')
container.name = 'FNS_1AE4E68B842-86E9-4830-A1F3-2BC2FB0D2FE7_6324_06ce2326d5a840a7bb132c7e45711f61_10_04_07.zip'
container.content = base64.b64encode(open('test.txt', 'rb').read())
print len(container.content)
# -------------------- Sending soap message ----------------------- #
client.service.SendContainer(container)
但如果我使用的文件小于9.7 mb,它就可以工作。
服务器端使用10094104
No handlers could be found for logger "suds.client"
Traceback (most recent call last):
File "test.py", line 35, in <module>
client.service.SendContainer(container)
File "/home/samojlov/myprojects/iotchet/venv/local/lib/python2.7/site-packages/suds/client.py", line 542, in __call__
return client.invoke(args, kwargs)
File "/home/samojlov/myprojects/iotchet/venv/local/lib/python2.7/site-packages/suds/client.py", line 602, in invoke
result = self.send(soapenv)
File "/home/samojlov/myprojects/iotchet/venv/local/lib/python2.7/site-packages/suds/client.py", line 649, in send
result = self.failed(binding, e)
File "/home/samojlov/myprojects/iotchet/venv/local/lib/python2.7/site-packages/suds/client.py", line 702, in failed
r, p = binding.get_fault(reply)
File "/home/samojlov/myprojects/iotchet/venv/local/lib/python2.7/site-packages/suds/bindings/binding.py", line 265, in get_fault
raise WebFault(p, faultroot)
suds.WebFault: Server raised fault: 'internal error: Huge input lookup, line 1, column 10094644'
库。我试图找到问题的根源。我认为它的spyne
库不能处理超过10 mb的文件。