File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Android Security Essentials Live Lessons this week in the Android 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?


I agree. Here's the link:
subject: Where are JAXB Artefacts coming from?
Similar Threads
Swap function in java
WSDL to Java
Simple question about Unwrapped and Wrapped SOAP messages/WSDLs
RPC vs Document Style
JAX-WS service with jsf