package restUserAPI;

import javax.ejb.Stateless;
import javax.ws.rs.Path;

@Stateless
@Path("user")
public class UserService {

}

@@ -15,16 +15,38 @@
 erAPI;%0A%0A
+import javax.ejb.EJB;%0A
 import j
@@ -88,66 +88,571 @@
 .rs.
-Path;%0A%0A@Stateless%0A@Path(%22user%22)%0Apublic class UserService %7B
+FormParam;%0Aimport javax.ws.rs.GET;%0Aimport javax.ws.rs.Path;%0Aimport javax.ws.rs.Produces;%0Aimport javax.ws.rs.core.MediaType;%0A%0Aimport beans.ChatMessagesLocal;%0A%0A@Stateless%0A@Path(%22user%22)%0Apublic class UserService %7B%0A    %0A    @EJB%0A    private ChatMessagesLocal chatMessages;%0A    %0A    @GET%0A    @Path(%22/register%22)%0A    @Produces(MediaType.TEXT_PLAIN)%0A    public String registerUser(@FormParam(%22username%22) String username, @FormParam(%22password%22) String password)%7B%0A        chatMessages.registerMessage(username, password, %22address%22, %22alias%22);%0A        return %22Success!%22;%0A    %7D
 %0A%0A%7D%0A

Create UserService for ChatApp