axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "keith chapman" <>
Subject Re: REST over GET support in Java clients?
Date Mon, 16 Apr 2007 11:21:40 GMT
Hi Philipp,

I guess the parameter ENABLE_REST_THROUGH_GET is not used anymore. Yes Axis2
supports REST. BTW which version are you using?

The following applies if you are using the nightlies or the 1.2 Release

Hope I answered your question...

See comments inline

On 4/16/07, Philipp Leitner <> wrote:
> Hi folks,
> I am wondering if there is support for REST over HTTP GET for Java
> clients in Axis2?
> I know that there is the configuration parameter
> Constants.Configuration.ENABLE_REST_THROUGH_GET , but so far I  could
> not make it work.
> I tried something like
> <snip>
> Options options = new Options();
> options.setTo(new EndpointReference(toEpr));

// Not really needed but better have it as it takes care of setting up
default REST rules in case you miss something

>     Constants.VALUE_TRUE);

 // Not needed

>     Constants.VALUE_TRUE);

// Need to add the following bit of code

// The following will set the httpMethod to use (Supported methods are GET,

// Set the relavant contentType (Need to set the messagetype as well as its
needed by the messageFormatters)
// Supported contentTypes are  "application/x-www-form-urlencoded",
"multipart/form-data" and "application/xml";

ServiceClient sender = new ServiceClient();
> sender.setOptions(options);
> OMElement result = sender.sendReceive(
>     OMAbstractFactory.getOMFactory().createOMElement("dummy", null));
> </snip>
> so far. I figure that the "payload" of an GET request should be null or
> something irrelevant, given that a GET request does not have a body to
> contain any payload?
> A quick check with tcpmon showed me that this code actually works, but
> still (although I enabled
> Constants.Configuration.ENABLE_REST_THROUGH_GET) uses HTTP POST for the
> request.
> Can anybody tell me how I enable REST GET in the client (or if it is
> even supported) ?
> regards,
> philipp
> --
> Philipp Wolfgang Leitner, Bakk.rer.soc.oec.
> 0225511
> Vienna University of Technology
> " A programmer is a person who passes as an exacting expert on the basis
> of
> being able to turn out, after innumerable punching, an infinite series of
> incomprehensible answers calculated with micrometric precisions from vague
> assumptions based on debatable figures taken from inconclusive documents
> and carried out on instruments of problematical accuracy by persons of
> dubious reliability and questionable mentality for the avowed purpose of
> annoying and confounding a hopelessly defenseless department that was
> unfortunate enough to ask for the information in the first place.
>                  -- IEEE Grid newsmagazine "
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.

View raw message