pdf file can't be send to suds(client) using ladon with SOAP protocol
Hi, i am using Ladon and Python under mod_wsgi working with Apache2 with SOAP protocol.
I have got the following traceback, when I tried to get a file from specified location in server with the service "download"
Traceback (most recent call last):
File "/var/www/
lst_
File "/usr/local/
File "/usr/local/
File "/usr/local/
File "/usr/local/
File "/usr/local/
File "/usr/local/
File "/usr/lib/
xmlreader.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
raise exception
xml.sax.
The service 'download' is like as follows:
server apache2
--------------
# -*- coding: utf-8 -*-
from ladon.types.
from ladon.compat import PORTABLE_STRING
from os.path import dirname,
upload_dir = join(dirname(
class File(LadonType):
data = attachment
name = PORTABLE_STRING
class AccountEngine(
@ladonize(
def download(
"""
Download multiple files at once. For each name in the <b>names</b> the service
attempts to find a file in service/upload that matches it. If a name does not
have a matching file it is ignored.
@param names: A list of the file names
@rtype: Returns a list of File objects
"""
global upload_dir
print upload_dir
response = []
for name in names:
f = File()
f.name = name
f.data = attachment(
response += [f]
return response
I think the attachment is not/less compatible with SOAP
Anybody knows how to solve this?
This is how I call the service download (with a list of file names as the parameter):
client python
-------------
lst1 = ["__File__.pdf"]
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- ladon Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- bibin kk
- Solved:
- Last query:
- Last reply: