How to write Java RESTful Based Axis2 Web Service - java

I was reading a lot of information on the Internet, I promise, but I didn't find any post or tutorial in which appears How to write Java RESTful Based Axis2 Web Service
I don't know if this task has sense, because I have only read about RESTful Web Services or Web Services based on Axis2. It could be I have mixing differents ideas about how to develop Web Services and so, I need help. What can I do?
Where can I learn how to develop a RESTful Web Service based on Axis2?

You can't write a RESTful Web Service using Axis2. Axis2 is suited for SOAP web services.
For RESTful Web Services you have to use some other framework like Jersey
Edit: it seems you can indeed write a REST WS using Axis2 (yet Axis2 is mostly used for SOAP services).

Related

Call SOAP web services from a play framework (2.2.4) application

I am working on a web application developed using Play framework 2.2.4(Java) and now I need to call some SOAP web services from within my web application.
I am new to Play framework and web services and I am confused on how to do it.
So far I have only managed to used the WSDL for the SOAP services to generate the java classes using wsimport.
I came across the WS API of the play framework to asynchronously call the web services and I have the following doubts.
How can I call these SOAP services using the WS API of the play framework?
In play framework, is it necessary to use this WS API to make a web service client, or can it be done using other ways?
It would be really helpful if someone can share a small tutorial to do this.

Why JAX-WS is called a frontend

Why is JAX-WS described as one of the frontends for Apache CXF?
http://cxf.apache.org/docs/frontends.html
I only understand JAX-WS to be an Java api for creating web services.
In this case, frontend is not a GUI frontend rather the frontend that exposes JAVA APIs as a web service (hence, frontend). As described in the link you mentioned, there are different "frontend"(s) or rather modes of exposing and/or consuming the webservices you develop. JAX-WS is for SOAP, JAX-RS for REST and JavaScript services/client.

Difference Between RestAPI and Restful webservices

I am new to web-services. Could someone help me in understanding the difference between REST API and a Restful web-service in java. I have developed a web-application which is based on only servlets and jsp. Now the same application has to be developed using REST API. What is the difference between developing a web app with just servlets and jsp and developing a webapp with REST API. Can someone provide links to good tutorials where I can learn more about REST API with samples.
A RESTful web API (also called a RESTful web service) is a web API implemented using HTTP and REST principles. It is a collection of resources
Reference : http://en.wikipedia.org/wiki/Representational_state_transfer
Sometimes, some organization might show little difference, Between REST API and Restful web services.
For eg, Rest API might be common for everyone to use the data with same endpoint.
Restful web services may comes with custom modification for specific requirement and endpoint will be different.

Java web service

I am new to web services and below I am sharing my understanding so far by reading on net:
Apache Axis and Apache CXF - are web services frameworks used to develop Java web services.
JAX-RS - Java API to develop Restful web services.
JAX-WS - Java API to develop SOAP web services.
Is the above correct? Or if you want to add something to it.
In my project, I am going to use web services with Spring framework.I am told that project will have both SOAP and RESTful web services.I am very much new to this.
Can somebody please guide me in this regard by sharing some valuable information or any good link which will make me understand better?
Your statements are correct, but it's not clear whether you've understood one crucial fact: CXF and Axis are both implementations of the JAX-WS standard. CXF additionally implements JAX-RS, and there are some libraries that only implement JAX-RS, such as Jersey (Oracle's reference implementation) and RESTEasy from JBoss.
For your project, the big question is whether you will only consume those webservices, or also publish them. If you need to publish a webservice, you'll have to include the entire implementation library and learn to use it. If you only consume the services, you'll just need some generated client and data binding classes.
Another question is whether your RESTful services will talk XML or JSON (SOAP always uses XML), as you'll need a parser or binding framework for JSON (JAX-B for XML is included in recent JDKs).

java web app calling a web service client (in cxf)

I need a very performant and scalable solution to calling web services from java webapp.
Could someone please suggest the best options for calling webservices from java webapp?
Much appreciated
If you are using a restful web service, there are a lot of client libraries which you can choose. Eg. RestEasy Client, Jersey Client,....

Categories