cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Are you interested with JAXWSDeployer for CXF to scan classes and publish with lazy mode classes with @WebService?
Date Wed, 01 Jun 2011 14:49:12 GMT

We'd definitely be interested in such a thing.   We have a similar thing for 
Spring that scans the beans in the context for the annotation, but I don't 
think it's used much.

The main "downside" with the auto deployer things is the lack of control of 
basic things like the URL that is used.   If you provide one, it may be good 
to optionally be able to configure in a URL mapper of some sort.   Default 
behavior is fine most of the time, but having some level of configuration is 
better.  :-)

Dan



On Wednesday, May 25, 2011 2:07:05 PM Angelo zerr wrote:
> Hi CXF Team,
> 
> At first I would like congratulate you because I'm very impressive with CXF
> 
> : powerfull and very simple!. Indeed I have tried to use Axis2 with JAX-WS
> 
> and I have take a very long time to have success with WebServices and there
> is a lot of bug with JAXWSDeployer -(
> 
> With CXF my whole tests are sucessfull.
> 
> I write you because I'm using CXF without Spring, so I do like this in my
> WEB Application  :
> 
> --------------------
> Object implementor = new MyService();
> String address = "myservice";
> Endpoint.publish(address, implementor);
> --------------------
> 
> It works great, but I'm lazy developer and I think it should be cool if we
> have a JAXWSDeployer like Axis2 which is enable to scan classes from JAR
> and WEB-INF/classes and deploy classes as WebService, if scanned class has
> the @WebService or @WebServiceProvider.
> I have not found this feature in the CXF documentation and I tell me if you
> will be interested with this feature that I could develop and contribute to
> CXF project.
> 
> My idea is to declare a Servlet in the web.xml like this :
> 
> --------------------
> <servlet>
>         <description>Apache CXF JAX-WS Deployer</description>
>         <servlet-name>jaxwsdeployer</servlet-name>
>         <servlet-class>org.apache.cxf.jaxws.JAXWSDeployer</servlet-class>
>         <load-on-startup>2</load-on-startup>
> </servlet>
> --------------------
> 
> which is loaded after the CXFNonSpringServlet. This servlet works with a
> jaxws-deployers.xml which could looks like this :
> 
> --------------------
> <jaxws-deployers>
>    <jaxws-deployer source="/WEB-INF/classes" packages="sample.ws.*"/>
>    <jaxws-deployer source="/WEB-INF/lib/myservices.jar"
> packages="sample2.ws.*"/>
> </jaxws-deployers>
> --------------------
> 
> This configuration will scan :
> 
> 1) classes from packages sample.ws.* of the WEB-INF/classes folder, load
> class and search if it find @WebService or @WebServiceProvider. In this
> case, the following code could be executed :
> 
> --------------------
> Object implementor = new MyService();
> String address = "myservice";
> Endpoint.publish(address, implementor);
> --------------------
> 
> 2) classes from the sample2.ws.* packages of the
> /WEB-INF/lib/myservices.jar JAR.
> 
> This descriptor could be improved too to manage variable path like :
> 
> <jaxws-deployer source="$work/classes" packages="sample.ws.*"/>
> 
> where $temp is the custom value.
> 
> ClassLoader provider could be setted in the configuration.
> <jaxws-deployer source="$work/classes" packages="sample.ws.*"
> class-loader-provider="MyClassLoaderProvider"/>
> 
> I don't know if I have good explained my idea, but my question is are you
> interested with this feature?
> 
> Perhaps JAXWSDeployer -like already exists but I have not found
> documentation about that.
> If you are interested, don't hesitate to tell me.
> 
> Thank a lot for your answer.
> 
> Regards Angelo

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Mime
View raw message