ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | celtix List | July 2006 Index

<--  Date Index  --> <--  Thread Index  -->

Programmaticly changing endpoint address

Title: Programmaticly changing endpoint address

I'm not sure if this should be reported as a bug - it seems to me that it is doing what it is designed to do, even though it causes my problems.

I have a monitoring service which recieves a messages, adds a bit of data to it and then passes it on to a storage service.

The problem is that my monitoring service creates a proxy for my storage service when it is constructed, and programmatically changes the endpoint address. When I receive a message it uses the proxy to pass on the message but it sends it to the endpoint address in the WSDL file, not the one I set in code.

I understand this is because the code to change the endpoint address doesn't actually change it, it just sets a 'flag' to tell the next proxy call to change its address before sending. And this doesn't work because the the call is on a different thread to the one that set the 'flag'.

The code I'm using to change the endpoint address is as follows -

            Map<String, Object> requestContext = ((BindingProvider) channelStore).getRequestContext();           
            requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, channelStoreUrl);

Having to put this code before each call to the proxy is horrible.

Is there a better way ?

Richard Shaw


Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: richard.shaw@xxxxxxxxxxxxxxxx


This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.

<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.