Hi Sergey,
Thanks for the update, but if I understood the class property correctly,
this only allows one to use the other but does not necessary replace.
Also, it does not seem to affect the wadl generated. I added the following:
<bean class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
<property name="inTransformElements">
<map>
<entry key="http://custom.domain"
value="http://class.registered.domain" />
</map>
</property>
<property name="outTransformElements">
<map>
<entry key="http://class.registered.domain"
value="http://custom.domain" />
</map>
</property>
</bean>
The custom.domain is not mentioned anywhere in the wadl generated.
Is something similar available to JAX-WS?
It's just a nice to have. :)
Gabo
Sergey Beryozkin wrote:
Hi,
Is it JAXRS or JAXWS ?
I think you can probably rely on the custom XMLStreamReaders/Writers
to translate between diff namespaces.
If it is JAXRS then you might also want to try to configure a
JAXBElementProvider, starting from 2.2.5, ex, say you need to have
{http://bar}bar converted into {http://baz}bar both ways.
So you can configure JAXBElementProvider with outElementsMap and
inElementsMap map properties, containing
{http://bar}bar:{http://baz}bar
and
{http://baz}bar:{http://bar}bar
pairs respectively.
This approach is a bit limited at the moment in that no wildcards for
local names are supported, thus it would well for schemas with only
the root element being explicitly qualified, and would be more
cumbersome in other cases as it would require users to list all the
elements, but it would be easy to fix.
XSLTJaxbProvider wiull also work both ways
cheers, Sergey
----- Original Message ----- From: "Gabo Manuel"
<[email protected]>
To: <[email protected]>
Sent: Thursday, December 10, 2009 4:01 AM
Subject: [CXF-2.2.5][Java1.5] Define namespace by configuration
Hi All,
To explain the scenario, we provide back-end support for service
providers. The end client therefore should have no knowledge we
exist. Is there a way to configure from a text file the namespace to
be used by the service classes and objects involved? This way there
would be no need to recompile the entire project for each client.
Thanks in advance.
Gabo