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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:08:13+00:00 2026-05-13T17:08:13+00:00

For bean->xml convertion in webservices we use Aegis from CXF (it is jaxb-compatible, as

  • 0

For bean->xml convertion in webservices we use Aegis from CXF (it is jaxb-compatible, as I understand).

This is my type:

class C{
private int a;
private int b;
private T t;
...
}

class T{
private int t1;
private int t2;
}

I need t.t1 field to be on the same level in XML as a and b in C (bean restored from xml should be like this:

class C{ 
private int a; 
private int b;
private int t1 
}

(client code is interested only in field t1 from structure T).
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-05-13T17:08:14+00:00Added an answer on May 13, 2026 at 5:08 pm

    You could add getT1() and setT1(int) to C and make getT() @XmlTransient

    class C {
      // snip
    
      /**
       * JAXB only
       */
      @SuppressWarnings("unused")
      @XmlElement
      private void setT1(int t1) {
        if(t != null) {
          t.setT1(t1);
        } else {
          // TODO
        }
      }
    
      /**
       * JAXB only
       */
      @SuppressWarnings("unused")
      private int getT1() {
        if(t != null) {
          return t.getT1(t1);
        } else {
          // TODO
        }
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this in my applicationContext.xml <bean class=org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter /> <mvc:annotation-driven conversion-service=conversionService/> <bean id=conversionService class=org.springframework.context.support.ConversionServiceFactoryBean>
I need to populate a JAX Bean from XML, however there is no setter
is springdoclet use to generate bean defination xml files? servlet-config.xml..etc ? i trying to
I read a bean code under spring-app.xml <bean id=mySessionFactory class=org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean> <property name=dataSource ref=myDataSource />
Error creating bean with name 'sessionFactory' defined in class path resource [ApplicationContext.xml]: Invocation of
I have such xml: <bean id=conversionService class=org.springframework.context.support.ConversionServiceFactoryBean> <property name=converters> <list> <bean class=converters.AddressToStringConverter /> <bean
I'm trying to do this (code) in old school xml. @Bean @Scope(value=request, proxyMode=ScopedProxyMode.INTERFACES) public
I have something like that: faces-config.xml <managed-bean> <managed-bean-name>aBean</managed-bean-name> <managed-bean-class>some.pack.Bean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> I have a
PersistenceHelper-context.xml <bean id=dataSource class=org.springframework.jdbc.datasource.DriverManagerDataSource> <!----> <property name=driverClassName value=org.hsqldb.jdbc.JDBCDriver/> <property name=url value=jdbc:hsqldb:mem:mydb/> <property name=username value=sa/>
I have pasted Hibernate 3 configuration file , SessionFactory class to configure this config.xml

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.