Topic
  • 2 replies
  • Latest Post - ‏2012-12-21T08:24:59Z by CM9Q_VamsiKrishna_Sribhashyam
javapet
javapet
5 Posts

Pinned topic RAD 7.5.4 WebServices JAX-WS : Customizing Namespace Prefixes

‏2010-01-08T14:20:57Z |
Hi,

I've created my web services top-down.

This nice feature generates a @WebServices annotated class with a method which returns a JAXB class.

The problem is that the response of the JAXB marshaller generates ns1, ns2 ... namespaces.

Fortunately, JAXB 2.0 (or later) provides a service provider interface (SPI) named com.sun.xml.bind.marshaller.NamespacePrefixMapper that you can use to specify more helpful namespace prefixes for marshalling. You implement the SPI and pass it to the Marshaller (http://blogs.sun.com/enterprisetechtips/entry/customizing_jaxb)

How can I do this ? How can I get a handle to the Marshaller ?

Kind regards
Updated on 2012-12-21T08:24:59Z at 2012-12-21T08:24:59Z by CM9Q_VamsiKrishna_Sribhashyam
  • javapet
    javapet
    5 Posts

    Re: RAD 7.5.4 WebServices JAX-WS : Customizing Namespace Prefixes

    ‏2010-01-11T07:37:46Z  
    What I'm looking for is some kind of 'control over jaxbContext' as mentioned in http://weblogs.java.net/blog/2008/08/29/control-over-jaxbcontext-jax-ws-ri metro (@UsesJAXBContext). Is there something like this in de IBM jax-ws-ri ?

    Tx
  • CM9Q_VamsiKrishna_Sribhashyam
    1 Post

    Re: RAD 7.5.4 WebServices JAX-WS : Customizing Namespace Prefixes

    ‏2012-12-21T08:24:59Z  
    • javapet
    • ‏2010-01-11T07:37:46Z
    What I'm looking for is some kind of 'control over jaxbContext' as mentioned in http://weblogs.java.net/blog/2008/08/29/control-over-jaxbcontext-jax-ws-ri metro (@UsesJAXBContext). Is there something like this in de IBM jax-ws-ri ?

    Tx
    I want the same. My tech stack is RSA 8.0.4 + WAS7 app server + JAX-WS 2.1 with JAXB 2.1.
    Can any one please suggest?

    • Vamsi