jaxb2 Questions
4
Solved
If there is a way, how to do this, I'd like to know the most elegant one.
Here is the question:
- Let's assume you have an abstract class Z
- You have two classes inherited from Z: named A and B.
...
1
Solved
When I use @XmlSchema(attributeFormDefault = XmlNsForm.QUALIFIED, ...)
or@XmlAttribute(namespace = "sample.com/y", ...)
JAXB ignores @XmlSchema(namespace = "sample.com/x", ...)
and instead of:
...
1
Solved
I have a bunch of JAXB annotated classes that have a field in common, so I moved that field to a super class, like this
public class Base {
protected SomeType commonField;
}
@XmlRootElement(name...
1
I am trying to implement logging aspect into my application. This is the first time I am attempting AOP, so please let me know if I am missing something obvious. In order to achieve weaving externa...
Ics asked 13/7, 2011 at 16:13
3
Solved
I'm using Java 6, JaxB 2 and SpringSource Tool Suite (same as Eclipse). I had a couple of Java classes I wrote, from which I used JaxB to generate an XML schema. However, I'm noticing in order to u...
2
Solved
I have been trying to get exception handling working in my simple Spring 3 based ReST web services. Based on everything I have seen, there is a bug that prevents this from working automatically wit...
2
I have this situation
@XmlType(name ="", propOrder={"value"})
@XmlRootElement(name = "compound")
public class Compound extends Value {
@XmlElements({
@XmlElement(name="simple", type=Simple.class...
Peasant asked 21/5, 2011 at 22:40
1
Solved
I have this bean
@XmlRootElement
class Test {
boolean someValue;
List<Field> fields;
}
I would like to serialize it as
<fields>
<field>
<name>someValue</name>
...
2
Solved
I want to implement a method which returns JAXBElement following is the code
@XmlRootElement(name = "history")
@XmlAccessorType(XmlAccessType.FIELD)
public class IBHistoryInfo {
@XmlElement(name...
4
Solved
I am looking to convert a class that looks like this ...
public class Amenity {
public String id;
public String value;
}
into the following XML using JaxB annotations:
<amenity id="id-stri...
Clary asked 30/9, 2009 at 3:57
3
Solved
I'm switching from Castor to JAXB2 to perform marshaling/unmarshaling between XML and Java object. I'm having problem trying to configure a collection of polymorphic objects.
Sample XML
<proje...
2
Solved
I am working with Jaxb 2.x and was trying to validate XML document with the given XSD using the following tutorial
Tutorial Link
hers is the code i have written
unmarshaller.setSchema(schema);
...
Suspense asked 1/2, 2011 at 15:47
2
Solved
I am using JAXB on a project. the attraction of JAXB is that it is bundled with the JDK, I have been to use xjc.exe on the command line to generate the .java files from a schema. I can't seem to fi...
1
Solved
I'm trying to learn to use Map with Jaxb.
I did this:
@XmlElementWrapper(name = "phoneNumbers", nillable = true)
private Map<String, PhoneNumber> phoneNumbers;
and the result was:
<xs...
1
Solved
I'm implementing a homebrew subprotocol of XMPP, and i'm using combination of StAX and JAXB for parsing/marshalling mesages. And when I marshall a message I end up with loads of unneded namespace d...
Rubalcava asked 4/11, 2009 at 13:0
© 2022 - 2024 — McMap. All rights reserved.