Search |
||
Control Over JAXBContext in JAX-WS RI/MetroPosted by jitu on August 29, 2008 at 4:20 PM PDT
Thanks to Kohsuke who created @UsesJAXBContext feature(after many reminders!! yeah, yeah he is busy with many other things like hudson, Brazil trip!!). Basically, this feature provides a JAXBRIContext that needs to be used in the runtime. Here is an endpoint sample that uses this feature:
@WebService
@UsesJAXBContext(ServerJAXBContextFactory.class)
public class EchoImpl {
...
}
public class ServerJAXBContextFactory implements JAXBContextFactory {
public JAXBRIContext createJAXBContext(...) throws JAXBException {
...
}
}
I added two test cases:
custom_client_jaxbcontext,
custom_server_jaxbcontext. Both these test cases create their own JAXBRIContext to do type substitution(but doesn't use @XmlSeeAlso). I think that it is also possible to influence (Un)Marshallers that are used by JAX-WS RI runtime using this feature.
Try the 2.1.x nightly and let us know your feedback. The feature will be part of JAX-WS RI 2.1.5/Metro 1.4.
»
Comments
Comments are listed in date ascending order (oldest first)
Submitted by krishnaveni17 on Thu, 2009-05-28 12:11.
Hi ,
I was looking on having our own prefix for namespaces in WSDL generated request and response objects. Can we achieve this using this feature. If so ca you provide me with some study material or samples on this.
Thanks.
|
||
|
|