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 7817793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:21:32+00:00 2026-06-02T06:21:32+00:00

I wish to use the interface only option of the RestEasy framework as it

  • 0

I wish to use the interface only option of the RestEasy framework as it is much cleaner and should work.

But I’m having problems with passing parameters within POST request.

I found this example in the documentation:

@PUT
@Path("basic")
@Consumes("text/plain")
void putBasic(String body);

And to invoke:

import org.jboss.resteasy.client.ProxyFactory;
// ...

// this initialization only needs to be done once per VM
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());

SimpleClient client = ProxyFactory.create(SimpleClient.class, "http://localhost:8081");
client.putBasic("hello world");

I’ve tried the following:

@POST
@Consumes(MediaType.TEXT_PLAIN)
@Path("http://localhost:8080/app/resource")
String postBasic(String body);

And invoked:

RegisterBuiltin.register(ResteasyProviderFactory.getInstance());

RepoClient client = ProxyFactory.create(RepoClient.class, "");
client.postBasic("hi");

When printing the parameters Map (and debugging it) on the doPost method of the called servelet, the parameters were empty. I really can’t see the difference between my approach and the documented one (which is from here: Resteasy interface example).

So to sum up, only using the Interface declaration and proxy implementation how can I send POST parameters?

Solution: It’s as expected…just needed to declare the consumes accordingly with the received parameter and it works…the problem was calling the POST method of a servlet within another servlet.

  • 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-02T06:21:34+00:00Added an answer on June 2, 2026 at 6:21 am

    In your POST example, the @Path cannot include an absolute URL. Try to put just /app or /app/resource, depending on your configuration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wish to use the Translator classes of Zend framework in my app, but
I have two stored procedures I wish to use in my stored procedure, but
I wish create my personal UITableViewController and use it into my UIViewController using interface
I wish to use the method with the following signature: exec(String command, String[] envp,
I wish to use Spring MVC to provide a REST web service. However, running
I wish to use a COM dll in my C++ library. The way I
I wish to use common CRC logic in a VB.NET or C# application as
I wish to use JSON.Net on a brand spankin new Mono class library (say
I wish to use a jQuery .load(oracle apex url) query. I have a main
I wish to use sp_start_job to start a job from within an insert trigger

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.