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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:15:44+00:00 2026-06-09T12:15:44+00:00

I have a rest enabled web service exposed which returns RETURN_OBJ . However, RETURN_OBJ

  • 0

I have a rest enabled web service exposed which returns RETURN_OBJ.

However, RETURN_OBJ in itself contains several complex objects like list of objects from other class, maps, etc.

In such a case, will annotating the participating classes with @XmlRootElement and annotating web service with @Produces("application/json") enough?

Because just doing it is not working and I am getting no message body writer found for class error.

What is the reason, cause and solution for this error?

  • 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-09T12:15:45+00:00Added an answer on June 9, 2026 at 12:15 pm
    @XmlRootElement
    

    You need to use a libary with json annotations instead of xml annotations. ex: jackson (http://jackson.codehaus.org/). You can try to use a xml writer to write json.

    @Produces("application/json")
    

    When the classes are annotated with the json annotations, json will be returned.

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

Sidebar

Related Questions

I am Making an Iphone application which is web-service enabled. Also I have skeleton
I have an AJAX Enabled REST Web Service self hosted at http://localhost/machinename/ and a
I have a REST service that returns a JSON like this: [{@id:123,name:Name}] and I'm
I have a REST service for which I have a WADL file. I want
I'm invoking a REST service via http which returns a stream as the response.
I have a WCF 4.0 REST service. If I enable automaticFormatSelectionEnabled in the web.config
I have to make a rest web service call from my ios app, earlier
I am working on a web service for which we have already developed apps
I have created a simple Northwind's Product REST Web Service in WCF at /Northwind/Product
I have a REST api with Gzip compression enabled, it's developed using the ASP.net

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.