On Thursday 03 May 2007 21:42, Steven E. Harris wrote:
> Daniel Kulp <[EMAIL PROTECTED]> writes:
> > This is part of the JAX-WS spec.   You can override the URL that a
> > client uses by setting the BindingProvider.ENDPOINT_ADDRESS_URL
> > property on the request context:
> >
> > ((BindingProvider)port).getRequestContext().put(
> >     BindingProvider.ENDPOINT_ADDRESS_PROPERY,
> >     "http://foo.com/blah";);
>
> I found a similar recipe on one of Sun's blogger's sites last night,
> and I'm still thinking, "Are they serious?" There's a cast, a method
> call to get a map of strings, and, as some icing, a manifest constant
> to designate which string means "target address".
>
> I'm sure it works, but it's crying out for some convenience wrappers
> to hide this "map of strings" underbelly. Is the problem that some
> ports don't have meaningful addresses? What else precludes exposing
>
>   port.setTargetAddress(URI)
>
> or similar?

The port only represents the operations defined in the WSDL.    What 
happens if your wsdl has a setTargetAddress operation?   

CORBA kind of got around that issue by allowing method names starting 
with "_" for vendor stuff.   But that always smelled like a hack as 
well. 


-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to