What technology should I use to develop a small Java web service?

Basically I need a webservice where the client can request an id with a boolean value from our web service. Which technology would be most suitable for this small API? Of course, it is possible that there will be more functions for the interface, but now we need only one function. It must also have authentication so that only remote clients can access the service. And each client has different authentication credentials.

What would be good technology for this purpose?

+3
source share
8 answers

resteasy -, ... -.

JAX-RS. .

+2

JAX-WS + (Tomcat - )

@WebService(targetNamespace = "http://affinity.foo.com", name="RewardsStatus")
@SOAPBinding(style=SOAPBinding.Style.RPC, use=SOAPBinding.Use.LITERAL)
public interface RewardsStatusIF {
    @WebMethod(operationName="GetLastNotificationDate", action="urn:GetLastNotificationDate")
    @WebResult(name="return")
    public Date getLastNotificationDate() throws AffinityException;
...

. JAX-WS Java-. ( ), .

+1
0

, "Java", Jetty. -. , .

0

Java 6, HTTP Server, Http. , . ,

com.sun.net.httpserver

0

- SOAP JAX-WS JAX-RS ( - RESTful).

0

, , URL- HTTP , , Restlet (http://www.restlet.org/), -, , "-" - ( RESTful) Java.

0
source

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


All Articles