Questions tagged [jaxb2]

For issues relating to the JAXB XML binding architecture, version 2.

Java Architecture for XML Binding (JAXB) is the Java standard (JSR-222) for working with XML as domain objects. It provides an easy to use mechanism for mapping Java classes to XML representations. An implementation is included as part of the Java SE 6 API. There are several implementations available including Metro JAXB (the reference implementation), EclipseLink MOXy, and JaxMe.

741 questions
0
votes
1 answer

jaxb inheritance, unmarshalling cause nullpointerexception

I have an ElectivePolicy abstract class which has two subclasses, PackagedElectivePolicy and SimpleElectivePolicy. for mapping this inheritance relationship I've use typeAdapter and as I checked it the unmarshal method gets called and works well but…
0
votes
1 answer

Multiple related schemas using jaxb2

I'm using jaxb2 for a rest webservice. I need to use two schemas. One is my own schema, stored in the src/main/resources/schema folder, and another schema, which is an online schema http://mypage.com/1/meta/schema.xsd. The problem is that both…
Nacho321
  • 1,911
  • 7
  • 33
  • 55
0
votes
1 answer

javax.servlet.ServletException: Unable to locate object to be marshalled in model

I've looked around bit but can't figure out what am I missing trying to get xml view of result. Following is the exception I am getting: javax.servlet.ServletException: Unable to locate object to be marshalled in model:…
skip
  • 12,193
  • 32
  • 113
  • 153
0
votes
1 answer

maven-jaxb2-plugin deletes classes right after build

I am trying to generate some classes with the maven-jaxb2 plugin. But a few seconds after every build the classes are deleted out of the target/generated-resources folder (but they are still in the target/classes/... folder) Here is the…
chresse
  • 5,486
  • 3
  • 30
  • 47
0
votes
1 answer

CXF Web service plus JAXB generated classes from another jar?

I have a java archive, schema.jar, containing classes generated from an XSD using xjc. I need to create a CXF web service (jax-ws) with web methods that create and return objects from the set of generated classes in schema.jar. I have tried with CXF…
Matt
  • 526
  • 6
  • 19
0
votes
3 answers

JAXB/xjc: Generate classes from child elements and load them based on class types

I have a configuration file in XML, which looks something like:
Charles A
  • 404
  • 3
  • 10
0
votes
1 answer

MOXy generating readable XML

I would like to know if there is a convenient way to customize the output xml of MOXy? Specifically, in some classes I would like to print the attributes in separate lines. For example:
0
votes
1 answer

JAXB2 annotations: troubles rendering a value in a list

Ihave some issues trying to render the following xml code with JAXB2 annotations: .... http://transaction.acme.com/po/54847