Hi again,
it seems like a different approach "could" work:
org.apache.cxf.endpoint.Client client = org.apache.cxf.frontend.ClientProxy
.getClient(ref);
client.getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:8080/Changed");
the problem is that the address set n the request is ignored, and the
request is still sent to the original address.
I'm using cxf 2.2.1
Any idea?
On Fri, May 1, 2009 at 11:13 AM, Valerio Schiavoni
<[email protected]> wrote:
> Hello,
> i'm trying to modify the endpoint reference address using CXF API:
>
> org.apache.cxf.endpoint.Client client = org.apache.cxf.frontend.ClientProxy
> .getClient(ref);
> Conduit conduit = client.getConduit();
> EndpointReferenceType endpointRef = conduit.getTarget();
> System.err.println("Original addr: "+endpointRef.getAddress().getValue());
> EndpointReferenceUtils.setAddress(endpointRef,
> "http://localhost:8080/Changed");
>
>
> But, when the client emits an operation, the messages are still sent
> to the original address, and not to
> the one that I set manually.
> The client is implemented by a set of classes generated by the
> codegen-cxf-plugin.
> What am I missing?
>
> Thanks a lot,
> valerio
>
> --
> http://www.linkedin.com/in/vschiavoni
> http://jroller.com/vschiavoni
>
--
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni