This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where are JAXB Artefacts coming from?

 
Jason Irwin
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic