You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Michael <mt...@optonline.net> on 2011/02/21 17:33:44 UTC
CXF and Spring
I just picked up a copy of Spring In Action. In some CXF documentation I have noticed that CXF uses Spring. Can someone provide a quick over view of how CXF uses Spring?
More specifically, after quickly scanning the Spring In Action Table of Contents I noticed that the only web services chapter was "Building contract first web services in Spring". I'm not sure what that means for those who would like to build Java first web services, but does the CXF support for Spring allow both "contract first" and "Java first" web service implementations?
Thanks.
Re: CXF and Spring
Posted by Willem Jiang <wi...@gmail.com>.
On 2/22/11 12:33 AM, Michael wrote:
> I just picked up a copy of Spring In Action. In some CXF documentation I have noticed that CXF uses Spring. Can someone provide a quick over view of how CXF uses Spring?
>
> More specifically, after quickly scanning the Spring In Action Table of Contents I noticed that the only web services chapter was "Building contract first web services in Spring". I'm not sure what that means for those who would like to build Java first web services, but does the CXF support for Spring allow both "contract first" and "Java first" web service implementations?
>
> Thanks.
>
When you talking about the web services contents of the Spring In
Action, you means spring-ws.
CXF does support code first and WSDL first programing module as the same
time, as the Chirstina already answered.
If you are developing an application in the server side, code first
could be a easy way to speed up your development.
If you are working on the client side, WSDL first could be your first
choice :)
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Re: CXF and Spring
Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Michael,
WSDL first as well as java first is possible. Take a look at the
wsdl_first example in the distro. In this example the code for the
service interface and data classes is generated but the config in spring
then only uses the generated classes to build the service. So the same
config works if you code the classes by hand. You only will have to make
sure to set the necessary JAX-WS and JAXB annotations. I think mainly
the @Webservice annotation is mandatory.
If you do java first because you only want remoting between your own
client and server then you may also want to look at the spring
HttpInvoker and HttpExporter and this way avoid
soap alltogether. If on the other hand you want to achieve loose
coupling then you should rather go contract first. Some time ago I wrote
an article how to create contract first style wsdls from java code:
http://www.liquid-reality.de/display/liquid/2008/08/20/Defining+Contract+first+webservices+by+generating+wsdl+from+java
Christian
Am 21.02.2011 17:33, schrieb Michael:
> I just picked up a copy of Spring In Action. In some CXF documentation I have noticed that CXF uses Spring. Can someone provide a quick over view of how CXF uses Spring?
>
> More specifically, after quickly scanning the Spring In Action Table of Contents I noticed that the only web services chapter was "Building contract first web services in Spring". I'm not sure what that means for those who would like to build Java first web services, but does the CXF support for Spring allow both "contract first" and "Java first" web service implementations?
>
> Thanks.
>
--
----
http://www.liquid-reality.de