I have to implement SOAP based web services for a project. We are considering different options like axis2, ejb as a web service, jax-ws but not really sure about the advantages/drawbacks of these options. Can someone please help in this regard.
It would be great if someone can point to any other alternatives for implementing SOAP based webservices.
Thanks in advance,
-Csn
For me, the easiest way to expose a web service is creating an EJB with annotations (JAX-WS) if you are using a Java EE server like JBoss.
Consuming a WS is a bit different but I prefer JAX-WS too, because Axis2 throw exceptions if you use complex parameters (classes) and you add an attribute. JAX-WS instead calls every 'get' and 'set' for the serialized xml. If no 'set' is implemented, no problem.
That's an advantage for backward compatibility.
I would highly recommend to use Apache CXF for developing SOAP web services. This stack is based on JAX-WS but has much more features. CXF has an excellent integration with Spring. There are a lot of documentation on the internet how to create web services using this framework. If I would be working on completely new web service I would definitely choose Apache CXF.
Related
i am new to camel?
i am not able to distinguish between camel web-service component
so please help me to find out difference between those component
and also suggest that in which situation which component is better to use.
Thanks in advance.
Camel SOAP is not a component but a data format http://camel.apache.org/soap.html it's used for marshaling and unmarshaling SOAP payloads.
Spring-WS http://camel.apache.org/spring-web-services.html uses Spring Web Services to provide client and server side SOAP support.
Camel-CXF http://camel.apache.org/cxf.html uses Apache CXF to provide client and server side SOAP support.
Camel-CXF is my goto tool when I have to deal with SOAP. It's a mature and very full featured component (and underlying library). The only time I use Spring-WS is if I'm dealing with very outdated SOAP that is using RPC encoding which CXF doesn't support.
i am new to REST Service development. I compared the development mechanism for both REST and WS web services and i found that you can create a WS web service using WSDL file that is the top down appraoch (Correct me if i am wrong) and using bottom up approach also, that is generating the classes manually.
But when it comes to REST web service development you have to follow bottom up approach only that is generating the classes manually. NetBeans IDE provides certain wizards for creating REST web service quickly from databases, entity classes and patterns.
I had also seen when you are developing web service in eclipse and you are using wizard in eclipse IDE, you can create a REST web service from WSDL file. I found this very strange. My question here is what are the approaches we can have for creating REST web services. Can we create REST web services using top-down and bottom up approached. If yes then please provide me details.
Thanks.
It is possible to describe a REST service using a contract. This is the intent of WADL and WSDL 2.0. WADL is specifically a REST contract, whereas WSDL 2.0 evolved from the original WSDL spec. to support all HTTP bindings. Since REST services rely on the use of HTTP methods and headers to exchange messages a WSDL 2.0 contract can work. There is a really good explanation here: http://ajaxonomy.com/2008/xml/web-services-part-2-wsdl-and-wadl
For development of REST services, I'm not sure if NetBeans, Eclipse or other tools specifically support automated REST service from WSDL generation. I would imagine that most are still intended for SOAP service creation. At this point I think WSDL 2.0 and WADL can be used to describe a REST service, but are not intended for automated generation of a REST service.
REST services are simple HTTP request/response,and therefore don't require complex stubs. In most cases it would probably take more time to write the WSDL describing the REST service, than it would take to write the REST service itself.
I need to create a web service project that creates some web services and exposes the end points using SOAP and REST. I've done a lot of JAX-RS work but I'm a little light on an JAX-WS implementations. Is there an open sourced technology that implements both?
I would suggest Apache CXF. It is an open source services framework which will allow you to do exactly what you need.
I am developing a soap based middle-tier web service on jboss platform and would like to know, what engine or framework is the most matured or common for Enterprise level ?
So far i was considering:
Axis/Axis2
JbossWS
Thanks for any direction.
I can recommend Apache CXF. Its a kind of meta service framework, also supporting SOAP.
I recommend lookup up some articles on the mainstream frameworks "Axis vs CXF" and select between the two based on your requirements.
I am implementing SOAP web services for a commercial application, and I am using GroovyWS to speed up the development.
But, when I deploy it on Tomcat, I am not using Grails, as the software has it's own J2EE framework, so how I do I get it to react to wsdl requests?
Do I need to write a groovy-based servlet?
Ideally I would like the WSDL generated upon request, so I can easily change the interface and see the change.
It seems I will miss the annotations that JAX-WS provides for, though, to help fine-tune the WSDL.
Using the example web application, the WSDL can be retrieved as follows:
http://localhost:6980/MathService?wsdl