On Monday 11 October 2010 7:55:39 am Benson Margulies wrote:
> What do people think of enabling
>
> JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
> factory.setDataBinding(new AegisDatabinding());
> // perhaps not needed given the endpointInterface annotation
> factory.setServiceClass(DocumentDatabase.class);
> factory.setAddress(serviceUrl);
> return (DocumentDatabase) factory.create();
>
> to change to
>
> return factory.create(DocumentDatabase.class);
>
> by way of a quick <T> on the method?
I like the idea. Would it be something like:
<T> T create(Class<T> cls) {
this.setServiceClass(cls);
return cls.cast(create());
}
so you can then avoid the setServiceClass(..) call as well?
--
Daniel Kulp
[email protected]
http://dankulp.com/blog