[Soap-Python] Self referencing object & simpleContent question
Burak Arslan
burak.arslan at arskom.com.tr
Thu Jul 21 09:23:33 CEST 2011
----- Original message -----
> 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')
>
class Foo(ComplexModel):
class Attributes(ComplexModel.Attributes)
attr = String
Foo._type_info['bar'] = Foo
if i'm not mistaken. check with the source code.
best,
burak
> 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
> _______________________________________________
> Soap mailing list
> Soap at python.org
> http://mail.python.org/mailman/listinfo/soap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/soap/attachments/20110721/dedd8ace/attachment.html>
More information about the Soap
mailing list