users@jersey.java.net

Question about clients

From: Roan Brasil Monteiro <roanbrasil_at_gmail.com>
Date: Mon, 28 Sep 2009 13:02:10 -0300

I have two question, I would like to know how if I make a client using PHP
or Java how can I send on the request body a XML file to my Resource Rest
Class get the params?
For example :

@POST
public Response addUser(User user){
   user = userService.add(user);
   return Response.ok(user).build;
}


User Class

@XmlRootElement
public class User{
private String codUser;
private String name;
private String login;

/* setters and getter */
}

My question is if I have this situation how can I receive from the client a
XML that is mapped to User class? how should be my Java client for example?
Should I know the xml format that is defined on User Class?

Another question if I need to look for the user and I need a array of param
using get?
for example:

@GET
@Path({param1, param2}) or @Path({param1}/{param2})
//this param are like ages for example 22 and 24 or if i need to use 10
param
public Response searchUser(r){
   .
   .
   ....
}

-- 
Atenciosamente,
Roan Brasil Monteiro
http://roanbrasil.wordpress.com/