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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:00:38+00:00 2026-06-12T18:00:38+00:00

Tech Stack: Java 1.6, JAXB, Spring 3, JAX-RS (RESTEasy), XSD Hello, I am using

  • 0

Tech Stack: Java 1.6, JAXB, Spring 3, JAX-RS (RESTEasy), XSD

Hello,

I am using Spring with JAX-RS to create RestFul Webservice.

Everything is working fine except that the generated responses contain the setters info e.g.

  {
    ...

    "setName": true,
    "setId": true,
    "setAddress": true,
    "setAge": true,
}

I don’t know what might be causing this?
How can I turn this off?

Adi

UPDATE 1:

The PersonRequest class is generated by the JAXB and contains all the javax.xml.bind.annotation.* annotations.

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "personResponse " })
@XmlRootElement(name = "PersonResponse ")
public class PersonResponse {

    @XmlElement(name = "Name", required = true)
    protected String name;

    @XmlElement(name = "Id", required = true)
    protected String id;

    // and the setters and getters



}

and the Resource looks like this:

@Component
@Path("/person")
public class PersonImpl implements Person {

    @Override
    @GET
    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, "application/x-amf" })
    @Path("v1")
    public PersonResponse getPerson() {

       ....
       ....
    }


}

** UPDATE 2 **
This happens only when Content-Type is json, in case of Content Type as ‘xml’, the setters are not returned. If that helps.

  • 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-12T18:00:39+00:00Added an answer on June 12, 2026 at 6:00 pm

    Problem was in the xjb file, for details look in the related question here.

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

Sidebar

Related Questions

Tech Stack : Java 1.6, JPA (Hibernate 3), Spring 3, Oracle 11g, JAX-RS (RESTEasy)
Tech Stack: Java 1.6, JPA (Hibernate 3), Spring 3, Oracle 11g Hello, We are
We're using Gherkin, Cucumber-jvm and Webdriver to run acceptance tests against a standard Java/Spring
I'm using Hi-Tech C compiler and wish to use Scons to build my projects.
I followed these instructions: http://proteus-tech.com/blog/cwt/install-pil-in-snow-leopard/ And everything went as described. However, at the end,
I tried this tutorial http://tech.cibul.net/install-maxminds-geoip-ip-database-on-ubuntu-for-php/ and did everything from it. Compiled the geoip module
I am using MPLABx and the HI Tech PICC compiler. My target chip is
The tech stack looks like this: Django frontend and backend Celery worker queue for
So I just started digging into web tech, and I'm stuck on the concept
Tech used: PHP 5.3.10 Hi, I have an array (example below) I need to

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.