You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jose Noheda <jo...@gmail.com> on 2012/03/21 17:31:52 UTC

Dynamic namespace in client

Hi,

I have a jaxws:client that proxies a web service. Unfortunately, I have two
environments to test against and each of them expects a different
targetNamespace. If I hardcode the namespace in the interface some tests
fail (with reason). Is there a way to indicate the correct namespace
dynamically?

Regards

Re: Dynamic namespace in client

Posted by Jose Noheda <jo...@gmail.com>.
Thanks! It worked like a charm

Regards

On Wed, Mar 21, 2012 at 9:52 PM, Sergey Beryozkin <sb...@gmail.com>wrote:

> Hi
>
> On 21/03/12 16:31, Jose Noheda wrote:
>
>> Hi,
>>
>> I have a jaxws:client that proxies a web service. Unfortunately, I have
>> two
>> environments to test against and each of them expects a different
>> targetNamespace. If I hardcode the namespace in the interface some tests
>> fail (with reason). Is there a way to indicate the correct namespace
>> dynamically?
>>
>> Regards
>>
>>  Try the Transform Feature:
> http://cxf.apache.org/docs/**transformationfeature.html<http://cxf.apache.org/docs/transformationfeature.html>
>
> Get those jaxws:clients which talk to the targets expecting different
> namespaces configured with the feature. Alternatively configure the target
> endpoints...
>
> Cheers, Sergey
>

Re: Dynamic namespace in client

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 21/03/12 16:31, Jose Noheda wrote:
> Hi,
>
> I have a jaxws:client that proxies a web service. Unfortunately, I have two
> environments to test against and each of them expects a different
> targetNamespace. If I hardcode the namespace in the interface some tests
> fail (with reason). Is there a way to indicate the correct namespace
> dynamically?
>
> Regards
>
Try the Transform Feature:
http://cxf.apache.org/docs/transformationfeature.html

Get those jaxws:clients which talk to the targets expecting different 
namespaces configured with the feature. Alternatively configure the 
target endpoints...

Cheers, Sergey