Skip to content
Advertisement

Tag: jaxb

How to exclude a direct dependency of a Maven Plugin

I want to exclude a direct dependency of a Maven plugin and the approach described in this answer does not work (as indicated by this comment). As a particular example: I still see javax.xml.bind:jaxb-api in the list of dependencies (with mvn … -X). What am I doing wrong? (In case someone has an idea for how to replace the dependency

Get progress information during JAXB de-/serialization

Is there a way to register some progress monitor on JAXB Marshaller and Unmarshaller? I would like to show some progress information in my GUI while data is de-/serialized. I see that you can set a Unmarshaller.Listener and Marshaller.Listener, which have a “before” and “after” method. Nevertheless, I do not see any straight forward way to get the total number

Could not find MessageBodyWriter for response object of type: java.util.ArrayList of media type: text/html – in Resteasy

I am developing RESTEasy Example. In this example I am using all latest dependencies and deploying om tomcat 8.x version. I can successfully deploy the application but when I am launching the url: http://localhost:8080/RESTfulExample/rest/restwebservice/list, I see following errors are coming. Please guide what is going wrong here. The code I developed so far for reference: pom.xml Student.java RESTEasyService.java RESTWebServiceJavaExample.java web.xml:

Marshalling LocalDate using JAXB

I’m building a series of linked classes whose instances I want to be able to marshall to XML so I can save them to a file and read them in again later. At present I’m using the following code as a test case: The XML output is: Is there a reason why the startDate element is empty? I would like

Convert Java object to XML string

Yes, yes I know that lots of questions were asked about this topic. But I still cannot find the solution to my problem. I have a property annotated Java object. For example Customer, like in this example. And I want a String representation of it. Google reccomends using JAXB for such purposes. But in all examples created XML file is

JAXB Mapping to JSON

I have written a JAX-RS (Jersey) REST Service, which accepts XML messages of ONIX XML format. Generally, I have generated all the required classes for JAXB binding from the given schema with xjc. There are more than 500 classes overall and I cannot modify them. Now, when I have a JAXB-mapped object, I need to store it to the database.

Is EclipseLink MOXy suitable for ridiculously huge XML files?

I’ve spent some enjoyable time with EclipseLink MOXy, figuring out the best way to parse XML into POJOs within Spring. I’ve now been given some XML to parse, and the files go up to a quite unbelievably 750MiB in size. Does EclipseLink MOXy use streaming tech underneath, or will it try to hold the whole document in memory? Answer Note:

JAXB generating JAXBElement instead of String

I am using Apache CXF cxf-codegen-plugin Maven plugin to generate sources from WSDL file. Problem is that I get JAXBElement<String> generated instead of String. I have added the jaxb-bindings.xml file which looks like this: This should prevent JAXB to generate JAXBElement<String>. But it is not working I still have JAXBElement<String> generated instead of String. My Maven plugin looks like this:

Advertisement