cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Diephouse" <>
Subject Re: Question on the simple frontend
Date Mon, 02 Apr 2007 04:13:58 GMT
On 4/1/07, Glynn, Eoghan <> wrote:
> Folks,
> We're light on system tests and/or samples for the simple frontend, so
> here's a dumb question that may well have an obvious answer.

There are a whole hosts of tests in the aegis module that use the simple
frontend. Although they still probably wouldn't explain the answer to your
question :-)

Is it possible to use the ClientProxyFactoryBean to create a client for
> *any* suitable endpoint associated with the target service?
> From a cursory look at the code, it seems the options are either to use
> the fallback value of ServiceName+"Port", or to specify an explicit
> endpoint name via
> ClientProxyFactoryBean.getClientFactoryBean().setEndpointName().
> But is there an analogue for the JAX-WS Service.getPort(Class<T> sei)
> method, i.e. to retrieve a proxy for any suitable endpoint? [as opposed
> to a *specific* endpoint]

AFAIK getPort(Class<T> sei) doesn't choose a proxy thats suitable for any
endpoint, it chooses a specific binding. From the javadoc:

The parameter serviceEndpointInterface specifies the service endpoint
interface that is supported by the returned proxy. In the implementation of
this method, the JAX-WS runtime system takes the responsibility of selecting
a protocol binding (and a port) and configuring the proxy accordingly. The
returned proxy should not be reconfigured by the client.

In our implementation we seem to detect the appropriate port by selecting
either the only endpoint, or the endpoint which matches the @WebService
annotation on the SEI interface. I'm not 100% sure thats correct - is
portName even allowed on the SEI? I thought it went on the impl class. If
so, maybe a better thing to do would be to find the first HTTP/SOAP endpoint
it comes across.

So in answer to your question, no, the simple frontend does not have that.
ClientImpl does have autodetection code to select the first SOAP/HTTP
binding if you pass it a URL though. This should definitely be added to the
ClientProxyFactoryBean though so all the user needs to do is pass in a WSDL
and an interface to it.

- Dan
Dan Diephouse
Envoi Solutions |

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message