Hi

One trick which should work is to pass it via Stax Transform feature,
https://cxf.apache.org/docs/transformationfeature.html#TransformationFeature-Changinginputandoutputelementnamesandnamespaces

set a pair "{http://myns}:*"; : "{http://myns}:*";

it is kind of a copy transform, and it should result in the prefixes used

Cheers, Sergey


On 08/04/14 23:25, Pablo Caballero wrote:
Hi! I'm using cxf (2.2.10 version) as a WS client. The nasty server side
implementation (I can't change it nor suggest to change it to his owner)
requires:

<blah:hola xmlns:blah="http://lalalala";>
..................
</blah:hola>

and the (correct) payload generated by my client is

<hola xmlns="http://lalalala";>
..................
</hola>

("blah" can be whatever I want)

I played with the package-info.java file adding:

@javax.xml.bind.annotation.XmlSchema(
         namespace = "http://lalalala";,
         elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED,
                 xmlns = {
                  @javax.xml.bind.annotation.XmlNs(prefix = "blah",
                             namespaceURI="http://lalalala";)}
         )

but it does not seem to work.

Could someone help me?

Thank you very much

Best regards!



--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to