This is WSDL-first unfortunately. The classes in question are used for extension points in the WSDL that accept vendor-specific xsd:any blocks. I thought about trying to hook wsdl2java to see if I can get it to stick an @XmlSeeAlso on the generated classes - perhaps some sort of plugin, like the one that jams an "implements Serializable" on all the generated stubs.
-----Original Message----- From: Daniel Kulp [mailto:[email protected]] Sent: Tuesday, May 18, 2010 10:19 AM To: [email protected] Cc: Vanore, Gregory Subject: Re: Additional JAXBContext classes via JAX-WS API On Tuesday 18 May 2010 10:07:41 am Vanore, Gregory wrote: > I have gotten custom classes added to my context successfully with the > jaxb.additionalContextClasses property. That was handy, and works well > when I'm using CXF's Spring configuration mechanism. I have on my hands > a client that uses the JAX-WS API and I need to get some of our custom > classes into this context somehow. Specifically, it is using > Service.create followed by a Service.getPort. I just don't see a > mechanism besides the WebServiceFeature to accomplish this. I've been > poring over the documentation on these features but can't seem to locate > anything. Does anyone else have some experience with this? If this is a java first type case, the normal way to handle this is to add an @XmlSeeAlso annotation onto the interface passed into getPort that points to all the additional classes that need to be added. The @XmlSeeAlso can also be added to any of the classes that JAXB would already know about. -- Daniel Kulp [email protected] http://dankulp.com/blog
