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.