You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Cail Borrell <ca...@gmail.com> on 2010/03/24 22:43:03 UTC
simpleType restrictions not in ADB from codegen
Hi List
I am using the wsdl2c tool and cannot get my type definitions converted
to adb properly.
I am using Axis2 1.5.1 and Axis2c 1.6 on MacOSX and generate the
service skeleton like this.
wsdl2c.sh -uri file:///services.wsdl -ss -sd -d adb -u -f
To be more specific I am trying to get the restrictions from a
"simpleType"
into the adb type.
<xs:simpleType name="TestSimpleType">
<xs:restriction base="xs:string">
<xs:maxLength value="100"/>
<xs:pattern value="[A-Z]"/>
</xs:restriction>
</xs:simpleType>
I get the adb type generated but without the restrictions.
Is this a know limitation or am I just doing something wrong?
Thanks,
Cail
Re: simpleType restrictions not in ADB from codegen
Posted by Cail Borrell <ca...@gmail.com>.
Hi Dimuthu,
Ok. thanks for the pointers.
-Cail
On Mar 26, 2010, at 3:55 AM, Dimuthu Gamage wrote:
> Hi Cail,
>
> Yea it is a limitation.
>
> Anyway there will not be a special adb class generated for a simple
> type. It will use the base primitive class name. (i.e in your
> example TestSimpleType is a axis2_char_t*).
> But we should implement some constrain checks to validate the
> content to support the simple type restrictions in the setter
> functions.
>
> But we have a difficulty currently we are not using any pattern
> matching library inside axis2/c, so to support facets like "pattern"
> we may need to agree on a third party library. But facets like
> "maxLength" is trivial to implement. So these are todos in WSDL2C
> tools.
>
> But remember unless you are expecting tight schema validation from
> WSDL2C, you can use simple type restriction with the tool, without
> affecting the functionality.
>
> Thanks,
> Dimuthu
>
> On Thu, Mar 25, 2010 at 3:13 AM, Cail Borrell
> <ca...@gmail.com> wrote:
> Hi List
>
> I am using the wsdl2c tool and cannot get my type definitions
> converted
> to adb properly.
>
> I am using Axis2 1.5.1 and Axis2c 1.6 on MacOSX and generate the
> service skeleton like this.
>
> wsdl2c.sh -uri file:///services.wsdl -ss -sd -d adb -u -f
>
> To be more specific I am trying to get the restrictions from a
> "simpleType"
> into the adb type.
>
> <xs:simpleType name="TestSimpleType">
> <xs:restriction base="xs:string">
> <xs:maxLength value="100"/>
> <xs:pattern value="[A-Z]"/>
> </xs:restriction>
> </xs:simpleType>
>
> I get the adb type generated but without the restrictions.
>
> Is this a know limitation or am I just doing something wrong?
>
> Thanks,
> Cail
>
>
>
> --
> Thanks,
> Dimuthu Gamage
>
> http://www.dimuthu.org
> http://www.wso2.org
Re: simpleType restrictions not in ADB from codegen
Posted by Dimuthu Gamage <di...@gmail.com>.
Hi Cail,
Yea it is a limitation.
Anyway there will not be a special adb class generated for a simple type. It
will use the base primitive class name. (i.e in your example TestSimpleType
is a axis2_char_t*).
But we should implement some constrain checks to validate the content to
support the simple type restrictions in the setter functions.
But we have a difficulty currently we are not using any pattern matching
library inside axis2/c, so to support facets like "pattern" we may need to
agree on a third party library. But facets like "maxLength" is trivial to
implement. So these are todos in WSDL2C tools.
But remember unless you are expecting tight schema validation from WSDL2C,
you can use simple type restriction with the tool, without affecting the
functionality.
Thanks,
Dimuthu
On Thu, Mar 25, 2010 at 3:13 AM, Cail Borrell <ca...@gmail.com>wrote:
> Hi List
>
> I am using the wsdl2c tool and cannot get my type definitions converted
> to adb properly.
>
> I am using Axis2 1.5.1 and Axis2c 1.6 on MacOSX and generate the
> service skeleton like this.
>
> wsdl2c.sh -uri file:///services.wsdl -ss -sd -d adb -u -f
>
> To be more specific I am trying to get the restrictions from a "simpleType"
> into the adb type.
>
> <xs:simpleType name="TestSimpleType">
> <xs:restriction base="xs:string">
> <xs:maxLength value="100"/>
> <xs:pattern value="[A-Z]"/>
> </xs:restriction>
> </xs:simpleType>
>
> I get the adb type generated but without the restrictions.
>
> Is this a know limitation or am I just doing something wrong?
>
> Thanks,
> Cail
>
--
Thanks,
Dimuthu Gamage
http://www.dimuthu.org
http://www.wso2.org