wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laurent bernabe <laurent.bern...@gmail.com>
Subject Re: I don't manage to update my remote resource.
Date Wed, 26 Feb 2014 17:52:14 GMT
Hello,

Thank you for your answer.

Is there a simple way to turn a resource into a singleton ? Also, is the
fact of adding state to a resource (like what I want to do) in the spirit
of REST or should I consider Jax-ws instead ?

Apologizing if the question can be too obvious : I am learning web services
and I am taking account all possibilities that are offered to me.

Thanks in advance.

Regards.


2014-02-26 17:44 GMT+01:00 Antonio Alves <nioto.org@gmail.com>:

> Hi,
>
> Maybe it's because Resource class are not ( unlike servlet class )
> singleton class. Wink creates an instance of the Resource for each request.
>
>
>
> On Tue, Feb 25, 2014 at 12:41 PM, laurent bernabe <
> laurent.bernabe@gmail.com> wrote:
>
>> Hello everyone,
>>
>> As I am learning REST development in Java and with Apache Wink, I am
>> implementing a very simple HelloNickName server/client.
>>
>> I am using Eclipse Kepler 4.3 and Tomcat 6 (under Ubuntu 64 bits 13.10).
>> I managed to create a localhost server inside Tomcat 6 with Wink library.
>> I've joined the web.xml, HelloApplication.java and HelloResource.java for
>> the server side.
>> HelloResource has a GET and a PUT method.
>>
>> But there is the problem I am facing :
>> I've written a tiny client (HelloNicknameClient) class in javase 7 in
>> order to test the GET/PUT methods.
>> What I was expecting is that the final String (result2) give me "Hello
>> Laurent !", but it is still "Hello World !" as result1 String.
>>
>> What's wrong with my understanding of RESTful applications ? Should I
>> change a kind of configuration in my server side ? And if yes, which one ?
>>
>> Regards
>>
>
>

Mime
View raw message