Hello to everyone!
I'm new of spring and WS.... and the forum!
I'm trying to understand what are the difference.
I tried to search in the forum but i don't found.
There is someone that can help me to understand?
Thank you very much.
Enrico
Hello to everyone!
I'm new of spring and WS.... and the forum!
I'm trying to understand what are the difference.
I tried to search in the forum but i don't found.
There is someone that can help me to understand?
Thank you very much.
Enrico
Hi,
JAX-WS and Spring-WS has a little bit different approach.
In JAX-WS you write your service first and WSDL will be generated later automatically. At first it may seam that it is very fast way of developing web services, but it occures that it may lead you into some problems in the future.
Spring-WS team claims that you should first concentrate on WSDL and XML data format (contract) that web service would use and that implementation is not so important at the start.
Spring WS documentation has a good explanation of this topic: http://static.springsource.org/sprin...act-first.html
It did convinced me to "contract first" solutions and I guess it is worth reading. I guess you will find an answer to your question there.
That's completely false. JAX-WS has very good support for WSDL first scenarios as well. Both major implementations (the JAX-WS RI and CXF) both have tools that take WSDL and generate Java interfaces and objects to represent the service. Things like policies and end point addresses and such can be used directly from the WSDL, etc...
Many JAX-WS developers would tell you the same thing. Contract first is just as important with JAX-WS.
That's not completely true. While JAX-WS does support very good "java first" use cases, it also supports WSDL first use cases. Starting from WSDL and producing a service is a requirement for JAX-WS compliance. Thus, if you want to do contract first development, JAX-WS is a good fit as well. The major JAX-WS runtimes all provide tools for mapping a WSDL into JAX-WS service artifacts (if you are using Java 6, it's even built into the jdk). The JAX-WS runtimes will also use the WSDL for policies and endpoint URL's and such. WSDL/contract first works quite well for JAX-WS.
That is all great advice. Many JAX-WS users would recommend doing contract first development as well.
The main difference is that JAX-WS more or less dictates that the schema parts of the contract gets mapped to JAXB types (or generic XML Source if using Provider interfaces). That may or may not be the "best fit" for what you are trying to acheive or the skill sets of your team. Spring does provide a lot more flexibility there providing options for Castor/JIBX/XmlBeans/etc.... The CXF JAX-WS runtime does provide XmlBeans (and SDO on trunk), but it definitely is more geared toward JAXB and going XmlBeans puts you outside the JAX-WS spec anyway.
Also, Spring allows just "schema" for your contract and will produce the wsdl around it. JAX-WS doesn't really support that. For JAX-WS, you would need the full WSDL contract.
Thanks for correcting me. It looks I was not aware of some JAX-WS features.
Sorry for confusion.
Please look into the following link
http://www.ibm.com/developerworks/we...ws-jax-pdf.pdf