Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 14629 invoked from network); 5 Oct 2007 04:45:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Oct 2007 04:45:34 -0000 Received: (qmail 16863 invoked by uid 500); 5 Oct 2007 04:45:17 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 16802 invoked by uid 500); 5 Oct 2007 04:45:17 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 16791 invoked by uid 99); 5 Oct 2007 04:45:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2007 21:45:17 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of amilasuriarachchi@gmail.com designates 72.14.204.236 as permitted sender) Received: from [72.14.204.236] (HELO qb-out-0506.google.com) (72.14.204.236) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2007 04:45:19 +0000 Received: by qb-out-0506.google.com with SMTP id e34so82247qbe for ; Thu, 04 Oct 2007 21:44:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=/r/oOMu7pprlq5FRX9yGmAUyprEnizvj+/mdne7zPw8=; b=sv/YOsKSxQmzO6YPhaaNIvVE3Wl6pRdulEZ5moLKQ/j7jD6p6H2wgtp+0Toa75SvV0OREoTN1LEMQ93eRlPkIG8ZtmrREq5HpBTnFC1ZTX6ZfzTMVVjYGRL923SQ3/6kwAdgqqK7bfsCWUxYyUcfgdxnDcO+nAN6DqsrrNqMThI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=K79ASvTK9Nubx+KpUrroWe3o62dPQEe+uAEQ2YjhoAcI7/a7iUiOOjcTGFJBBmm0OUr2PQAKmOEnxTcYKpR93J3UQHXICWZGNpEj/Lr7REqcDYkIdaMRBUGIiYB1M3j7IbtKQWxDWA71ijLjx5AUdYJ1hO8x/242N2bZ/+bMrTk= Received: by 10.141.62.9 with SMTP id p9mr3830rvk.1191559497811; Thu, 04 Oct 2007 21:44:57 -0700 (PDT) Received: by 10.140.131.2 with HTTP; Thu, 4 Oct 2007 21:44:57 -0700 (PDT) Message-ID: <60708f4b0710042144p3d9bad6dl7e2b53d0c9b6c465@mail.gmail.com> Date: Fri, 5 Oct 2007 10:14:57 +0530 From: "Amila Suriarachchi" To: axis-dev@ws.apache.org, krssak@upc.uniba.sk Subject: Re: Problem with pattern restriction in XSD and WDSL2Java generated code In-Reply-To: <47f808da0710040327g68f7830cp6c4960a194983c58@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12890_9360031.1191559497823" References: <47f808da0709270124g2f4fea8ai6190141796c29f18@mail.gmail.com> <999573.71650.qm@web52604.mail.re2.yahoo.com> <60708f4b0709280025x6d610029la39eb2d122d95d77@mail.gmail.com> <60708f4b0709280036g17e6d8cbj23c1f821036b7ab5@mail.gmail.com> <47f808da0710040327g68f7830cp6c4960a194983c58@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_12890_9360031.1191559497823 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 10/4/07, Jozef Krssak wrote: > > Hi > > On 9/28/07, Amila Suriarachchi wrote: > > > > > > > > On 9/28/07, Amila Suriarachchi < amilasuriarachchi@gmail.com> wrote: > > > > > > hi, > > > > > > this should be a bug. we have to use the connvertToString method > > > of the ConverterUtil class. which properly out put the string values. > > > > > > please have a look at with a nightly build. > > > > > Sorry for late answer, I have tested it with today's nightly build. > Well, ConverterUtil.convertToString(Date) use own hard coded pattern to > convert to String and output of this method in my case is "2007-07-09Z" and > due to letter Z this output does not match my pattern > "[0-9]{4}-[0-9]{2}-[0-9]{2}". Of course problem with letter Z instead of > time zone can be fixed. Important is that pattern in convertToString() is > hard coded ("yyyy-MM-dd'Z'") while pattern in XSD can be variable, e.g"[0-9]{2}-[0-9]{2}-[0-9]{4}". > > I still think that to test if any value match any string pattern is > usefull when parameter of generated method is String (e.g. > setWSTypeDate(String)) and not Date ( e.g. setWSTypeDate(java.util.Date). > It is hard to solve it, because someone can want to use patter to allow > set only specific date (e.g. "[0-9]{2}-[0-9]{2}-1[0-9]{3}"). According to the xml spec[1] there is a specific pattern to specify the date. And also I think Axis2 date serialization should change to use the recovarable time zone. i.e real time zone. if you giving a pattern to the date it is also better to put that pattern so that any serialization format accept it. Amila. [1] http://www.w3.org/TR/xmlschema-2/#date Thanks and Regards > > -- > Jozef Krssak > > -- Amila Suriarachchi, WSO2 Inc. ------=_Part_12890_9360031.1191559497823 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On 10/4/07, Jozef Krssak <jozef.krssak@gmail.com> wrote:
Hi

On 9/28/07, Amila Suriarachchi < amilasuriarachchi@gmail.com> wrote:


On 9/28/07, Amila Suriarachchi < amilasuriarachchi@gmail.com> wrote:
hi,

this should be a bug. we have to use the connvertToString method
of the ConverterUtil class. which properly out put the string values.

please have a look at with a nightly build.


Sorry for late answer, I have tested it with today's nightly build.
Well, ConverterUtil.convertToString(Date) use own hard coded pattern to convert to String and output of this method in my case is "2007-07-09Z" and due to letter Z this output does not match my pattern "[0-9]{4}-[0-9]{2}-[0-9]{2}". Of course problem with letter Z instead of time zone can be fixed. Important is that pattern in convertToString() is hard coded ("yyyy-MM-dd'Z'") while pattern in XSD can be variable, e.g "[0-9]{2}-[0-9]{2}-[0-9]{4}".

I still think that to test if any value match any string pattern is usefull when parameter of generated method is String (e.g. setWSTypeDate(String)) and not Date ( e.g. setWSTypeDate(java.util.Date).
It is hard to solve it, because someone can want to use patter to allow set only specific date (e.g. "[0-9]{2}-[0-9]{2}-1[0-9]{3}").

According to the xml spec[1] there is a specific pattern to specify the date. And also I think Axis2 date serialization should change to use the recovarable time zone. i.e real time zone.

if you giving a pattern to the date it is also better to put that pattern so that any serialization format accept it.

Amila.

[1] http://www.w3.org/TR/xmlschema-2/#date

Thanks and Regards

--
Jozef Krssak




--
Amila Suriarachchi,
WSO2 Inc. ------=_Part_12890_9360031.1191559497823--