[Soap-Python] Self referencing object & simpleContent question

antoine.humbert at free.fr antoine.humbert at free.fr
Wed Jul 20 19:44:21 CEST 2011


To self reference a a complex type, you hace to use something like :

class Foo(ComplexModel):
   bar = None

Foo.bar = Foo

To create a String type with attributes, I think you should use something like

class Foo(ComplexModel):
   __extends__ = String
   attr = XMLAttribute('xs:string')

This will give the correct definition in the wsdl but you won't be able to instantiate any object of this class. Moreover, I don't know how you could set the text of the element.
I think there is a lack in the api for this.


Regards

Antoine

----- "Tsah Zelenka" <tsah at pheer.it> a écrit :

> Hello,
> 
> I need to make a SOAP server implementing an existing WSDL. There are
> two things that i don't know how to design in python :
> - A complex type whom is referencing to itself
> - A simpleContent, for example a string with attributes.
> 
> Is there any way to implement them with soaplib? 
> 
> Best regards,
> T.
> _______________________________________________
> Soap mailing list
> Soap at python.org
> http://mail.python.org/mailman/listinfo/soap


More information about the Soap mailing list