Most likely, you would need to do:

Client client = ClientProxy.getClient(proxy);
client.getEndpoint().getEndpointInfo().getAddress();

That should retrieve the address that is being used.  


Dan



On Tue August 18 2009 10:05:05 am Bruno Melloni wrote:
> If an application declares a client in the context like:
>
> <jaxws:client address="http://myHost:8080/MyWebSvcApp/MySvc"; 
> serviceClass="myPackage.MyInterface" />
>
> In the application Java code I get an object of type MyInterface with the
> methods I want to call.  Easy. Love it.
>
> I have an application that for failover uses
>
>     <property name="emailClients">
>       <list>
>   <jaxws:client address="http://myHost1:8080/MyWebSvcApp/MySvc"; 
> serviceClass="myPackage.MyInterface" /> <jaxws:client
> address="http://myHost2:8080/MyWebSvcApp/MySvc"; 
> serviceClass="myPackage.MyInterface" /> <jaxws:client
> address="http://myHost3:8080/MyWebSvcApp/MySvc"; 
> serviceClass="myPackage.MyInterface" /> </list>
>     </property>
>
> Works like a charm... it gives me a List<MyInterface> and if one call
> fails, my code fails over to the next object on the list to retry the call.
>
> But for logging/audit purposes I need to track which address was called.
> The address is not exposed as part of the MyInterface client object.  How
> do I get it?  Is there a way to cast the object so that the service URL
> address is exposed?
>
> Thank you.

-- 
Daniel Kulp
dk...@apache.org
http://www.dankulp.com/blog

Reply via email to