Alternative to web services in Java

I have this external module of my system and I decided to integrate it with web services. So I wrote the server using annotations (so far so good), and then I used Eclipse (the new client web service wizard) to generate the template code for the client. The result is an ugly bunch of code, far from being customizable, painful for testing and modification. I am looking for a simple API, I do not need attachments, complex data types, complex asynchronous behavior. So:

  • Are there any other tools for a better job?
  • Are there different methods for writing webservices clients (e.g. annotations)?
  • Should I use a different way to integrate my external components (like REST)? Any suggestions on where to start, in this case?

Waiting for your advice.

+4
source share
8 answers

I agree with Patrick, Spring 3 has a RESTServiceTemplate and WebServiceTemplate, which is very easy to code and configure interaction with remote web services - it will even make un / marshalling xml in beans easy. In my company, we had great success with both of them.

To get started:

http://static.springsource.org/spring-ws/sites/1.5/reference/html/client.html

http://blog.springsource.com/2009/03/27/rest-in-spring-3-resttemplate/

NTN

+5
source

Both downloads have sample ant build files for creating client jar files.

+2
source

I would suggest looking at REST. There are many frameworks with support for relaxation. For example, spring3 has pretty neat REST support, which is not very intrusive. You can get very quick results when using spring anyway.

+2
source

I used Apache CXF before and found it very nice and easy to use.

http://cxf.apache.org/

+1
source

Have you looked in Apache Axis?

Here is a tutorial on creating a web service with it. It can help you.

Build a Bottom Up web service through Apache Axis2

+1
source

If you use (o plan to use) a seam, there is a simple HTTP REST implementation:

RESTful HTTP web services with RESTEasy

+1
source

I can recommend JAX-RS (Java API for RESTful Web Services, JSR-311 ) and Jersey . You will receive a fast RESTful web service in no time.

Check out the Jersey Getting Started Guide .

+1
source

Source: https://habr.com/ru/post/1303099/


All Articles