cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raul Kripalani (JIRA)" <>
Subject [jira] [Updated] (CXF-5581) Dynamic endpoint address is buggy unless ConduitSelector.compareFullUrl is enabled
Date Wed, 26 Feb 2014 16:25:28 GMT


Raul Kripalani updated CXF-5581:


Attached unit test built with Camel: [^]. BTW: I'm 100% confident
this is not a Camel problem.

You can attain correct behaviour by suffixing this to the CXF Producer URI inside the route:


> Dynamic endpoint address is buggy unless ConduitSelector.compareFullUrl is enabled
> ----------------------------------------------------------------------------------
>                 Key: CXF-5581
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.7.6
>            Reporter: Raul Kripalani
>             Fix For: 3.0.0, 2.7.11
>         Attachments:
> When using the RequestContext Message.ENDPOINT_ADDRESS option in an CXF-WS client to
override the configured endpoint address with a different one during runtime, the endpoint
"fixates" on the first endpoint address ever effectively used after initialization.
> Try this:
> # Set up http://aaaa:8080 as the endpoint address in the configuration.
> # Initialize the JAX-WS client.
> # Send a first request with the Message.ENDPOINT_ADDRESS request context property set
to http://bbbb:8080.
> # CXF calls http://bbbb:8080 correctly as expected.
> # Send a second request without the Message.ENDPOINT_ADDRESS property, i.e. no overriding.

> # You were expecting a call to http://aaaa:8080, but CXF calls http://bbbb:8080, because
this is how the conduit was initialized.
> The problem lies in AbstractConduitSelector#findCompatibleConduit, which by default only
uses the URI scheme (protocol, e.g. http, https) to select the conduit, failing to acknowledge
that the address could have been overridden at runtime.
> This behaviour can be switched to the expected behaviour by explicitly setting the org.apache.cxf.ConduitSelector.compareFullUrl
property to 'true' in the context. 
> However, this is largely obscure, not documented anywhere and user unfriendly. In my
opinion, it should work as expected OOTB.

This message was sent by Atlassian JIRA

View raw message