Hi Sergey, Arthur,

The recent patch  (CXF-4176) in OutTransformWriter preserves the
namespace prefixes except for the empty prefix (i.e., the default
namespace) when it is explicitly replaced by the defaultNamespace
property of OuttransformWriter. So, in order to assign a new prefix to
those existing default namespaces, you need to explicitly set the
defaultNamespace property to some value.

Unfortunately, I discovered one issue with the previous patch and
needed to make a small correction today (CXF-4244) for 2.6.1-SNAPSHOT
and 2.5.4-SNAPSHOT.

So, to use OutTransformWriter for this default namespace removal trick, you need

prior to 2.5.3, the empty prefix is automatically replaced with a
non-empty prefix
for 2.5.3 and 2.6.0, it is only replaced when the defaultNamespace
property is set (however with the issue CXF-4244).
from 2.5.4 and 2.6.1, it is only replaced when the defaultNamespace
property is set

I am sorry for the inconvenience. I will update the documentation with
this remark.

regards, aki

2012/4/17 Sergey Beryozkin <[email protected]>:
> Hi,
>
> I think if you simply pass the request through a CXF transformation
> feature then a prefix will be added, ex, set an outTransformElements
> property like this:
>
> {http://myns}* : {http://myns}*
>
> There could be a much simpler option for the JAX-WS fronthend, but I'm
> not aware of it
>
> I haven't tried but my work. The default namespace can also be
> enforced with the feature of needed
> HTH
> Sergey
>
> On Tue, Apr 17, 2012 at 4:00 PM, Arthur van Dorp <[email protected]> wrote:
>> Hi all
>>
>> I am trying to switch a webservice client over from Axis2 to CXF 2.5.2 with 
>> JAXB for databinding.
>>
>> The server it is talking to is implemented with Axis2. Whenever I use the 
>> CXF client, the Axis2 server ignores some parts of the request. It looks 
>> exactly like the problem described in the question over at stackoverflow:
>>
>> http://stackoverflow.com/questions/9537462/cxf-codegen-generated-client-needs-namespace-on-the-soap-envelope/
>>
>> The request the Axis2 client generates has a namespace prefix for every 
>> element whereas the CXF/JAXB generated code uses a default namespace and 
>> omits the prefix. Nothing wrong with that in my book, but it doesn't seem to 
>> work with the Axis2 server.
>>
>> Using XMLBEANS for databinding works, but has other downsides. I would like 
>> to use JAXB.
>>
>> Any ideas on how to resolve this problem on the CXF client side (even if it 
>> might be an Axis2 bug)?
>>
>> Thanks and regards
>>
>> Arthur
>>
>>
>> --
>> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
>> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
>
>
>
> --
> Sergey Beryozkin
>
> http://sberyozkin.blogspot.com
> Talend - http://www.talend.com

Reply via email to