Trying again.  Does anybody know how a client app can get the address URL of 
the <jaxws:client> being used?

Thanks,

b. 
-----Original Message-----
From: Bruno Melloni [mailto:bruno.mell...@chickasaw.net] 
Sent: Tuesday, August 18, 2009 9:05 AM
To: users@cxf.apache.org
Subject: Accessing <jaxws:client> address in application.

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.

Reply via email to