Re: [spyne] How to make a complexType that extends a simpleType

2016-09-22 Thread David Mugnai
Quoting Burak Arslan (2016-09-22 08:40:55)
> 
> 
> On 09/21/16 23:59, David Mugnai wrote:
> > are the two xml equivalent?
> 
> That is a very good question to which admittedly I have no definite
> answer. To my eyes they look equivalent. I think the best option here is
> to try it, as deducing this information from thousands of pages of xml
> schema spec would be  heartwarming :)

:) understood!

> 
> >  If not how can I change the `Refine` class
> > to match the expected wsdl?
> 
> You have to either patch the WSDL once generated or patch Spyne. I could
> of course help you with that if we figure that's the only option.

Thank you
david
___
Spyne community mailing list
people@spyne.io
http://lists.spyne.io/listinfo/people


Re: [spyne] How to make a complexType that extends a simpleType

2016-09-21 Thread Burak Arslan


On 09/21/16 23:59, David Mugnai wrote:
> are the two xml equivalent?

That is a very good question to which admittedly I have no definite
answer. To my eyes they look equivalent. I think the best option here is
to try it, as deducing this information from thousands of pages of xml
schema spec would be  heartwarming :)

>  If not how can I change the `Refine` class
> to match the expected wsdl?

You have to either patch the WSDL once generated or patch Spyne. I could
of course help you with that if we figure that's the only option.

Best regards,
Burak
___
Spyne community mailing list
people@spyne.io
http://lists.spyne.io/listinfo/people


Re: [spyne] How to make a complexType that extends a simpleType

2016-09-21 Thread David Mugnai
Quoting David Mugnai (2016-09-21 14:39:05)
> Quoting Burak Arslan (2016-09-21 17:16:42)
> > Hey,
> > 
> > 
> > On 09/21/16 14:58, David Mugnai wrote:
> > > Hi all,
> > >
> > > I need to replicate this wsdl using spyne
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > 
> > You seem to be looking for XmlData.
> > 
> > See here:
> > https://github.com/arskom/spyne/blob/0f587b2d606b54e41fc5cc3d33b51cc3b324a2ca/examples/xml/utils.py
> > 
> > If you run that file you can see the produced schema.
> > 
> > Does it help?
> 
> From a quick test it seems so!

First of all thank you, this declaration:

class MyType(ComplexModel):
version = XmlAttribute(primitive.Unicode)
data = XmlData(primitive.Unicode)

results in the expected wsdl, great!

This declaration instead:

class Refine(MyType):
pass

results in this xml:









while the reference wsdl says:







are the two xml equivalent? If not how can I change the `Refine` class
to match the expected wsdl?


david
___
Spyne community mailing list
people@spyne.io
http://lists.spyne.io/listinfo/people


Re: [spyne] How to make a complexType that extends a simpleType

2016-09-21 Thread David Mugnai
Quoting Burak Arslan (2016-09-21 17:16:42)
> Hey,
> 
> 
> On 09/21/16 14:58, David Mugnai wrote:
> > Hi all,
> >
> > I need to replicate this wsdl using spyne
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> You seem to be looking for XmlData.
> 
> See here:
> https://github.com/arskom/spyne/blob/0f587b2d606b54e41fc5cc3d33b51cc3b324a2ca/examples/xml/utils.py
> 
> If you run that file you can see the produced schema.
> 
> Does it help?

>From a quick test it seems so!

Thank you very much
david
___
Spyne community mailing list
people@spyne.io
http://lists.spyne.io/listinfo/people


Re: [spyne] How to make a complexType that extends a simpleType

2016-09-21 Thread Burak Arslan
Hey,


On 09/21/16 14:58, David Mugnai wrote:
> Hi all,
>
> I need to replicate this wsdl using spyne
>
> 
> 
> 
> 
> 
> 
> 

You seem to be looking for XmlData.

See here:
https://github.com/arskom/spyne/blob/0f587b2d606b54e41fc5cc3d33b51cc3b324a2ca/examples/xml/utils.py

If you run that file you can see the produced schema.

Does it help?

Best,
Burak
___
Spyne community mailing list
people@spyne.io
http://lists.spyne.io/listinfo/people


[spyne] How to make a complexType that extends a simpleType

2016-09-21 Thread David Mugnai
Hi all,

I need to replicate this wsdl using spyne









It's a complex type that extends a string adding an attribute.


I'm using spyne from the master branch


First attempt


class MyType(ComplexModel):
__namespace__ = "uri:my-ns"
__extends__ = primitive.Unicode
version = XmlAttribute(primitive.Unicode)

that produces:






Second attempt (with a patched spyne)

class MyType(ComplexModel):
__namespace__ = "uri:my-ns"
__extends__ = primitive.Unicode
version = XmlAttribute(primitive.Unicode)

that produces:










Thank you
david
___
Spyne community mailing list
people@spyne.io
http://lists.spyne.io/listinfo/people