users@jaxb.java.net

RE: supressing class generation with xjc

From: Simons, William <William.Simons_at_childrens.harvard.edu>
Date: Fri, 11 Mar 2005 10:41:48 -0500

Thanks! That worked perfectly.

 

I noticed that my runtime packages were always included in the package
with the alphabetically first name... Is there a way to specify a
package for runtime?

 

So if I have org.chip.ping.xml.a, org.chip.ping.xml.b, usually runtime
winds up in a... could I specify to put it in org.chip.ping.xml.runtime?

 

 

Thanks,

Bill

 

 

________________________________

From: Jerry Lacy [mailto:jlacy_at_ssglimited.com]
Sent: Thursday, March 10, 2005 3:28 PM
To: users_at_jaxb.dev.java.net
Subject: RE: supressing class generation with xjc

 

Bill,

 

When performing the XJC compilation, are you specifying an alternate
runtime package?

 

e.g.

xjc ... -use-runtime <framework package>.impl.runtime

 

That should cause all of the generated classes to reference the runtime
objects like UnmarshallableObject from within the specified framework
package.

 

Jerry

________________________________

From: Simons, William [mailto:William.Simons_at_childrens.harvard.edu]
Sent: Thursday, March 10, 2005 1:39 PM
To: users_at_jaxb.dev.java.net
Subject: supressing class generation with xjc

 

In response to message
https://jaxb.dev.java.net/servlets/ReadMsg?list=users&msgNo=3880

 

"The current way of doing this is to instruct users to:

 

            1. compile their schemas

            2. delete a part of the generated stuff that corresponds to

               the framework schema"

 

We've run into this exact same packaging issues. I've tried the method
above and it doesn't quite work. Marshalling the generated objects
behaves as expected, but unmarshalling causes a ClassCastException. The
issue is that in the "external" project library, the
impl.runtime.AbstractUnmarshallingEventHandlerImpl.spawnChild method
casts objects as an UnmarshallableObject (defined in the same package).
But the object defined in the "framework" package implements
UnmarshallableObject from its own package... thus the ClassCastException
(I think).

 

Jerry, did you try this out with success? We are either missing some
key step or the workaround doesn't work in all cases.

 

Thanks in advance,

Bill Simons

Technical Architect / Principal Software Engineer

Children's Hospital Boston

Children's HST Informatics Program

http://ping.chip.org