I am looking for an example of posting objects to my jersey ws:
example:
@POST
@Produces( { MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("create")
public PujUserEntity create(PujUserEntity user) {
return userFacade.create(user);
}
so, how do I call this resource using Jersey Client ?
in the samples I found something like this:
ClientResponse response = service.
path("contacts").
path(username).
type(ENTRY_MEDIA_TYPE).
header(AUTHENTICATION_HEADER, authentication).
post(ClientResponse.class, contact.asEntry());
return response.getLocation().toString();