Paul Sprague | 7 May 2013 16:51
Picon

How to implement an AMQP client+server connector?

Hello!

Can anyone on this list make some recommendations as to how a connector could be implemented that isn't
based on HTTP? I was initially think that I needed to implement a connector, connection, controller,
in/outbound ways, etc. But after looking at the code I'm not so sure this is the correct approach.

My thought was to leverage Apache Qpid as the underlying implementation. I just need some idea as to how I can
integrate it into restlet.

Thanks,
Paul

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=3055055

Juan | 7 Jan 2013 21:11
Picon

access webservice with hostname versus localhost

I have been playing with the Restlet examples, seems that the URI defined in the router.attach call
(http://localhost:8111/hello) needs to called exactly like it from the clients, including the host
name. If my local machine is named galaxy18 and i run the webservice and local client, I can only access it
via localhost:8111/hello. If I change the router.attach to http://galaxy18:8111/hello then the
client can access it with galaxy18 but not with localhost.

I don't like hardcording, especially machine names, if you can imagine this will be a pain if my webservice
is running on different machines.

Is this an instance where I need to use read the hostname into a variable then use that in the router.attach or
am i missing something basic here?

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=3041554

Jerome Louvel | 1 Oct 2012 13:46
Favicon
Gravatar

Restlet license for IntelliJ IDE

Hi all,

 

For Restlet code contributors, we have a free license available thanks to JetBrains.

 

Please contact us directly for additional information.

 

Thanks,

Jerome

--

http://www.restlet.com

http://twitter.com/#!/jlouvel

 

Cyril Lakech | 23 Jul 2012 19:19
Picon
Gravatar

Restlet 2.1-RC5 and GWT 2.4 POST entity issue

Hi,

We use Restlet 2.1-RC5 and GWT 2.4 with restlet gwt extension and we
face a 415 error on posting content from the GWT app to the restlet
API: "Too few tokens in RPC request" (see errors below [1])

We can't find any solution to this exception. Debugging restlet/gwt
doesn't help...

Here is a sample of an entity sent to the server :

7|0|3|/wikeo-core/business/v2/families/|null|com.adeo.wikeo.business.family.domain.Family/881681172|1|2|3|

GET works perfectly, but when we try to POST/PUT content to the server
we get a 415 error

Any idea ?

[1]

Jul 23, 2012 4:01:21 PM org.restlet.service.ConverterService toObject
WARNING: Unable to convert a
[application/x-java-serialized-object+gwt,UTF-8] representation into
an object of class com.adeo.wikeo.business.family.domain.Family
java.io.IOException: Couldn't read the GWT object representation: Too
few tokens in RPC request at
org.restlet.ext.gwt.ObjectRepresentation.getObject(ObjectRepresentation.java:126)
at org.restlet.ext.gwt.GwtConverter.toObject(GwtConverter.java:149) at
org.restlet.service.ConverterService.toObject(ConverterService.java:167)
at org.restlet.resource.Resource.toObject(Resource.java:828) at
org.restlet.resource.ServerResource.doHandle(ServerResource.java:481)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:545)
at org.restlet.resource.ServerResource.post(ServerResource.java:1178)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:430)
at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:646)
at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:341)
at org.restlet.resource.ServerResource.handle(ServerResource.java:944)
at org.restlet.resource.Finder.handle(Finder.java:246) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Router.doHandle(Router.java:431) at
org.restlet.routing.Router.handle(Router.java:648) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
at org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211) at
org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:84)
at org.restlet.Application.handle(Application.java:381) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Router.doHandle(Router.java:431) at
org.restlet.routing.Router.handle(Router.java:648) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.routing.Router.doHandle(Router.java:431) at
org.restlet.routing.Router.handle(Router.java:648) at
org.restlet.routing.Filter.doHandle(Filter.java:159) at
org.restlet.routing.Filter.handle(Filter.java:206) at
org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211) at
org.restlet.Component.handle(Component.java:392) at
org.restlet.Server.handle(Server.java:516) at
org.restlet.engine.ServerHelper.handle(ServerHelper.java:72) at
org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:152)
at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1089)
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:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at net.stax.appserver.webapp.RequestMonitorValve.invoke(RequestMonitorValve.java:35)
at net.stax.appserver.admin.StaxApplicationQueryValve.invoke(StaxApplicationQueryValve.java:49)
at net.stax.appserver.webapp.RequestSetupValve.invoke(RequestSetupValve.java:31)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:647)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662) Caused by:
com.google.gwt.user.client.rpc.SerializationException: Too few tokens
in RPC request at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:809)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt(ServerSerializationStreamReader.java:493)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:104)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:138)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:385)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(ServerSerializationStreamReader.java:670)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:724)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeClass(ServerSerializationStreamReader.java:698)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeImpl(ServerSerializationStreamReader.java:724)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:560)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:138)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:385)
at org.restlet.ext.gwt.ObjectRepresentation.getObject(ObjectRepresentation.java:122)
... 60 more Caused by: java.lang.IndexOutOfBoundsException: Index: 9,
Size: 9 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at
java.util.ArrayList.get(ArrayList.java:322) at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:807)
... 73 more Jul 23, 2012 4:01:21 PM org.restlet.engine.log.LogFilter
afterHandle INFO: 2012-07-23 16:01:21 109.7.6.135 - 10.202.30.193 80
POST /wikeo-core/business/v2/families/ - 415 554 156 37
http://toolfamilydev-antoine.webadeo.cloudbees.net Mozilla/5.0
(Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like
Gecko) Chrome/19.0.1084.56 Safari/536.5
http://toolfamilydev-antoine.webadeo.cloudbees.net/

Cyril Lakech
0684482444

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2992464

Dencel | 15 May 2012 16:01
Picon

Filter/FilterChain

I can't get my head around, why there is no filtering capability like servlet's Filter/FilterChain
available in Restlet.Is there a specific design decision at the basis for this? 

Something like: 
Authenticator authenticator = new MyAuthenticator();
Router router = new Router()
router.attach("/secure",MyResource.class);
router.attachFilter("/secure",authenticator);
router.attach("/secure2",MyResource2.class);
router.attachFilter("/secure2",authenticator);
router.attachDefault(PublicResource.class);

Looks more meaningful to me then: 
Authenticator authenticator = new MyAuthenticator();
authenticator.setNext(MyResource.class);
router.attach("/secure",authenticator);
authenticator = new MyAuthenticator();
authenticator.setNext(MyResource2.class);
router.attach("/secure2",authenticator);

In the first method there is only one filter entity created vs the two entities on the 2nd example. I've
implemented this already in my own project, but I like to know what the downside is of this approach. Imo the
only downside is there is no default Restlet API implementation of this mechanism.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2960919

Andy Dennie | 14 May 2012 20:49
Favicon

setting up git repos and branches

Hi everyone,

I want to be able to occasionally submit fixes to Restlet, while maintaining local branches on my dev
machine that (a) keep up-to-date with Restlet's branches, and (b) contain my fixes, including those that
I have not yet submitted back to Restlet, and those I have submitted but which have not yet been accepted and
merged (and maybe never will be, but nevertheless I need those changes for my own use).

I'm pretty new to git, and I'd like to get off on the right foot here.

Here's what I'm thinking, please advise on whether this makes sense or if there are preferable alternatives.

As an initial setup:

- clone "https://github.com/restlet/restlet-framework-java" to my local dev environment
- in my local repo, create branches off each of the Restlet-defined branches, e.g. branch "my-master" from
"master", "my-2.2" from "2.2", etc.
- on github, fork restlet/restlet-framework-java to adennie/restlet-framework-java so that I have a
place to push fixes, and from which I can send pull requests to restlet/restlet-framework-java.

When I want to work on a fix, I would (in my local dev environment):

- make sure "master" is up-to-date by pulling from origin/master
- merge "master" into "my-master"
create a topic branch off "master" (e.g. "issue-123")
- when ready, push my topic branch to my forked repo on github, and submit a pull request 
- back in my local environment, merge my topic branch into "my-master", so that when building my dependent
project against "my-master", I see all my fixes.
if applicable, backport my fixes to "my-2.2" or "my-2.1" branches by cherry-picking them from
"my-master", so that I can build against a specific version of the library instead of "my-master" if I
don't want to live on the bleeding edge.

Can you guys advise my on this approach?  How do you do it?  

Thanks in advance.
-Andy

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2960550

izia man | 13 May 2012 00:56
Picon

code samples

Hi
I'm new in web service and rest (I'm tried to learn it myself). I want to create a program that holds a manger
that send object (or object likes) and by the input of the object the client react. I had a little research in
the web and a lot of developer recommend your project "restlet" that he so lite simple and give a very good performance.

but when I try to learn about it, it's very hard to learn.
you say a very little instruction and a small part of the code.

is there any where a full code sample and a guide  of restlet especially whit android an xstream? 

thank you
izia man

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2959893

Michael Stein | 12 May 2012 12:08
Picon
Picon

How to use restlet with proxy and how to use extensions in general

Hi all, 
unfortunately I am not very familiar with restlet to be able to set up a
working project where to send a getRequest over a company proxy which needs
authentication. Without a proxy  this simple snippet works perfect:

ChallengeResponse authentication  = new
ChallengeResponse(ChallengeScheme.HTTP_BASIC, user, password);
ClientResource resource = new ClientResource(this.resourceUri);
resource.setChallengeResponse(authentication);
resource.get().write(byteArrayOS);

But although I googled since some days I cannnot find a clear example on how
to use proxAuthentication. What I found is that I could use the
hhtpClient-Extension from apache for example But then the question is on who
to use this extension?? Is it necesary to use the standard methods and
classe from the httpClient lib directly? Or am I able to call everything by
the use of restlet-Api. The examples of who to use HttpClient with proxy
seems clear to me, but who does this work as part of restlet?

Thanks in advance for all replies on who to solve this. Perhaps some hints
will help.
Mikel 

--
View this message in context: http://restlet-code.1609877.n2.nabble.com/How-to-use-restlet-with-proxy-and-how-to-use-extensions-in-general-tp7553140.html
Sent from the Restlet Code mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2959780

Jerome Louvel | 27 Apr 2012 09:05
Favicon
Gravatar

Restlet Framework 2.2 - Build issues and Eclipse/OSGi development

Hi all,

 

We’ve been discussing internally and separately with several contributors regarding the build issues occurring on the master branch in GitHub, especially with Eclipse 3.7. I’d like open up the discussion in our developers list and take this opportunity to clarify our goals for next 2.2 version and better coordinate our efforts and expectations :

 

1) Repair the Eclipse PDE build

 

The current/historical way we use to build from Eclipse is through OSGi bundles. If you install the PDE plugins (or choose the proper Eclipse editions), this should work by default as explained here (needs some update): http://wiki.restlet.org/developers/295-restlet/g1/216-restlet.html

 

For version 2.2, we are trying to migrate to the latest Eclipse 3.7 version, which now includes Maven support by default (built-in m2e plugin). The first step I’ve been trying to accomplish is to ensure that the pom.xml files present in the module directories don’t conflict with the usual Eclipse/PDE build process.

 

To use Eclipse/PDE build, you either need the “Eclipse Classic” edition which comes with PDE bundled, or to install PDE on top of the lighter “Eclipse IDE for Java” edition. Then, if you import both the modules and the libraries project as explained in the wiki, you should see the build work just fine.

 

We do have remaining issues with OAuth, OpenID extensions, as well as the examples project that need to be fixed. I’m a bit stuck on this so any help is welcome. Maybe Kristoffer and/or Martin can help for the OAuth and OpenID extensions?

 

2) Make the m2e build work

 

For 2.2, we would like the master to work with m2e as well (new name for m2eclipse), as it is now bundled by default since Eclipse 3.7 (IDE for Java).

 

Note that currently, our POM.xml files are not manually edited but instead generated by our forge (ant scripts) from our own module.xml files. This was necessary in order to support multi-edition builds and distributions in various channels (Eclipse update site, Maven update site).

 

So, in addition to adjusting the .project and .classpath files, we should ensure that we can (re-)generate the proper pom.xml files. Shaun Elliot has offered to help on that front and other contributions will be welcome, but we need to be careful when contributing changes to Eclipse project and pom files.

 

3) Ensure compatibility when both PDE build and m2e are active

 

Finally, we should try to make the build with both pde and m2e work at the same time in case the developers needs to develop in PDE/OSGi mode. Currently, I see no way to fully turn off m2e for a workspace or a project, which is annoying. There is probably a solution I’m not aware of.

 

The minimum is to ensure that there is no conflict and the binaries are produced in separate directories (bin for PDE and target/classes for m2e).

 

4) Integrate the org.restlet.ext.osgi extension

 

Once the previous steps are complete, at least the first ones, we’ll start integrating the contribution from Bryan Hunt and others currently located at:

https://github.com/BryanHunt/Restlet-Extension-for-OSGi-Environments/

 

This will allow fully dynamic usage of Restlet thanks to OSGi, such as adding new applications or resources on the fly.

 

Best regards,

Jerome

--

http://www.restlet.com

http://twitter.com/#!/jlouvel

 

Thierry Boileau | 7 Mar 2012 09:42
Favicon

Shaun Elliot - new committer on the JAX-RS extension

Hello all,

we are pleased to integrate Shaun Elliot as new committer on the JAX-RS extension, in addition to Stephan
Koops the original committer. With the arrival of JAX-RS release 2, this help is very welcomed!

Best regards,
Thierry Boileau

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=7458&dsMessageId=2931663

Jerome Louvel | 17 Dec 2011 23:45
Gravatar

Migration to GitHub - First steps

Hi all,

 

After some troubles we were able to migrate our SVN repository from Tigris to GitHub (actually Thierry Boileau has done most of it). This migration includes the whole commit history and recreated the same branches and tags. All authorized committers on Tigris SVN were granted the same rights on GitHub. If we missed anyone, please let us know.

 

For the record, we had troubles doing a direct import from Tigis to GitHub which failed, apparently due to the large size of our repository and history. As a workaround, we first created a clone SVN repository on a local machine (using SVN Sync command). The we ran the svn2git import tool, after asking GitHub raising

 

Here is the URI of the Restlet Framework for Java:

https://github.com/restlet/restlet-framework-java

 

Next steps are:

·         hooking this GitHub repository to our build process to resume snapshots generation and so on

·         migrating the issues from Tigris to GitHub

 

Best regards,

Jerome

--

http://www.restlet.org

http://twitter.com/#!/jlouvel

 


Gmane