Re: How can I deploy a ReSTlet based web service to apache tomcat?

2011-10-12 Thread Thierry Boileau
Hello,

you can find some documentation from the servlet extension page :
http://wiki.restlet.org/docs_2.1/81-restlet.html.
Actually, this is explained in the javadocs of the ServerServlet class :
http://www.restlet.org/documentation/2.1/jee/ext/org/restlet/ext/servlet/ServerServlet.html
.

You need to design your application (based on the Application class), as if
it was not hosted in a servlet container, then plug the application to a
dedicated servlet (ServerServlet) using the web.xml configuration as
explained in the javadocs.

If you need a sample code, you can check the GAE/GWT project taken from the
first application source code :
http://wiki.restlet.org/docs_2.1/303-restlet.html

Best regard,
Thierry Boileau



I was wondering how can I deploy ReSTlet to Apache Tomcat or any other
 server for that matter
 I am using maven as my build system.

 Any suggestions will be helpful, I did not find any documentation about
 deployment on RESTlet wiki, if I figure it out, I would be more than happy
 to write about it.

 Thanks

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2853806

Re: Re: [Restlet POC] Response Entity NULL

2011-10-12 Thread Thierry Boileau
Hello Christie,

could you provide a reproductible sample test case (eclipse project)?

Best regards,
Thierry Boileau


I am also having the same issue.  My setup has Restlet 2.1 RC1 J2SE edition
 on the backend and using Restlet 2.1 RC1 GWT on the frontend.  Parameter
 objects gets passed to the backend OK, but the onSuccess of
 ResultSomeClass on the GTW side is always null.


 ..


 OnClick method of the GWT frontend


 public void
 onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {
  if (dynamicFormLogin.validate()) {

AccountOrmRep repCredential = new AccountOrmRep();

  
 repCredential.setEmail(dynamicFormLogin.getValueAsString(AccountOrmRep.EMAIL));

  
 repCredential.setPassword(dynamicFormLogin.getValueAsString(AccountOrmRep.PASSWORD));

Client.login(repCredential, new ResultAccountOrmRep() {

  @Override
  public void onFailure(Throwable caught)
  {
txtLoginError.setValue(Login Error);

  }

  @Override
  public void onSuccess(AccountOrmRep accnt)
  {

// accnt is alway null, but it should not be null.
m_actMain.onLogin(accnt);

  }

});

  }
}
  });



 public class Client
 {
 public static void login(AccountOrmRep cred, ResultAccountOrmRep
 callback)
  {
LoginResource res = GWT.create(LoginResource.class);

ClientResource cr = res.getClientResource();

cr.setReference(/api/login);

res.update(cred, callback);
  }
 }

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2851326


--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2853813

Re: Issue in 2.1.m7 with SSL Client Connections

2011-10-12 Thread Thierry Boileau
Hello Alex,

I've entered an issue for tracking this bug :
http://restlet.tigris.org/issues/show_bug.cgi?id=1338.
We're quite busy but will have a look at this preoccupating error.

Best regards,
Thierry Boileau

On Tue, Sep 27, 2011 at 5:36 AM, Alex Milowski ale...@milowski.org wrote:
  Yet  even more information:
 
  On a whim, I switched back to creating a new Client and not using the
  Client returned by getContext().getClientDispatcher().  I call stop()
  when I am finished and now everything works fine.
 
  So, here's the state of play:
 
Client client = getContext().getClientDispatcher();
...same code...
 
  results in some kind of hang where the number of available clients or
  sockets is somehow depleted.
 

 No comments on this?  Feels like a bug to me...

 --Alex Milowski

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2853541


--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2853818

client side gzip decoding

2011-10-12 Thread Arjohn Kampman
Hi all,

I'm trying to enable gzip decoding on the client using restlet 2.1-RC1
with the default http connectors. I've tried several things, but none of
them worked. The javadoc suggests that the DecoderService can take care
of this, but how do I use this in combination with a ClientResource?

Things that I've tried so far:

- Creating an Application with DecoderService enabled and setting this
   on the resource. This return the uncompressed data.

- Creating a ClientResource -- Decoder -- Client chain. This returns a
   null value for Representation.getText().

- (to verify the procedure:) Wrapping the response's stream in a
   GZIPInputStream. This works, but I'd rather let the framework take
   care of this.

Any suggestions?

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2853899


Re: Issue in 2.1.m7 with SSL Client Connections

2011-10-12 Thread Alex Milowski
On Wed, Oct 12, 2011 at 1:05 AM, Thierry Boileau
thierry.boil...@noelios.com wrote:
 Hello Alex,

 I've entered an issue for tracking this bug :
 http://restlet.tigris.org/issues/show_bug.cgi?id=1338.
 We're quite busy but will have a look at this preoccupating error.

Thanks.  I have a test case that I'll attach.

--Alex Milowski

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2853937


RE: Re: How can I deploy a ReSTlet based web service to apache tomcat?

2011-10-12 Thread utkarsh
Thanks for the update, I will try it out and let you know if it worked.

Btw, you first link is broken: http://wiki.restlet.org/docs_2.1/81-restlet.html.

Thanks

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2853989