Questions tagged as 'jaxb'

1
answer

IllegalAnnotationsException error when printing XML

When I print in XML the data ( nombrep and especialidad ) of the class Profesor I get the error that it has two properties with the same name " especialidad " and two others with " nombrep ". Does anyone know...
asked by 09.11.2018 / 15:48
1
answer

Exception using Jaxb to build CDATA from my own bean

I have a problem trying to build a CDATA-XML from a created bean, the idea of the extends is that any bean can be converted since there will be several "templates" this is the code: Bean: TemplateGenerica public class PlantillaGenerica ex...
asked by 16.04.2017 / 17:34
0
answers

Java JAXB escape special characters in hexadecimal

I'm trying to escape special characters for a request in XML using Marshaller from JAXB and I need the values to arrive at destination with the escape in hexadecimal. The problem is that it does in decimal, I already tried several charset and...
asked by 24.10.2018 / 18:35
0
answers

(JAXB) Retrieve the XML file in the input fields of the JSwing form with unmarshalling

I am new and started those days to learn XML for an implementation that must have in my application, I already made some tests with marshall() and unmarshall() already in Main() to understand more, I'm doing a form that you...
asked by 11.04.2017 / 19:54
2
answers

Read XML file

I have the following program: package exercici3; import java.util.ArrayList; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * * @author Montse */ @...
asked by 28.09.2017 / 12:39
1
answer

Mapping xml to Java Objects - Null Pointer in Class

I'm trying to map an xml to Java classes. It turns out that I get an xml input, and I need to break it down in classes. INPUT XML: <empleado> <nombre>juan</nombre> <segundo_nombre>pablo</segundo_nombre> &...
asked by 23.07.2018 / 19:17
0
answers

UNMARSHALLER ERROR WHEN READING AN XML FILES

CODE: // We create the context indicating the root class in this case Universidad.java JAXBContext context = JAXBContext.newInstance(Universidad.class); //Creamos el Marshaller, convierte el java bean en una cadena XML Marshaller...
asked by 11.11.2018 / 12:24
1
answer

Why do I change the order of the JSON with JAXB?

I am developing an API Rest with Jersey and I am using JAXB and with the annotation @XmlRootElement @XmlRootElement public class Car { private int idCar; private String model; private String color; public Car() { }...
asked by 08.11.2018 / 22:50