what about doIt("truthiness")?
:-)
Gary
On Mon, Oct 6, 2014 at 10:49 AM, Daniel Kulp <[email protected]> wrote:
>
> This is also not really a bug in CXF but a bug in the JDK. The JAXB
> runtime would use javax.xml.bind.DatatypeConverter to parse the booleans
> and if I write a quick test like:
>
> @Test
> public void foo() {
> doIt("true");
> doIt("1");
> doIt("trud");
> doIt("trus”);
> doIt("trued");
> }
> public static void doIt(String s) {
> Boolean b = javax.xml.bind.DatatypeConverter.parseBoolean(s);
> System.out.println(s + ": " + b);
> }
>
> I get:
> true: true
> 1: true
> trud: true
> trus: true
> trued: true
>
> Thus, this is really outside of CXF’s control as Oracle would need to fix
> this in the JAXB runtime.
>
> That said, you can turn on schema validation and that SHOULD catch this.
> I believe the schema validator is much much more strict about this.
>
> Dan
>
>
>
>
>
> On Oct 6, 2014, at 7:49 AM, santodip <[email protected]> wrote:
>
> > I have written a web service using CXF. The WSDL contains one of the
> field as
> > 'boolean'. Unfortunately at runtime I found that when "trud", "trua" or
> > "truee" is passed through that field, it accepts the value as "true".
> This
> > should have been a "false" value for a boolean field.
> >
> > Any suggestion is highly appreciated
> >
> >
> >
> > --
> > View this message in context:
> http://cxf.547215.n5.nabble.com/CXF-accepts-tru-for-boolean-fields-tp5749458.html
> > Sent from the cxf-user mailing list archive at Nabble.com.
>
> --
> Daniel Kulp
> [email protected] - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>
--
E-Mail: [email protected] | [email protected]
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory