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

  • Home
  • SEARCH
  • 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 5949263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:13:27+00:00 2026-05-22T17:13:27+00:00

I’m trying to learn about restlets more coming from a soap-rpc background. One thing

  • 0

I’m trying to learn about restlets more coming from a soap-rpc background. One thing that I can’t seem to figure out how to do (and maybe isn’t possible) is to modify objects on requests or send back a copied version with modifications.

I’m trying to do something like this:

public interface AddressService {
    @Get
    Address addOnZipCode( Address address );
}

The server would be deployed out with the implementation and the client could make use of dynamic proxies to do its work.

The server starts just fine but when the client makes the call there is no indication on the server that the implementing method is being called. Furthermore, the client doesn’t error until the call to the server returns – the returned object is null?!?

Is what I’m trying to do here possible with restlets? If so, any ideas on what I might be doing wrong?

I can post more code if necessary.

Thanks in advance.

EDIT #1:

I’ve even tried simplifying it to not use custom objects:

@Post
String execute( String message ); 

I get the following:

INFO: Starting the default HTTP client
Exception in thread "main" Method Not Allowed (405) - Method Not Allowed
    at org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1615)
    at $Proxy5.execute(Unknown Source)

I’m beginning to think this is not possible, thus, I have a hard time seeing how this is a viable alternative to SOAP+RPC web services.

EDIT #2:
It looks like this is possible based on examples in the book: “Restlets in Action”

public interface AccountsResource {          
    @Get("txt") 
    public String represent();               

    @Post("txt") 
    public String add(String account);       
}

EDIT #3:
It turns out that simply hitting the “stop” button in my Eclipse console was not shutting down the server instance. Opening a browser to the server URL showed some fishy results – there were multiple old server instances running. After shutting them all down I got it to work. Ultimately the answer was to use @Post instead of @Get1.

  • 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-05-22T17:13:28+00:00Added an answer on May 22, 2026 at 5:13 pm

    Have a look at this:

    http://wiki.restlet.org/docs_2.0/13-restlet/21-restlet/318-restlet/303-restlet.html

    On the server side your implementation must be like so:

    class AddressServerResource extends ServerResource implements AddressService {
        // implementation
    }
    

    On the client side:

    ClientResource cr = new ClientResource("http://your-api.com/address/123");
    AddressService service = cr.wrap(AddressService.class);
    // use the service transparently
    

    Edit:

    @Post
    Address addOnZipCode( Address address );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.