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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:47:25+00:00 2026-06-09T08:47:25+00:00

I am using JAXB 2.0 for the Application Deveopment which is using RestFul Webservices

  • 0

I am using JAXB 2.0 for the Application Deveopment which is using RestFul Webservices .
Now there is a modification in the request , that is i will be getting another filed/variable in the request XML .

<Root Id="567" att="758" />   

Modified Request will be

 <Root Id="567" att="758" anotherfiledadded ="kiran" />   

My question is , is it possible to automatically append that field (anotherfiledadded)in the UserData class (Without modifying the UserData ??)

The below is my UserData class

@XmlRootElement(name = "Root")
@XmlAccessorType(XmlAccessType.FIELD)

public class UserData {

    @XmlAttribute
    private String Id;

    @XmlAttribute
    private String att;

// getters and setters 
  • 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-09T08:47:26+00:00Added an answer on June 9, 2026 at 8:47 am

    You can try adding the field at runtime with javassist. But… It looks like you would also require to add the Annotation @XmlAttribute and I don’t know if javassist allows you to add annotations… Anyways give it a try.

    See: Javassist Add

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

Sidebar

Related Questions

I have a Maven 2 RESTful application using Jersey/JAXB. I generate the JAXB beans
I am using jaxb for my application configurations I feel like I am doing
I am using JAXB XMLadapter to marshal and unmarshal Boolean values. The application's XML
I'm reading an xml file using Jaxb, now the contents of the xml file
I am using JAXB to marshall. I have noticed that when I am marshaling
I have an application that is running Jaxb 2.1.12. I am running JDK 1.5
I have a web service (built using jaxb/jaxws) that invokes a stateless EJB to
Using JAXB (2) is it possible to ensure that null values are not marshalled
I have an application doing XML<->conversions using Jaxb and automatically generated classes with maven-jaxb2-plugin.
I know using mvc:annotation-driven will give me that for free. But I'd like 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.