<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.java.restlet">
    <title>gmane.comp.java.restlet</title>
    <link>http://blog.gmane.org/gmane.comp.java.restlet</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7029"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7028"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7025"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7024"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7023"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7022"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7012"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7009"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7006"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7002"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/7000"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/6980"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/6965"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/6964"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/6963"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/6958"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/6954"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/6943"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/6940"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.java.restlet/6933"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7029">
    <title>Important changes to Restlet mailing lists</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7029</link>
    <description>Hi all,
 
A few days ago, Tigris.org completed a major upgrade on their open source hosting platform, where the Restlet project partly lives.
 
As a result, some settings where changed in the mailing lists, potentially affecting some of you. I have just done some adjustments
to the configuration that should solve most obvious issues such as moderation of some subscribers not registered with Tigris. Please
report any remaining issue that you encounter.
 
The good news is that they have added new features such as online posting without being subscribed. This could be useful for
newcomers or people rarely posting.
 
Finally, I have fully rewritten the mailing lists page with the greatest options to get you connected to the Restlet community
(Tigris, Nabble, GMane):
http://www.restlet.org/community/lists
 
Best regards,
Jérôme Louvel
--
Restlet ~ Founder and Lead developer ~  &lt;http://www.restlet.org/&gt; http://www.restlet.org
Noelios Technologies ~ Co-founder ~  &lt;http://www.noelios.com/&gt; http://www.noelios.com

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&amp;dsMessageId=979010</description>
    <dc:creator>Jerome Louvel</dc:creator>
    <dc:date>2008-12-03T18:04:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7028">
    <title>Tutorial Missing Info</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7028</link>
    <description>At this point in the tutorial:

http://www.restlet.org/documentation/1.0/firstResource#part07

where it says:

"This client application must be run as a standalone Java application using a couple of JARs:

    * org.restlet.jar
    * com.noelios.restlet.jar
    * com.noelios.restlet.ext.httpclient.jar
    * org.apache.commons.httpclient.jar"

it has missed out some jars that seem to be crucial in getting the server to work properly - nameley:

org.apache.commons.logging.jar
org.apache.commons.codec.jar

- just thought the docs should be updated to show that you need to include these jars too.

Cheers
Simon

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&amp;dsMessageId=978983

</description>
    <dc:creator>Simon Earnshaw</dc:creator>
    <dc:date>2008-12-03T17:11:16</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7025">
    <title>another missing method due to using http client connector</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7025</link>
    <description>Hello together,
currently I´m "fighting" with restlet to connect our database resources via
url to the web. I want to run the service in the  tomcat container. Without
tomcat I can use the apache httpclient to connect to a url. In tomcat the
same code does not work anymore. I don´t know what dependencies are not
fullfilled. If I use the httpclient directly everything works fine but it´s
not as elegant in comparison to the http client in restlet api. The code is
quite simple:

...getRepresentation(...)

Client client = new Client(Protocol.HTTP);
Response response = client.get(url);
in comparison to
    HttpClient httpClient = new HttpClient();
    GetMethod getMetadataRequest = new GetMethod(url);
        try {
            httpClient.executeMethod(getMetadataRequest);
            BufferedReader in = new BufferedReader(new InputStreamReader(
                    getMetadataRequest.getResponseBodyAsStream()));
        } catch (HttpException e)
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

... do some data transformation
return representation

I included all the necessary jars regarding the readme.txt:
c.n.r.e.httpclient,c.n.r.e.servlet,c.n.restlet,common-logging,javax.servlet,log4j,o.a.c.codec,o.a.c.httpclient,o.a.c.logging,o,restlet,postgresql,spring

Thanks in advance,
 Thilo

03.12.2008 16:30:08 com.noelios.restlet.StatusFilter getStatus
SCHWERWIEGEND: Unhandled exception or error intercepted
java.lang.NoSuchMethodError:
com.noelios.restlet.ext.httpclient.HttpClientHelper.getHelpedParameters()Lorg/restlet/util/Series;
    at
com.noelios.restlet.ext.httpclient.HttpClientHelper.getMaxConnectionsPerHost(HttpClientHelper.java:185)
    at
com.noelios.restlet.ext.httpclient.HttpClientHelper.start(HttpClientHelper.java:261)
    at org.restlet.Client.start(Client.java:118)
    at org.restlet.Restlet.init(Restlet.java:123)
    at org.restlet.Client.handle(Client.java:108)
    at org.restlet.Uniform.handle(Uniform.java:97)
    at org.restlet.Uniform.get(Uniform.java:74)
    at
de.dlr.caf.wisdom.system.web.rest.Metadata.getRepresentation(Metadata.java:72)
    at org.restlet.resource.Resource.handleGet(Resource.java:415)
    at org.restlet.Finder.handle(Finder.java:292)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Router.handle(Router.java:444)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at
com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:96)
    at org.restlet.Application.handle(Application.java:293)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Router.handle(Router.java:444)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Router.handle(Router.java:444)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at
com.noelios.restlet.component.ComponentHelper.handle(ComponentHelper.java:118)
    at org.restlet.Component.handle(Component.java:230)
    at org.restlet.Server.handle(Server.java:281)
    at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:99)
    at
com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:94)
    at
com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:397)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:595)
03.12.2008 16:30:08 com.noelios.restlet.LogFilter afterHandle


</description>
    <dc:creator>Thilo Wehrmann</dc:creator>
    <dc:date>2008-12-03T15:45:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7024">
    <title>another missing method</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7024</link>
    <description>Hello together,
currently I´m "fighting" with restlet to connect our database resources
via url to the web. I want to run the service in the  tomcat container.
Without tomcat I can use the apache httpclient to connect to a url. In
tomcat the same code does not work anymore. I don´t know what
dependencies are not fullfilled. If I use the httpclient directly
everything works fine but it´s not as elegant in comparison to the http
client in restlet api. The code is quite simple:

...getRepresentation(...)

Client client = new Client(Protocol.HTTP);
Response response = client.get(url);
in comparison to
    HttpClient httpClient = new HttpClient();
    GetMethod getMetadataRequest = new GetMethod(url);
        try {
            httpClient.executeMethod(getMetadataRequest);
            BufferedReader in = new BufferedReader(new InputStreamReader(
                    getMetadataRequest.getResponseBodyAsStream()));
        } catch (HttpException e)
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

... do some data transformation
return representation

I included all the necessary jars regarding the readme.txt:
c.n.r.e.httpclient,c.n.r.e.servlet,c.n.restlet,common-logging,javax.servlet,log4j,o.a.c.codec,o.a.c.httpclient,o.a.c.logging,o,restlet,postgresql,spring

Thanks in advance,
 Thilo

03.12.2008 16:30:08 com.noelios.restlet.StatusFilter getStatus
SCHWERWIEGEND: Unhandled exception or error intercepted
java.lang.NoSuchMethodError:
com.noelios.restlet.ext.httpclient.HttpClientHelper.getHelpedParameters()Lorg/restlet/util/Series;
    at
com.noelios.restlet.ext.httpclient.HttpClientHelper.getMaxConnectionsPerHost(HttpClientHelper.java:185)
    at
com.noelios.restlet.ext.httpclient.HttpClientHelper.start(HttpClientHelper.java:261)
    at org.restlet.Client.start(Client.java:118)
    at org.restlet.Restlet.init(Restlet.java:123)
    at org.restlet.Client.handle(Client.java:108)
    at org.restlet.Uniform.handle(Uniform.java:97)
    at org.restlet.Uniform.get(Uniform.java:74)
    at
de.dlr.caf.wisdom.system.web.rest.Metadata.getRepresentation(Metadata.java:72)
    at org.restlet.resource.Resource.handleGet(Resource.java:415)
    at org.restlet.Finder.handle(Finder.java:292)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Router.handle(Router.java:444)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at
com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:96)
    at org.restlet.Application.handle(Application.java:293)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Router.handle(Router.java:444)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Router.handle(Router.java:444)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
    at org.restlet.Filter.handle(Filter.java:134)
    at org.restlet.Filter.doHandle(Filter.java:105)
    at org.restlet.Filter.handle(Filter.java:134)
    at
com.noelios.restlet.component.ComponentHelper.handle(ComponentHelper.java:118)
    at org.restlet.Component.handle(Component.java:230)
    at org.restlet.Server.handle(Server.java:281)
    at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:99)
    at
com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:94)
    at
com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:397)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:595)
03.12.2008 16:30:08 com.noelios.restlet.LogFilter afterHandle

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&amp;dsMessageId=978930

</description>
    <dc:creator>Thilo Wehrmann</dc:creator>
    <dc:date>2008-12-03T15:42:38</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7023">
    <title>204 switched to 404 in handleGet</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7023</link>
    <description>On line 501 in version 1.1.1 of org.restlet.resource.Resource.handleGet(), there's logic that sets the response status to 404 if the representation is null and the response status is 200-299.  That logic doesn't seem to account for status 204, which by definition should not contain a message body.

In my resource, I was overriding represent(Variant) and in certain situations setting the response status to 204 and returning a null response, however the base class flipped that to a 404 on me.

I can obviously work around this by overriding handleGet() (any other suggestions?), but ideally line 501 in handleGet would be changed to account for 204/null being an acceptable GET response.

Code snippet in question...

            if (selectedRepresentation == null) {
                if ((getResponse().getStatus() == null)
                        || getResponse().getStatus().isSuccess()) {
                    getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
                } else {
                    // Keep the current status as the developer might prefer a
                    // special status like 'method not authorized'.
                }

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&amp;dsMessageId=912495

</description>
    <dc:creator>Ryan Niemeyer</dc:creator>
    <dc:date>2008-12-02T20:22:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7022">
    <title>Envoyez vos cartes de voeux personnalisees a bas prix</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7022</link>
    <description/>
    <dc:creator>cartes de voeux</dc:creator>
    <dc:date>2008-12-03T06:59:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7012">
    <title>Should Restlet ever hold on to a TCP port after calling Component.stop()</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7012</link>
    <description>I'm creating a HTTP listener and calling Component.stop() after every
method in a unit test, and I keep getting exceptions complaining that
the listen port is already in use.  This even happened after I
introduced a 1/2 second delay.  When I switch this to only create the
listener before the tests, and stop it after all are complete, it
seems to work fine.

Should Component.stop() release the TCP listen port immediately?

Ian.

</description>
    <dc:creator>Ian Clarke</dc:creator>
    <dc:date>2008-12-02T18:07:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7009">
    <title>Code hanging doing a HTTP get</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7009</link>
    <description>My code is hanging here (while trying to do a HTTP get) - any ideas?

Thread [main] (Suspended)
Object.wait(long) line: not available [native method]
MultiThreadedHttpConnectionManager.doGetConnection(HostConfiguration,
long) line: 518
MultiThreadedHttpConnectionManager.getConnectionWithTimeout(HostConfiguration,
long) line: 416
HttpMethodDirector.executeMethod(HttpMethod) line: 153
HttpClient.executeMethod(HostConfiguration, HttpMethod, HttpState) line: 397
HttpClient.executeMethod(HttpMethod) line: 323
HttpMethodCall.sendRequest(Request) line: 313
HttpClientConverter.commit(HttpClientCall, Request, Response) line: 418
HttpClientHelper(HttpClientHelper).handle(Request, Response) line: 108
Client.handle(Request, Response) line: 157
Client(Uniform).handle(Request) line: 108
ApiAuthTest.get(String, String, String) line: 87
ApiAuthTest.testAuth() line: 74
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
MethodHelper.invokeMethod(Method, Object, Object[]) line: 580
Invoker.invokeMethod(Object[], int, ITestNGMethod, Object[],
XmlSuite, Map&lt;String,String&gt;, ITestClass, ITestNGMethod[],
ITestNGMethod[], ConfigurationGroupMethods) line: 478
Invoker.invokeTestMethod(Object[], ITestNGMethod, Object[], XmlSuite,
Map&lt;String,String&gt;, ITestClass, ITestNGMethod[], ITestNGMethod[],
ConfigurationGroupMethods) line: 617
Invoker.invokeTestMethods(ITestNGMethod, ITestNGMethod[], int,
XmlSuite, Map&lt;String,String&gt;, ConfigurationGroupMethods, Object[],
ITestContext) line: 885
TestMethodWorker.invokeTestMethods(ITestNGMethod, Object[],
ITestContext) line: 126
TestMethodWorker.run() line: 110
TestRunner.runWorkers(List&lt;IMethodWorker&gt;, String) line: 712
TestRunner.privateRun(XmlTest) line: 582
TestRunner.run() line: 477
SuiteRunner.runTest(TestRunner) line: 324
SuiteRunner.runSequentially() line: 319
SuiteRunner.privateRun() line: 292
SuiteRunner.run() line: 198
RemoteTestNG(TestNG).createAndRunSuiteRunners(XmlSuite) line: 823
RemoteTestNG(TestNG).runSuitesLocally() line: 790
RemoteTestNG(TestNG).run() line: 708
RemoteTestNG.run() line: 73
RemoteTestNG.main(String[]) line: 124


</description>
    <dc:creator>Ian Clarke</dc:creator>
    <dc:date>2008-12-02T17:01:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7006">
    <title>Restlet and Java 6</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7006</link>
    <description>hello there,

before i delve in with a debugger i thought i'd ask first:  are there any 
known issues running Restlet (w/ ServerServlet) in tomcat 6.0.18 with:

# java -version
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)

and

# uname -a
Linux ... 2.6.27.5-41.fc9.i686 #1 SMP Thu Nov 13 20:52:14 EST 2008 i686 
athlon i386 GNU/Linux


TIA + cheers;
rsn

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&amp;dsMessageId=148338</description>
    <dc:creator>Raif S. Naffah</dc:creator>
    <dc:date>2008-12-02T07:38:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7002">
    <title>java.lang.AbstractMethodError: org.restlet.util.Engine.fireContextChanged</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7002</link>
    <description>Just upgraded to Restlet 1.1.1 (using Maven), and I'm seeing the
following error when I attempt to call a unit test that worked
previously, any ideas? :-

Caused by: java.lang.AbstractMethodError:
org.restlet.util.Engine.fireContextChanged(Lorg/restlet/Restlet;Lorg/restlet/Context;)V
at org.restlet.Restlet.&lt;init&gt;(Restlet.java:90)
at org.restlet.Connector.&lt;init&gt;(Connector.java:83)
at org.restlet.Client.&lt;init&gt;(Client.java:82)
at org.restlet.Client.&lt;init&gt;(Client.java:101)
at org.restlet.Client.&lt;init&gt;(Client.java:121)

</description>
    <dc:creator>Ian Clarke</dc:creator>
    <dc:date>2008-12-01T05:44:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/7000">
    <title>after POST with a response of type DomRepresentation client hangson getting response?</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/7000</link>
    <description>Hello there!

I just started to learn RESTlet framework and I am facing some strange issue I
can't handle. I've created the simple resource, which verifies if such user
exists and if so - returns the unique hash for the user. I also wrote the
simple test case, which starts the REST service and then sends the request to
authenticate the user. At this point there is the strange issue appearing:
when DomRepresentation is used, the test simply hangs on valid user (when the
response is sent), but when StringRepresentation is used - everything works
fine.

The code for the Service:

============================================================================================
import org.apache.log4j.Logger;
import org.restlet.Context;
import org.restlet.data.Form;
import org.restlet.data.MediaType;
import org.restlet.data.Request;
import org.restlet.data.Response;
import org.restlet.data.Status;
import org.restlet.resource.DomRepresentation;
import org.restlet.resource.Representation;
import org.restlet.resource.Resource;
import org.restlet.resource.ResourceException;
import org.restlet.resource.Variant;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

public class SignIn extends Resource {

    private static final Logger log = Logger.getLogger(SignIn.class);

    private CredentialsDao dao;

    private HashGeneratorInterface hashGenerator;

    /**
     * &lt; at &gt;see org.restlet.resource.Resource#init(org.restlet.Context,
     *      org.restlet.data.Request, org.restlet.data.Response)
     */
    &lt; at &gt;Override
    public void init(final Context context, final Request request,
            final Response response) {
        super.init(context, request, response);
        setModifiable(true);
        getVariants().add(new Variant(MediaType.TEXT_XML));
    }

    /**
     * &lt; at &gt;see org.restlet.resource.Resource#acceptRepresentation(org.restlet.resource.Representation)
     */
    &lt; at &gt;Override
    public void acceptRepresentation(final Representation entity)
            throws ResourceException {
        final Form form = new Form(entity);
        final String username = form.getFirstValue("username");
        final String password = form.getFirstValue("password");
        final Credentials credentials = dao.loadCredentialsByUsername(username);
        final Response response = getResponse();
        try {
            if (credentials != null
                    &amp;&amp; credentials.getPassword().equals(
                            hashGenerator.generateHash(credentials.getUuid()
                                    .toString(), password))) {
                final DomRepresentation representation = new DomRepresentation(
                        MediaType.TEXT_XML);
                final Document document = representation.getDocument();
                final Element uuid = document.createElement("uuid");
                uuid.setTextContent(credentials.getUuid().toString());
                document.appendChild(uuid);
                document.normalizeDocument();
                response.setEntity(representation);
                response.setStatus(Status.SUCCESS_OK);
            } else
                response.setStatus(Status.CLIENT_ERROR_UNAUTHORIZED);
        } catch (final Exception e) {
            log.error(e, e);
            response.setStatus(Status.SERVER_ERROR_INTERNAL);
        }
    }

    public void setDao(final CredentialsDao dao) {
        this.dao = dao;
    }

    /**
     * &lt; at &gt;param hashGenerator
     *            the hashGenerator to set
     */
    public void setHashGenerator(final HashGeneratorInterface hashGenerator) {
        this.hashGenerator = hashGenerator;
    }

}
============================================================================================

The code for the test:

============================================================================================
import junit.framework.Assert;

import org.dbunit.dataset.xml.FlatXmlDataSet;
import org.dbunit.operation.DatabaseOperation;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.restlet.Client;
import org.restlet.Component;
import org.restlet.data.Form;
import org.restlet.data.Protocol;
import org.restlet.data.Reference;
import org.restlet.data.Response;
import org.restlet.resource.Representation;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestRestImplementation {

    private static Component server;

    &lt; at &gt;BeforeClass
    public static void startupContainer() throws Exception {
        // TODO setup the REST container here
        DBUnitDatabaseAdapter.initSqlMapClient();
        final ApplicationContext ctx = new ClassPathXmlApplicationContext(
                new String[] { "applicationContext-server.xml" });
        server = (Component) ctx.getBean("top");
        server.start();
    }

    &lt; at &gt;Before
    public void cleanupDatabase() throws Exception {
        DBUnitDatabaseAdapter.cleanDatabase();
    }

    &lt; at &gt;Test(timeout = 5000)
    public void testSignin() throws Exception {
        final Client client = new Client(Protocol.HTTP);
        final Reference itemsUri = new Reference(
                "http://localhost:3000/users/signin");
        DatabaseOperation.INSERT.execute(DBUnitDatabaseAdapter.connection,
                new FlatXmlDataSet(TestRestImplementation.class
                        .getResourceAsStream("/dbunit/credentials.xml")));
        // incorrect password goes here
        Form form = new Form();
        form.add("username", "username");
        form.add("password", "123456789");
        Representation rep = form.getWebRepresentation();
        Response response = client.post(itemsUri, rep);
        Assert.assertTrue(response.getStatus().toString(), response.getStatus()
                .isError());
        // correct password goes here
        form = new Form();
        form.add("username", "username");
        form.add("password", "123456");
        rep = form.getWebRepresentation();
        response = client.post(itemsUri, rep);
        Assert.assertFalse(response.getStatus().toString(), response
                .getStatus().isError());
    }

    &lt; at &gt;AfterClass
    public static void shutdownContainer() throws Exception {
        server.stop();
    }
}
============================================================================================

Can somebody please explain what am I missing here? 

Thank you in advance!

</description>
    <dc:creator>Eugeny N Dzhurinsky</dc:creator>
    <dc:date>2008-11-29T21:40:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/6980">
    <title>Posting a form with a file</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/6980</link>
    <description>Hi all (my first post),

my question is concerning file upload within a form. I'm currenlty
using Restlet 1.1.1.
I have both client and server developed with Restlet.

I'd like to make a post call, sending 2 (key, value) pairs and a file.
I success this by making 2 post calls, one for the 2 (key, value)
pairs, simply using a Form and its WebRepresentation, and one for the
file, using a FileRepresenation (with a
MediaType.APPLICATION_OCTECT_STREAM, as my file could be a binary one
or a text one -it's a certificat-). That's works.

My question : is it possible to make only 1 post call including the 2
(key, value) pairs and the file (which can be binary or plain text) ?

Thanks in advance and sorry if my english isn't so clear :)

Regards,
Jérémy

</description>
    <dc:creator>Jérémy Bogatirsky</dc:creator>
    <dc:date>2008-11-26T16:33:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/6965">
    <title>ServletServlet example</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/6965</link>
    <description>When I try to download the sample sources, 
http://www.restlet.net/source/browse/restlet/trunk/modules/org.restlet.example/src/org/restlet/example/dist/testServlet.zip,
referenced on the Restlet 1.1 - User FAQ page, I get the following not 
found message:

The requested URL 
/source/browse/restlet/trunk/modules/org.restlet.example/src/org/restlet/example/dist/testServlet.zip 
was not found on this server.

Does anyone know if it has moved, and if so, where?

Thanks in advance.

</description>
    <dc:creator>Mark Rosenthal</dc:creator>
    <dc:date>2008-11-25T22:37:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/6964">
    <title>Atom Extension: which RFC draft/version?</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/6964</link>
    <description>Hi all,

I was starting to code a set of Resource classes which implement the 
Atom Publishing Protocol, and wanted to use the org.restlet.atom.ext 
extension, but it looks like this implements an older version.  For 
example, the Collection class still uses the "member-type" element of 
app:collection, which hasn't existed since draft 8.  Here are links to 
the latest version (RFC 5023) as well as the older drafts: 
http://bitworking.org/projects/atom/

I'll be glad to help out implementing the latest version of the spec if 
needed.

Thanks,

Thom

</description>
    <dc:creator>Thom Nelson</dc:creator>
    <dc:date>2008-11-25T22:29:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/6963">
    <title>Restlet "Directory" suggestion</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/6963</link>
    <description>Thierry, et al,

I have been working with the "Directory" class, and running into
limitations.  I realized that because I am also running Tomcat, the built-in
webdav met my needs.  However--and because you were asking for
suggestions--I realized that the Directory class could easily be improved:

1) Allow for stylesheets, see Tomcat's WebdavServlet setup (localXsltFile,
and globalXsltFile).  Note that a URI (instead of a path) would be even
better.

2) Have the default representation return XHTML (instead of the current
nonX HTML).  This would allow a programmatic caller to read the list as XML
(a request from one of my users).

3) Add a simple authorization hook, or at least clearly describe how to
authorize access to certain directories.  Note that even in Tomcat, I had to
go digging through the code to figure out how to subclass.

4) Add full webdav capability.  Given that WebdavServlet is Apache
License--and not very big--it seems that you could easily support full
webdav out of the box.

Cliff Binstock
Coyote Reporting


</description>
    <dc:creator>Cliff Binstock</dc:creator>
    <dc:date>2008-11-25T17:16:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/6958">
    <title>calling PUT and DELETE</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/6958</link>
    <description>
Hi,

         i am working on a web application using RESTlet, wanted to invoke
PUT and DELETE. some time back when i am searching for restlet resources i
came across one page where author discussing about invoking PUT and DELETE
using ajax, can any one tell me what URL that is available or  tell me how
it can be done? 

Thanks in advance  
</description>
    <dc:creator>Gan123</dc:creator>
    <dc:date>2008-11-24T14:07:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/6954">
    <title>Distributed Caching solution.</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/6954</link>
    <description>
Among EHCache and Memcache which is the best one to choose for restful
application to work with distributed caching? 
</description>
    <dc:creator>Gan123</dc:creator>
    <dc:date>2008-11-24T13:10:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/6943">
    <title>TCP RST attack detected on file upload cut</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/6943</link>
    <description>Hello,

I'm observing an odd situation where restlet is involved: pull the net
cable during file upload and router (hardware box, not Router.class)
detects TCP RST attack and blacklist our server for access from subnet.

This is the topology:
- office subnet: client application
- office router: NAT
- remove server: Apache HTTPS proxying to localhost
- remove server: Restlet with default HTTP connector

The behavior can be consistently reproduced with our setup and access to
remote server is temporarily blocked to entire office subnet. The client
application makes a GET and then a POST w/ a big file, so that I have
time to pull the plug, and that's it.

I tried reading a bit about TCP RST attack but so far I do not know how
to avoid this problem, except for disabling the attack detection in the
router or telling people not to pull the plug during upload. If anybody
has some insights to share, I appreciate.

Thanks,
Diego

</description>
    <dc:creator>Diego Ballve</dc:creator>
    <dc:date>2008-11-22T07:59:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/6940">
    <title>Usurping Directory</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/6940</link>
    <description>I would like to modify the standard Directory to return something different
than "the" file when a file is encountered.  For example, peruse a directory
structure (default behavior), but when you get to the "bottom" (an actual
file), then return a report based on that file, instead of the file itself.

 

It appears that I need a custom "DirectoryResource" which is attached to a
"Directory" via #setTargetClass.   I have the following questions:

 

1.Setting the target class doesn't seem to be invoking the resource
2.I'm not sure what I would need to override to have custom behavior:
#getVariants?
3.Is there a better way to approach the problem?

 

 

Thanks in advance,

 

Cliff

 

</description>
    <dc:creator>Cliff Binstock</dc:creator>
    <dc:date>2008-11-21T22:53:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/6933">
    <title>how to Redirect...</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/6933</link>
    <description>
Hi,

      Just started exploring restlet and trying to implement a simple
employee details info management app. it have two pages, one to create a new
employee. second that lists all employees. once the employee is created the
resource should be redirected to other resource which will list all the
employees. how i could do this either by giving URI or by giving second
resource ref in 1st resource?

Thanks in advance. 
</description>
    <dc:creator>Gan123</dc:creator>
    <dc:date>2008-11-21T15:01:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.java.restlet/6920">
    <title>Restlet MVC</title>
    <link>http://comments.gmane.org/gmane.comp.java.restlet/6920</link>
    <description>

      i am creating a web application using Restlet based on MVC. i have
configured ServlerServlet to invoke my Application class, where i have all
the URI mappings. i am planning to use the Application class as controller
and Resource to implement business logic with other required patterns. 

can any one suggest me whether this is the correct way to go ahead to
implement MVC application in RESTlet? how and when the Application will be
loaded? is it for every request or once per application ? 

Thanks in advance. 
</description>
    <dc:creator>Gan123</dc:creator>
    <dc:date>2008-11-21T07:09:59</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.java.restlet">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.java.restlet</link>
  </textinput>
</rdf:RDF>
