axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denise Wu <wadie...@gmail.com>
Subject Re: RESTful webservice and session management
Date Wed, 18 May 2011 16:08:12 GMT
>> Please go and have a look if REST supports WS Addressing!

Well according to axis2 developers it does, there is even an example
in the axis2 distribution under
\axis2-1.5.4\samples\userguide\src\userguide\clients\RESTClient.java
  with the following lines of code:

        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
        options.setProperty(Constants.Configuration.ENABLE_REST,
Constants.VALUE_TRUE);

        ServiceClient sender = new ServiceClient();
        sender.engageModule(Constants.MODULE_ADDRESSING);
        sender.setOptions(options);

But no use of '.setManageSession(true)' in the code. It's not clear
for what purpose the addressing module is used in the sample.

Also, if session management is not supported anyway with REST in
axis2, how to maintain state info in REStful webservices?

Thanks




On Wed, May 18, 2011 at 1:54 PM, Stadelmann Josef
<josef.stadelmann@axa-winterthur.ch> wrote:
> Please go and have a look if REST supports WS Addressing!
> I think REST was developed with the idea of a pritty small
> SOAP XML Protocoll and hence every thing adding to it is against REST.
> Josef
> -sombody more known-to-the-subject to comment please.
>
>
> -----Ursprüngliche Nachricht-----
> Von: Denise Wu [mailto:wadienil@gmail.com]
> Gesendet: Dienstag, 17. Mai 2011 17:47
> An: java-user@axis.apache.org; java-dev@axis.apache.org
> Betreff: RESTful webservice and session management
>
> Hi,
>
> I created a webservice and enabled session management on both server
> and client. It works FINE until  I enable REST on the client by adding
> the 3rd line of code in the serviceStub.java on the client side.
> Session management stopped working.
>
> // added session management
> _serviceClient.getOptions().setManageSession(true);
> _serviceClient.engageModule("addressing");
>
>  // Enable REST
> _serviceClient.getOptions().setProperty(Constants.Configuration.ENABLE_REST,
> Constants.VALUE_TRUE);
>
>
> Is there any incompatibility between REST and session management in axis2?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>



-- 
Wadienil.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message