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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:55:49+00:00 2026-06-02T23:55:49+00:00

I am new to Resteasy, I am calling a service and getting the response

  • 0

I am new to Resteasy, I am calling a service and getting the response successfully. I am able to print the response as well (which is the expected response).
ClientResponse<String> response= clientRequest.post(String.class);
System.out.println("response"+response.getEntity());

Console output is: response{"id":8,"displayName":"xyz_abc","roles":null, .....

But now I want to parse/map the response that I get from the service to a business object (like a User.java pojo) in client side application. I tried going through the docs but couldn’t comprehend much. I tried googling, again not much help there. Please help me achieve this.

Thanks

  • 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-02T23:55:51+00:00Added an answer on June 2, 2026 at 11:55 pm

    Finally found the answer,

    ClientResponse<String> response= clientRequest.post(String.class);

    Gson gson = new Gson();
    User user = gson.fromJson(response.getEntity(), User.class);

    This solved my problem.

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

Sidebar

Related Questions

My service side code is implemented using Resteasy @GET @Path(/ad-details/{query}) @Produces(application/json) public String getAdDetails(@PathParam(query)
I'm new to JAX-RS + RESTEasy What is impeding me is that the service
I am new to TorqueBox. I have created one RESTEasy app which is currently
I have this service with RESTeasy: @GET @Path(/{name}) @Produces(image/jpeg) public BufferedImage get(@PathParam(name) String name)
New to spring. I'm getting the following exception being caught: 2012-06-14 16:20:57,719 [http-8080-6] ERROR
I want to test my REST-Service using the RestEasy Client Framework. In my application
(New to Objective-C, but well versed in C/C++). Presently I have an Objective-C class
I am having a problem getting the Apache HttpClient to connect to a service
I want to test a class which calls a RESTEasy webservice. It seems Junit
I have written a resteasy-spring service : @Controller @RequestMapping(/abr/asd) @Path(/ab/ac) public class JobSchedulerService {

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.