← Back to team overview

ladon-dev-team team mailing list archive

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

 

Question #284545 on ladon changed:
https://answers.launchpad.net/ladon/+question/284545

    Status: Open => Answered

jsgaarde proposed the following answer:
Please try with soapdocumentliteral protocol.
/ Jakob
Den 04/02/2016 09.28 skrev "Alexey Ustinnikov" <
question284545@xxxxxxxxxxxxxxxxxxxxx>:

> New question #284545 on ladon:
> https://answers.launchpad.net/ladon/+question/284545
>
> 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 you are an answer
> contact for ladon.
>

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