axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jozef Krssak" <>
Subject Re: Problem with pattern restriction in XSD and WDSL2Java generated code
Date Thu, 04 Oct 2007 10:27:14 GMT

On 9/28/07, Amila Suriarachchi <> wrote:
> On 9/28/07, Amila Suriarachchi <> 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,

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}").

Thanks and Regards

Jozef Krssak

View raw message