Questions tagged as 'jaxb'

3
answers

Serialize XML to REST API with Correct Accentuation

I'm creating a small REST read-only API service on a client's system. It uses Spring MVC to fulfill requests and the purpose of each request is to return a JSON with certain information to another system I am writing. To generate JSON, I'm us...
asked by 14.05.2014 / 09:20
2
answers

How to transform an XML Object in the specified format?

I would like to generate XML for a request that I will make in Java from an object. The XML I want to generate is as follows: <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <v:Envelope xmlns:v="http://sc...
asked by 08.08.2017 / 20:53
0
answers

JaxB Converting Abstract Class with Retrofit

I have a Core project where the User class exists @XmlSeeAlso(value = {UserClient.class, UserProfessional.class}) public abstract class User implements Serializable { UserProfessional class @Getter @XmlRootElement(name="professional") @Xm...
asked by 19.10.2018 / 06:33
1
answer

Error adding attribute name to @WebService

I am creating the class that implements the WS call and trying to include the name attribute, this error appears: "@WebService annotation contains an endpointInterface attribute. No name attribute allowed" Does anyone know why? If I remove...
asked by 22.09.2017 / 15:13
1
answer

Check if TAG XML exists

I am writing a code that reads data from an XML returned by hardware, but some TAG now has not and can not check the existence of it. Follow the code used to read the XML and use the data. public void lerXml(String xml) { Strin...
asked by 28.03.2016 / 20:21
0
answers

Problem to convert date to Brazilian standard using JAXB

I'm having trouble converting xml to object using JAXB. The date comes in Sun Jan 30 16:08:23 BRT 18 format, and I want to convert it to the Brazilian format 12-08-2009 16:08:23 . JAXB conversion class: public class DateAdapter...
asked by 15.02.2016 / 19:50
0
answers

How to generate an XML model from a SCHEMA XSD using JAXB?

I have a Schema .XSD and would like to generate an XML from this template. Below I have this code, however I am using the JLibs library. I wonder if it's possible to do something like the JAXB library. The XSD file is being passed as a parameter...
asked by 06.03.2015 / 15:51
2
answers

Difficulty in reading XML in Java

I'm trying to learn, and I'm having a hard time reading an XML catching via WEB and turning it into an object. There is a ready code in which it makes the connection to the site, and another that a friend has shown me that I should pass the XML...
asked by 28.09.2017 / 20:17
1
answer

XML parser error with JAXB

I'm trying to make a parser in an XML file provided by a WebService with open data from incumbent senators at Federal Senate The XSD file can be found directly by this link . This xsd does not specify a root element, but many roots element...
asked by 15.11.2018 / 17:05
0
answers

Maven goal jaxb2: xjc generating classes for wrappers tags

I have the following xml element: <experiment> <name>Experiment</name> <globalVars> <var> <name>foo</name> <value>bar</value> </var>...
asked by 02.11.2018 / 05:48