This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Where are JAXB Artefacts coming from? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Where are JAXB Artefacts coming from?" Watch "Where are JAXB Artefacts coming from?" New topic

Where are JAXB Artefacts coming from?

Jason Irwin
Ranch Hand

Joined: Jun 09, 2009
Posts: 327
I have a very simple web service interface...

An implemenation of it...

And simple publisher...

What I intended to look at as "wsgen" and how it creates the JAXB artefacts. So I removed the "@SOAPBinding" from the interface declaration and ran the publisher. What I was expecting to get was an exception like "runtime modeler error: Wrapper class crude.server.jaws.AddNums is not found" as the WebService was now in the Document style rather than RPC. Instead the missing classes were dynamically created and the service became available. When I tried the same thing with M. Kalin's "TimeServer" code I get the expected "not found" exception.

This drove me completely crazy until I remembered that the classpaths for the two projects (I'm using Eclipse) were different. The key jar appears to be "webservices-rt.jar" that comes with Glassfish. As soon as I add that to my project and try to run the publisher, I get the exception I expect. So obviously some default behaviour in the JDK is causing the classes to be dynamically generated and the Glassfish jar does not do this.

Does anyone know what in the JDK is causing the classes to be dynamically created and if this behaviour can be controlled?


It is sorta covered in the JavaRanch Style Guide.
subject: Where are JAXB Artefacts coming from?