GWT + Restlet examples?

2008-09-07 Thread Mark Petrovic
Good day. I'm new here, but not new to Java and its supporting technologies. I'm embarking on teaching myself GWT using Restlets, neither of which I have programmed before, although I have read the documentation for each. I know that at the time the Restlet-GWT code was released, a whop

Re: GWT + Restlet examples?

2008-09-07 Thread Mark Petrovic
Now that GWT 1.5 is final and we don't have to chase a moving target any more, it will be easier to stabilize this. - Rob On Sun, Sep 7, 2008 at 10:48 PM, Mark Petrovic <[EMAIL PROTECTED]> wrote: Good day. I'm new here, but not new to Java and its supporting technologie

Re: GWT + Restlet examples?

2008-09-09 Thread Mark Petrovic
f GWT 1.5, and requiring the wisdom and time of Jerome, the Restlet project founder, to accomplish. - Rob On Sun, Sep 7, 2008 at 11:18 PM, Mark Petrovic <[EMAIL PROTECTED]> wrote: Thank you for the kind and speedy response, Rob. I intend to spend the week, and then some, on this subject, a

Re: GWT + Restlet examples?

2008-09-11 Thread Mark Petrovic
Fantastic, Thierry. Thanks much. Dumb question: how, or should, one integrate the notion of "allow post"/"allow put", etc, in the TestServer code? Mark On Sep 11, 2008, at 3:03 AM, Thierry Boileau wrote: Mail sent on the 09/02 and apparently lost. --- Hello Mark, it may be too late, bu

Re: GWT + Restlet examples?

2008-09-11 Thread Mark Petrovic
onditional GETs in HTTP). There's no difference in server-side Restlet programming for a GWT client and a non-GWT client, so all the existing 1.1 documentation applies. On Thu, Sep 11, 2008 at 12:49 PM, Mark Petrovic <[EMAIL PROTECTED]> wrote: Fantastic, Thierry. Thanks much. Du

On a Resource, when and by what is getRepresentation() called?

2008-09-28 Thread Mark Petrovic
Good day. I'm studying the flow of the Resource example here http://www.restlet.org/documentation/1.0/firstResource#part03 We see in this code that the method "public void post(Representation entity)" does some processing, then instantiates and returns an appropriate Representation. I furt

Re: On a Resource, when and by what is getRepresentation() called?

2008-09-28 Thread Mark Petrovic
resource-oriented API. Query strings are frequently (though not always) indicative of an imperative, non-REST design. If you already know this and or/don't care, ignore the pedantry ... - Rob On Sun, Sep 28, 2008 at 6:38 PM, Mark Petrovic <[EMAIL PROTECTED]> wrote: Is it the ca

Practicing the use of Context#createChildContext()

2008-09-29 Thread Mark Petrovic
Good day. I've been following the "first resource" example as I teach myself restlet 1.1 programming, in the context of using the simple standalone server: http://www.restlet.org/documentation/1.1/firstSteps However, doing so in the 1.1-RC2 release leads to what I assume are new deprecat

Re: Practicing the use of Context#createChildContext()

2008-09-29 Thread Mark Petrovic
stletComponent .getContext (); <<<<<<<<<< diff this restletComponent.getDefaultHost().attach(new MyApplication(context)); Can someone please confirm this? Thanks. On Sep 29, 2008, at 10:07 AM, Mark Petrovic wr

Re: Practicing the use of Context#createChildContext()

2008-09-29 Thread Mark Petrovic
, Sep 29, 2008 at 1:07 PM, Mark Petrovic <[EMAIL PROTECTED]> wrote: Can someone illustrate this new recommendation with a simple code example?

Using the standalone server

2008-09-30 Thread Mark Petrovic
Good day. This is a well-intentioned albeit somewhat ignorant question: is anyone using the Noelios standalone server in a production scenario? I think of all the hundreds of person-years in something like servlet technology and wonder if the standalone server is more of a development t

Re: Using the standalone server

2008-09-30 Thread Mark Petrovic
this. But frankly, the only state I had in mind to track at this point is whether the user is "logged in" or not. Any suggestions on how you fellows handle something simple like this would be much appreciated. Mark - Rob On Tue, Sep 30, 2008 at 2:45 PM, Mark Petrovic <[E

Re: Using the standalone server

2008-09-30 Thread Mark Petrovic
On Sep 30, 2008, at 2:55 PM, Rob Heittman wrote: I see that I am in fact using the Simple connector, as per the FirstResource tutorial, I went out of my way to put its jar on the classpath. This configuration is what I meant by 'standalone server'. I like Simple in concept, but I've had so

Re: Using the standalone server

2008-10-01 Thread Mark Petrovic
On Sep 30, 2008, at 4:14 PM, Mark Petrovic wrote: My app is pretty simple, and thus far has no traditional state I need to maintain - except the notion of "is logged in". I'd like to use the Jetty connector. As I said, I'm using the Simple connector in my FirstReso

On the use of adding Variants to a Resource

2008-10-02 Thread Mark Petrovic
Good day. The FirstResource reference app makes it clear that a Resource can have Variants added to it, and that entity variants can be tested in the event of the GET, POST, etc, received operations. But it doesn't make clear why, in a Resource's constructor, those Resource's Variants ar

Re: On the use of adding Variants to a Resource

2008-10-03 Thread Mark Petrovic
~ Co-founder ~ http://www.noelios.com -Message d'origine- De : Mark Petrovic [mailto:[EMAIL PROTECTED] Envoye : jeudi 2 octobre 2008 17:54 A : discuss@restlet.tigris.org Objet : On the use of adding Variants to a Resource Good day. The FirstResource reference app makes it clear t

How to set the HTTP response code in a restlet response

2008-10-06 Thread Mark Petrovic
Good day. Would someone be kind enough to explain how to set, or induce, the Restlet response to a request to a particular value? Thanks.

Re: How to set the HTTP response code in a restlet response

2008-10-06 Thread Mark Petrovic
. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De : Mark Petrovic [mailto:[EMAIL PROTECTED] Envoye : lundi 6 octobre 2008 17:19 A : discuss@restlet.tigris.org

Restlet-GWT HTTP authentication example

2008-10-06 Thread Mark Petrovic
Does anyone have a couple of code snippets, with qualifying and explanatory comments, they can share that demonstrate both the client and server side of the new Restlet-GWT HTTP authentication? I just might be getting the hang of Restlet programming, and authentication and login-state with

How to add a cookie to a pending request, and send that request

2008-10-08 Thread Mark Petrovic
Good day. I read this post http://restlet.tigris.org/servlets/ReadMsg?listName=discuss&msgNo=5135 because the subject sounded similar to my current problem. My existing newbie model consists of a run-up to a PUT that looks like this: Client client = new Client(Protocol.HTTP); String baseUr

Re: How to add a cookie to a pending request, and send that request

2008-10-08 Thread Mark Petrovic
Beautiful. I was aware of the notion of "handle", but it reminds me of event handling, after a fact, rather than a priori driving an event or fact. Thank you. On Oct 8, 2008, at 8:40 AM, Thierry Boileau wrote: Hi Mark, the client can simply handle your request since it inherits from the

Setting the representation identifier on a response that has no need for an entity

2008-10-08 Thread Mark Petrovic
Good day. The First Resource app has code similar to this for setting the location of created resource: String entity = "Items created"; Representation rep = new StringRepresentation(entity, MediaType.TEXT_PLAIN); rep.setIdentifier(getRequest().getResourceRef().getIdentifier() + "/" + so

Re: Setting the representation identifier on a response that has no need for an entity

2008-10-09 Thread Mark Petrovic
On Oct 9, 2008, at 1:27 AM, Thierry Boileau wrote: In your case, you don't want to send an entity but still want to set the "Location" header. Thus, don't set the response's entity but call the Response#setLocationRef method (see also this link [2] for more details about the mapping HTTP h

Re: Restlet-GWT HTTP authentication example

2008-10-14 Thread Mark Petrovic
Thank you! Mark On Oct 14, 2008, at 7:08 AM, Thierry Boileau wrote: Hello Mark, the current sample GWT application has been updated with authentication, and usage of JSON and XML representations. See http://wiki.restlet.org/docs_1.1/13-restlet/28-restlet/144-restlet.html . Best regards,

Restlet URL parsing idiom question

2008-10-14 Thread Mark Petrovic
Good day. If I have router.attach("/sign/bind", SignResource.class); router.attach("/sign/lookup/{sign}", SignResource.class); what is a stylish idiom to get at the "bind" and "lookup" tokens in the URLs above from within the SignResource restlet? Doing so amounts to enabling some finer gr

Re: Restlet URL parsing idiom question

2008-10-15 Thread Mark Petrovic
Thank you. Yes, two routes to the same resource bugs me. It looked a bit strange when I when I coded it. On Oct 15, 2008, at 1:30 AM, Thierry Boileau wrote: Hello Mark, you can have a look at the Request#getResourceRef() (that returns an instance of the Reference class) and the Referenc

Spring configuration example using com.noelios.restlet.ext.spring package

2008-10-15 Thread Mark Petrovic
Good day. I notice that both the FAQ and Wiki have sections treating the use of the org.restlet.ext.spring package to manage a restlet app in a Spring container. Is there a similar example someone might offer on using the com.noelios.restlet.ext.spring package to manage a restlet app in t

Re: Restlet-GWT HTTP authentication example

2008-10-15 Thread Mark Petrovic
Thierry, good day. Is there sample code available showing how to use the HTTP Digest authentication scheme? On Oct 14, 2008, at 7:08 AM, Thierry Boileau wrote: Hello Mark, the current sample GWT application has been updated with authentication, and usage of JSON and XML representations.

Re: Spring configuration example using com.noelios.restlet.ext.spring package

2008-10-16 Thread Mark Petrovic
ould someone be kind enough to post some non-proprietary code showing how they configured their restlet app using Spring? The example would configure an app no more complex than the FirstResouce app found elsewhere on the site. Thanks much. Hopefully posterity will benefit from my supplications

Re: Spring configuration example using com.noelios.restlet.ext.spring package

2008-10-17 Thread Mark Petrovic
ing support in Restlet. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De : Mark Petrovic [mailto:[EMAIL PROTECTED] Envoye : jeudi 16 octobre 2008 17:16 A :

Re: Spring configuration example using com.noelios.restlet.ext.spring package

2008-10-17 Thread Mark Petrovic
ss="com.mspetrovic.server.restlet.LogResource" scope="prototype"/> class="com.mspetrovic.server.restlet.LogExportResource" scope="prototype"/> class="com.mspetrovic.server.restlet.QSOResource" scope="prototype"/> On Oc

Re: Spring configuration example using com.noelios.restlet.ext.spring package

2008-10-18 Thread Mark Petrovic
uot;com.mspetrovic.server.restlet.LogResource" scope="prototype"/> class="com.mspetrovic.server.restlet.LogExportResource" scope="prototype"/> class="com.mspetrovic.server.restlet.QSOResource" scope="prototype"/> Rhett On Oct 1

Re: Restlet-GWT HTTP authentication example

2008-10-18 Thread Mark Petrovic
Thank you. Mark On Oct 17, 2008, at 11:26 AM, Thierry Boileau wrote: Hello Mark, I've updated the sample application and its description: http://wiki.restlet.org/docs_1.1/13-restlet/28-restlet/144- restlet.html Best regards, Thierry Boileau -- Restlet ~ Core developer ~ http://www.restlet

Re: Consuming a REST response

2008-10-20 Thread Mark Petrovic
Good day. I think your question can reside at a number of different levels, but I'll take a stab at the simplest and most obvious. Hopefully this isn't so simple as to be of no use. Here are a few lines of code from one of my JUnit tests, that acts as a client doing a GET against a restl

Re: Application can't find jetty class

2008-10-21 Thread Mark Petrovic
Hugh, good day. Here are the jars I use under Netbeans 6.1 to avail myself of the Jetty connector, all of which (I believe) should be available in the Restlet distribution: com.noelios.restlet.ext.jetty_6.1.jar org.mortbay.jetty_6.1/org.mortbay.jetty.jar org.mortbay.jetty.https.jar org.mort

Sample code for using FreeMarker with Restlets

2008-12-25 Thread Mark Petrovic
Good day, and Merry Christmas to all who are celebrating it. Would someone be kind enough to post a few lines of example config and code showing how you use FreeMarker with Restlets in returning html views. Thanks much. -- Mark Petrovic m...@petrovic.org http://www.petrovic.org

Re: Sample code for using FreeMarker with Restlets

2008-12-26 Thread Mark Petrovic
Thank you. Sent from my iPhone On Dec 26, 2008, at 1:12 AM, "Raif S. Naffah" wrote: > hello Mark, > > On Friday 26 December 2008 07:17:55 Mark Petrovic wrote: >> Good day, and Merry Christmas to all who are celebrating it. >> >> Would someone be kind

Restlet client version 2.1.6, SSL configuration on Android

2014-01-11 Thread Mark Petrovic
Hello. I am new to Restlet client programming. I am attempting to use Restlet client 2.1.6 on Android. I have read the documentation on SSL config by way of DefaultSslContextFactory, as well as having read StackOverflow articles on configuring an HttpsClientHelper. I chose the latter route,

RE: Restlet client version 2.1.6, SSL configuration on Android

2014-01-11 Thread Mark Petrovic
I worked more on this, but to no avail. Here is my new set of dependencies, which seems more correct given the "net" jar and ssl support are both on the classpath: dependencies { compile 'com.google.android:support-v4:r7' compile 'com.google.code.gson:gson:2.2.4' compile group: "org

RE: Restlet client version 2.1.6, SSL configuration on Android

2014-01-11 Thread Mark Petrovic
Well, I'm making progress. My original code failed to expand the Android R resource id's into actual strings. So my URL was horribly mangled. I fixed that. But I still see this exception when connecting over https: Caused by: Internal Connector Error (1002) - No available client conne