restlet

Configuring web.xml for webservices and servlet.

Hi, I am new to Restlets. Trying to configure the web.xml (on JBoss). I have 2 entries, one for a servlet (got nothing to do with webservices) other for webservices, using Restlet. Here are the entries.. <servlet> <servlet-name>AuthenticationServlet</servlet-name> <servlet-class>com.safeid.web.server.api.servlet.AuthenticationServ...

Basic Authentication from url in Restlet

I've been using Restlets "ChallengeResponse" mechanism to authenticate users on the server side. ChallengeResponse challengeResponse = getRequest().getChallengeResponse(); if( challengeResponse == null ){ throw new RuntimeException("not authenticated"); } String login = challengeResponse.getIdentifier(); String password = new Strin...

Java GAE maven configuration problem? just another VerifyError

My project works absolutely fine on the Google Server but I get a VerifyError: java.lang.VerifyError: (class: org/restlet/ext/servlet/ServerServlet, method: createServer signature: (Ljavax/servlet/http/HttpServletRequest;) Lorg/restlet/engine/http/HttpServerHelper;) Incompatible object argument for function call UPDATE Through ex...

Configuring HttpClient for usage as Restlet client

Hi, I'm stuck configuring Restlet for my client-side code. I'm using Restlet 2 and HttpClient 4. I added the extension jar and the HttpClient jars to the build path and it seems to work. However, I don't know how to configure it in detail. I don't create any client manually, instead I use ClientResources for interactions, which is th...

Restlet basic HTTP Authentication : Help required

Hi All, I am running Restful web service on 8182 port using restlet framework. I am trying to authenticate user to hit the service. i.g. I have a query string like this http://localhost:8182/api/service/customers/?key="XXXXXXXXX" My doubts are: How to get value of parameter key in Resource class/Application class, so i can authentic...

JSP and Restlets

I developed a simple web servie using restlets . everything s fine i can call a URI and connect to db and do modifications , but when i tried to do the same using jsp s i was not able to get the jsp page itself in the browser . How can i connect a jsp page to this restlet ? ...

setup httpclient proxy to access REST url on EC2

I have an EC2 imaging running and hosting a REST service accessible from Url. The following is what I did 1) ssh -i D port user@ec2-host 2) setup proxy in the firefox web browser and type in the url http://ec2-host:port/demo/workflow/lists/demo_workflow It works fine. Now I need to send the GET method using Java program, below is my c...

Restlet multiple actions on one Entity

Hi, I'm trying to figure out how to best lay out a set of Restlet APIs. I have a User entity, which might have the standard CRUD operations, which fits nicely into rest, but there are other ones too like "reset password", or "terminate". What is the best way to lay this out? Here is what i was thinking: /1.0/user/update //perha...

Restlet framwork with post method

Hi, I am using restlet 1.0, and i am trying to post a new entry into my Mysql database. I am not using any HTML form, i want to do all operation on MY rest client. The problem i am facing is, I want to post a new customer entry into mysql database, I am not using any HTML form, I am trying to achieve and create XML in Rest Client, and...

How do I configure my web.xml to use Spring with noelios Restlets?

There is a lot of information and examples out there for combining Spring with Restlets, and it is somewhat confusing. Can anyone provide a simple web.xml and *-servlet.xml to demonstrate how I would combine Spring with Restlets? Specifically, I want the restlets to be created by Spring, and I want to use annotations for injecting res...

How can I disable logging in Restlet 2.0?

I simply want to disable Restlet's logging to stdout/stderr in my project and forward all Restlet logging through the SLF4J facade provided by org.restlet.ext.slf4j. Is there an easy way to do this? ...

RESTlet 2.0 tutorial application does not work on appengine

I have been playing with the source code available from the following tutorial. The GWT/GAE application works in development mode, however when its deployed, the server always returns the response in the JSON format. I am using the Restlet 2.0 Testing jars, and have also included the dependent libraries. thank you ...

How to return a plist using the restlet api

Hi, does anyone know how to return a plist / property list using restlets REST api? I'm connecting to my iPhone app and objective-c works much nicer with plists. ...

No available client connector supports the required protocol: 'HTTP'

Greeting. I am playing with Restlet framework, when I am running following code getting and exception Internal Connector Error (1002) - No available client connector supports the required protocol: 'HTTP'. ClientResource cr = new ClientResource( "http://127.0.0.1:8888/user/123"); UserResource resource = cr.wrap(UserResource.class); User...

Restlet JSONException

i want to use Restlet and i am new to it. I put restlet app in servlet container but when i want to create a JSON response from GET request it returns JSONException. Interestingly (at least for me:) when i used same resource from restlet component got no errors. what should i do to be able to use Restlet in servlet container? Thanks ...

In Java, how to set the header of a Restlet Response?

I can't seem to figure out how to add headers to my restlet response. When I look at the available methods in the Response object, all I see is setStatus, setEntity, and setAttributes but none of these tell me how to set custom http headers on the response. For example, I have a GET call the returns something like the following: HTTP/1...

Scalable API server, with Restlet?

We're planning a new API server that will mainly serve JSON responses, with a RESTful interface. We're concerned about scale and availability. Are we on the right track using Restlet with Jetty (or another connector)? One question we're asking is, is there anything in the Java world like Phusion Passenger? For example, a pre-built solut...

creating OData like services using RESTlet

I am trying to build a OData interface for Java application. From what I have seen, one can create fully compliant OData services using microsoft technologies (aka visual studio) using their WCF services. Am I of the right impression? I am trying to simulate OData services (it is also RESTful) using RESTlet + ROME(for atom feeds) + ROM...

Why can I only convert a Representation to a string once in RESTlet?

So, I'm trying to convert a Representation to a String or a StringWriter either using the getText() or write() method. It seems I can only call this method once successfully on a Representation... If I call the method again, it returns null or empty string on the second call. Why is this? I'd expect it to return the same thing every ...

A url resource that is a dot (%2E)

I have a resource that is a . This means my url looks like this: http://myapp/index/. And i need to add query parameters so that it looks like this: http://myapp/index/.?type=xml I use Freemarker for the presentation of my resources and made a percent-encoding hack for this case: <#if key?matches("\\.")> <li><a href="${contextPath}/inde...