← Back to team overview

ladon-dev-team team mailing list archive

[Question #284545]: How to change targetNamespace in soap description?


New question #284545 on ladon:

I have a problem with targetNamespace, here is my ladon_test.py:

from ladon.ladonizer import ladonize
from ladon.types.ladontype import LadonType

class Test(object):

    class Table(LadonType):
        slno = int
        colTitle = str
        colSize = int
        colAlign = str

    @ladonize([Table], rtype=int) #notice the [], around table that means the input will be a list of Table LadonTypes.
    def setTables(self, tables):

        return len(tables)

I want to make soap request using suds:

from suds.client import Client

client = Client('http://localhost:8888/Test/soap/description')

table = client.factory.create('Table')

table.slno = 1
table.colTitle = 'col1'
table.colSize = 10
table.colAlign = 'L'

table2 = client.factory.create('Table')
table2.slno = 2
table2.colTitle = 'col2'
table2.colSize = 15
table2.colAlign = 'L'

tableList = [table, table2]

print (client.service.setTables(tableList))

But I have an error:
suds.TypeNotFound: Type not found: ' (ArrayOfTable, http://tempuri.org/, )'

targetNamespace is set to tempuri.org in the service description. Can I change it?

You received this question notification because your team Ladon
Developer is an answer contact for ladon.