Return-Path: Delivered-To: apmail-axis-c-user-archive@www.apache.org Received: (qmail 51654 invoked from network); 26 Mar 2010 02:56:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Mar 2010 02:56:23 -0000 Received: (qmail 44750 invoked by uid 500); 26 Mar 2010 02:56:23 -0000 Delivered-To: apmail-axis-c-user-archive@axis.apache.org Received: (qmail 44712 invoked by uid 500); 26 Mar 2010 02:56:23 -0000 Mailing-List: contact c-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache AXIS C User List" Delivered-To: mailing list c-user@axis.apache.org Received: (qmail 44704 invoked by uid 99); 26 Mar 2010 02:56:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Mar 2010 02:56:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dimuthuc@gmail.com designates 209.85.222.177 as permitted sender) Received: from [209.85.222.177] (HELO mail-pz0-f177.google.com) (209.85.222.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Mar 2010 02:56:16 +0000 Received: by pzk7 with SMTP id 7so2018747pzk.30 for ; Thu, 25 Mar 2010 19:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:content-type; bh=Jm1BfbXAlmitf7LLOzolenKR6uOROCpViX1IHnX1Tw8=; b=trrFk59aGB/iVveZ24dMpiAGUeKOztpzcy7zCcEMGdjREqEStlGBF5CowXwV5Ge9wV tW/ghSKEif+uLXpoJLGINGYgM9Huqvk2dN3OWvH3lrmvVXRvq1vIy8foI+oEP8BkhS4W tN8RU2lzQYwvaFeY6//Or1SV3g0Ov4sScLkiY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=SifGPG8e5wcnKkyuLqM1Ng7ov1xPnwW24OaUFdRZi+hIaEIb12noxw9eBj8FkRAiA/ B3F8wafxwSB76lodESoEEaPaGA3gc2ACC1bjC5JbwrnExWAOQ72H3nNLObODjQwSH66a XVPCMcrj71IjBUXgVlZDYnXJZhQp971cGp6qA= MIME-Version: 1.0 Received: by 10.114.66.11 with HTTP; Thu, 25 Mar 2010 19:55:34 -0700 (PDT) In-Reply-To: References: From: Dimuthu Gamage Date: Fri, 26 Mar 2010 08:25:34 +0530 Received: by 10.114.33.26 with SMTP id g26mr138888wag.216.1269572154178; Thu, 25 Mar 2010 19:55:54 -0700 (PDT) Message-ID: Subject: Re: simpleType restrictions not in ADB from codegen To: Apache AXIS C User List Content-Type: multipart/alternative; boundary=001636b2b0e4443c630482ab4daf X-Virus-Checked: Checked by ClamAV on apache.org --001636b2b0e4443c630482ab4daf Content-Type: text/plain; charset=ISO-8859-1 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 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. > > > > > > > > > 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 --001636b2b0e4443c630482ab4daf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Cail,

Yea it is a limitation.

Anyway there will not be a s= pecial adb class generated for a simple type. It will use the base primitiv= e 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 su= pport the simple type restrictions in the setter functions.

But we h= ave a difficulty currently we are not using any pattern matching library in= side axis2/c, so to support facets like "pattern" we may need to = agree on a third party library. But facets like "maxLength" is tr= ivial to implement. So these are todos in WSDL2C tools.

But remember unless you are expecting tight schema validation from WSDL= 2C, you can use simple type restriction with the tool, without affecting th= e functionality.

Thanks,
Dimuthu

On Thu, Mar 25, 2010 at 3:13 AM, Cail Borrell <cail.borrell@gmail.com> wr= ote:
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=A0
service skeleton like this.

wsdl2c.sh -uri=A0= file:///services.wsdl=A0-ss -sd -d adb -u -f

To be more specific I am trying to get the restrictions from a "simp= leType"
into the adb type.

<xs:s= impleType=A0name=3D"TestSimpleType">
=A0=A0<xs= :restriction=A0base= =3D"xs:string">
=A0=A0 =A0xs:maxLength=A0va= lue=3D"100"/>
=A0= =A0 =A0<xs:pattern=A0value=3D"[A-Z]"/>
=A0=A0</xs:res= triction>
</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
<= /div>



--
Thanks,
Dimuthu= Gamage

http://www.dimuthu.org
http://www.wso2.org
--001636b2b0e4443c630482ab4daf--