users@jaxb.java.net

Re: Any XML in an element?

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_Sun.COM>
Date: Thu, 08 Apr 2004 08:42:13 -0400

Gary Gregory wrote:
>
> I want to use Jaxb for the containing document and then pass on the
> string or DOM Node or /whatever/ down to our other code pile.
>

You might want to try using the <xjc:dom> customization[1].


> This Schema snippet allows my example document to be validated in XMLSpy
> as well as parsed by the generated Jaxb code but the "contents" are
> null:
>
> RequestSetType requestSet =RequestSetType) unmarshaller
> .unmarshal(new StringReader(xml), RequestSetType.class);
> RequestType[] req =equestSet.getRequest();
> for (int i =; i < req.length; i++) {
> InputType input =eq[i].getInput();
> Object any =nput.getAny();
> Assert.assertNotNull(any); // blows up
> }
>
> Is it possible to get Jaxb to give me /something/ for the contents of
> <Input>?
>

I would expect this to work. Which version of JAXB are you running?
It would be very helpful if you could reduce this down to a small
self-contained test case and file a bug[1] for us to investigate.

Thanks,

--Ryan


[1] http://java.sun.com/webservices/docs/1.3/jaxb/vendorCustomizations.html#dom
[2] http://jaxb.dev.java.net/issues/enter_bug.cgi



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net