users@jersey.java.net

Invoking other Jersey services

From: Jon Stritar <jstritar_at_reloadnyc.com>
Date: Wed, 27 May 2009 15:53:18 -0400

Hey,

We are developing a bunch of services using Jersey. How would you
recommend handling runtime parameters like the location of other
services? For example, in production I can just invoke the live services
via their well known URLs, but if I'm developing locally I'd want to run
my dependencies locally and invoke those. Are there any best practices
for dealing with these runtime configurations or for routing messages
between Jersey services? I'd want to have something where its easy to
check projects out from scm and where tests can use the same runtime
configurations.


Also, one more quick question. Any ideas on why @FormParam isn't
grabbing the arguments for us... they are always null:

@Path("posttest") @POST @Consumes("application/x-www-form-urlencoded")
public Response testPost(
    @FormParam("username") String username,
    @FormParam("password") String password) {

    LOGGER.info("Username= "+username+" and password="+password);
}

I'm testing this with curl:

curl -d username=jon -d password=secret "http://....."


-- 
Jon Stritar
World Evolved Services, LLC
The information contained in this communication may be confidential, is
intended only for the use of the recipient named above, and may be
legally privileged. If the reader of this message is not the intended
recipient, please note that any dissemination, distribution, or copying
of this communication, or any of its contents, is strictly prohibited.
If you have received this communication in error, please re-send this
communication to the sender and delete the original message and any copy
of it from your computer system.