Hi

Is it a soap-based service or just some custom XML which is coming back ?
If it is the latter then you might want to try using CXF WebClient instead
and register a custom
JAXBProvider configured to add/remove namespaces or have certain names
changed for the JAXB (un)marshalling
to succeed.

Some info is here
http://cxf.apache.org/docs/jax-rs.html#JAX-RS-CustomizingJAXBXMLandJSONinputandoutput
.

Option 1 which you mentioned is probably also worth a try

cheers, Sergey


On Wed, Sep 1, 2010 at 8:27 AM, Milisic Aleksandar <
[email protected]> wrote:

> Hi,
>
> I am trying to consume an XML over HTTP service which does not understand
> the
> concept of namespaces and I am using the JaxWsProxyFactoryBean class for
> that.
> Also, the names of fields of both request and response can be identical.
> The default binding implementation relies on the JAXB framework and the
> framework cannot expose a web service properly (the factory.create() throws
> an
> exception “Two classes have the same XML type name "{http://company.blabla
> /}individual-nameType". Use @XmlType.name and @XmlType.namespace to assign
> different names to them at this point
> JAXBContext.newInstance(classes.toArray(new Class[classes.size()]), map);)
> unless I specify namespaces to calm down JAXB.
>
>
> Could anyone possibly recommend the desirable approach:
>
> 1.      Create a custom interception which would erase namespace specific
> information before the request gets submitted along the chain.
> 2.      Create a custom DataBinging class and inherit it from
> AbstractDataBinding
> 3.      Do anything else to get it done.
>
> Any suggestion would be greatly appreciated.
>
> Kind regards,
>
> Aleks
>
>
>
>

Reply via email to