users@jaxb.java.net

Re: JAXB2 on-demand validation

From: wiedkla <klaus.wiederaenders_at_alcatel.at>
Date: Mon, 13 Mar 2006 23:56:14 -0800 (PST)

Kohsuke Kawaguchi-2 wrote:
>
> You can validate as a part of the marshalling by using
> Marshaller.setSchema().
>
>
>> Btw. There is a project for istack-commons.jar at dev.java.net, but no
>> download link. Any idea?
>
> It's meant for this project and http://jax-ws.dev.java.net/ project, and
> not really for anyone else. Which aspect of istack-commons are you
> interested?
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems kohsuke.kawaguchi_at_sun.com
>
>
Hi,
thank you for your reply.

How to tell...?
I thought, on-demand validation is independent from
marshalling/unmarshalling.
I have to do a GUI for input of XML data controlled by (of course) an xsd.
I have to validate each input, which is stored in JAXB generated code, on
the fly.
No marshalling required at this point. Shall I really marshall after each
user input?

The istack thing is just because I tried to get running your
jaxb2-reflection library.
But this project seems to be stalled (what is a pitty, it's just what I
need).
See thread "jaxb2-reflection exception" on this list.

I tried to fix it myself (that's why I looked for istack), but it looks like
it cannot not to be done
in a day or two. What plans do you have with jaxb2-reflection? I could put
some effort on this,
if you would tell me more about it. Is there a living community for it? Such
a big work just right now
unusable?

As I realized, you are engaged in the JAXB2 development (sorry not knowing
exactly) at Sun.
Unfortunately, I should tell yout, that the "Java WEB Services Tutorial" for
Java WEB Services
Developer's pack 2.0 dated February 17, 2006 is very weak in the JAXB part.
There is plenty
of code not really working (such as u.setValidating( true ) at page 34) as
well as examples not
included in the distribution set, such as j2s-xmlAccessorOrderExample (which
contradicts your
jaxb2-reflection code). The latest JWSDP ships with the following examples:
catalog-resolver
character-escape
create-marshal
datatypeconverter
dtd
element-substitution
external-customize
fix-collides
inline-customize
j2s-create-marshal
locator-support
modify-marshal
namespace-prefix
partial-unmarshalling
pull-parser
synchronized-methods
type-substitution
ubl
unmarshal-read
unmarshal-validate
updateablePartialBind
vendor-extensions
xml-channel
xml-stylesheet

No j2s-xmlAdapter-field, for instance (page 69).
Furterhermore, this tutorial is more of an introduction.
Important concepts are missing (on-demand validation?).

But, it's not my turn to critisize. I simply have to convince
my boss (and myself) to use JAXB in our project. Certainly,
I have some ideas about flexible XML binding apart from
what JAXB2 is providing (especially on the customization part).
However, marshalling/unmarshalling the standard way works fine (and
solves 90% of our problem). Thank you for JAXB 2.

Have fun,
Klaus

--
View this message in context: http://www.nabble.com/JAXB2-on-demand-validation-t1271066.html#a3392372
Sent from the java.net - jaxb users forum at Nabble.com.