Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8195207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:03:31+00:00 2026-06-07T05:03:31+00:00

couldnt find somewhere else advice. I am writing a Restlet JSE Client for a

  • 0

couldnt find somewhere else advice.

I am writing a Restlet JSE Client for a Jersey(!) Restful Service. I already wrote a Jersey client for that and it is working, so the jersey service is alright. Now I get problems in writing a restlet client:

My Service root adress is:

 http://localhost:8080/com-project-core/rest, so I call:

 ClientResource = service = new ClientResource("http://localhost:8080/com-project-core/rest");

My Basic Auth Credentiels are admin and xxx, so I call:

 service.setChallengeResponse(ChallengeScheme.HTTP_BASIC, "admin", "xxx");

Now the problems:

 ClientResource service = new ClientResource("http://localhost:8080/com-project-core/rest/ping");

calls up my service. After that I try

 String myString = service.get(String.class);
 System.out.println(myString);

I get a:

 08.07.2012 17:41:48 org.restlet.engine.http.connector.HttpClientHelper start
 INFO: Starting the default HTTP client

in my output. Not more! The Junit Test says:

 Not Acceptable (406) - Not Acceptable 

So he can find the resource but cannot produce @Produces(“text/plain”) ??

So when I remove @Produces(“text/plain”) on server side it works!!

For the resourcey my server side looks like this:

    @Path("/ping")
    @RolesAllowed({"admin", "user"})
    public class ConnectedResourceBean implements ConnectedResourceIF {

        @GET
        @Produces("text/plain")
        public String getPingMessage() throws NamingException {             

        return "Hello World";
       }
 }

For my pom in set this dependencies:

<dependency>
    <groupId>org.restlet.jse</groupId>
    <artifactId>org.restlet</artifactId>
    <version>${restlet.version}</version>
</dependency>

<dependency>
    <groupId>org.restlet.jse</groupId>
    <artifactId>org.restlet.ext.xstream</artifactId>
    <version>${restlet.version}</version>
</dependency>

As I said, its working with my jersey client.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:03:33+00:00Added an answer on June 7, 2026 at 5:03 am

    No way: Restlet had problems with

     @Produces("text/plain")
    

    on jersey server side. Can someone explain me that fact?

    Edit:

    Made it work with

     <properties>
         <restlet.version>2.1-M3</restlet.version>
     </properties>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

sorry if this question has already been answered somewhere else, but I couldn't find
I searched stackoverflow but couldnt find a answer(sure there is one somewhere) but I
Sorry if this is already mentioned somewhere(I couldn't find it). I basically want to
I am sure this has been answered somewhere before but I couldn't find the
Not sure if this has been covered somewhere, but I couldn't find it in
I couldnt find the exact logic behind 0-9-1 in the AMQP 0-9-1 protocol. Please
I tried looking this up on here but couldnt find a proper answer. I
I googled for Drawing text on picturebox C# ,but I couldnt find anything useful.Then
I read a few threads about the MainWindowHandle but i couldnt find a solution
The setFetchMode in DetachedCriteria takes String associationPath as an argument. I couldnt find what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.