Re: JAX-WS supports both static and dynamic clients
On Sat, 25 Sep 2010, Lew wrote:
Lew wrote:
I think it's a bad term.
[ SNIP ]
Arved Sandstrom wrote:
They are real terms - the *static* client approach is the dynamic proxy (go
figure), where you have an SEI (top-down or bottom-up, starting with
existing WSDL or not). This is considered to be high-level. The low-level
*dynamic* client approach is to use the Dispatch API directly and dispense
with generated artifacts.
Thanks.
It's basically like the Dynamic Invocation Interface from CORBA all over
again. Only done wrong, i'm sure.
I suppose the analogue in java itself is to normal method calls (static)
and reflective ones (dynamic). Given:
String a, b;
Comparator<String> c;
You can do:
int d = c.compare(a, b);
Or you can do something like (i'm going from memory here):
Method m = c.getClass().getMethod("compare", String.class, String.class);
int d = (Integer)m.invoke(c, a, b);
The point being that you could drive the latter from metadata
descriptions, without ever having to write code which really knows about
the Comparable interface.
Cases where you need dynamic invocation at the programmer level are pretty
rare. The example that springs to mind is when writing something like
SoapUI:
http://www.soapui.org/
tom
--
If this is your first night, you have to fight.