Skip to content
Advertisement

Tag: jaxb

Apache CXF – ClassCastException on Creating a Dynamic Client

I’m attempting to utilize the Apache CXF library to create a dynamic client that will read a WSDL and parse it into Java objects for processing. The application into which this logic is being implemented has been built using Spring Boot 2.7 and JDK11. The JAR artifact runs on the embedded Tomcat container provided with Spring Boot. JDK11 has removed

Unable to add boolean value to contextProperties map of JAXBDataBinding in cxf beans xml

I am trying to set com.sun.xml.bind.treatEverythingNillable property to true as mentioned in document. But is throwing error. How can I set the com.sun.xml.bind.treatEverythingNillable to Boolean TRUE Object? https://cxf.apache.org/docs/jaxb.html Error Windows 10 + JDK8 + Tomcat 8.75 + JAXB 3.3.10 Answer Copy / pasting the answer from the ticket (https://issues.apache.org/jira/browse/CXF-8656). The problem is that you initialize this property with string value

Unmarshal SOAP response with CDATA in its body using JAXB

I am trying to unmarshal a SOAP respone using JAXB but without success. What I have so far are the model classes generated using an xsd and the following code which should unmarshal the response: Then I try to access the value of the <AnnahmeErfolgreich> element but instead of being true like in the response the object which unmarshaller gives

Use JAXB with plexus-compiler-eclipse plugin in maven profile

I am working on a project where we want to use the plexus-compiler-eclipse plugin during a Jenkins pipeline to check for increases in the number of warnings generated by the Eclipse compiler. We still want to use the javac compiler for the normal build and test stage, so I am trying to create a maven profile we can run during

JAXB – Unmarshalling of abstract classes (InstantiationException)

I know, that it might seem that this question is a duplicate of this one: InstantiationException during JAXB Unmarshalling (abstract base class, with @XmlSeeAlso concrete sub class) However, it is slightly different: We are using the maven-jaxb2-plugin to generate our Java-classes from xsd-files. You can find them here. In our pom we are using the following configuration (we are using

How to provide JAXB dependency via Gradle package?

TLDR: Which packages (and with which scopes) does one has to include for: using JAXB in a library using XJC in a library running tests in that library include the library as a dependency into another library without having JAXB related runtime errors Details: I’m working with JAXB and XJC with JDK 16 and Gradle. I created a project A

Using StringBuilder to write XML vs XML library

I already understand from reading different threads that generating your own XML string using a StringBuilder is looked down upon, but the reason usually comes down to escaping characters. I’d like to know if anyone is experienced with XML libraries and writing XML using StringBuilders and know if there is a big difference in performance to writing an XML which

Fixed length Validation using Javax api

request response can be validated using javax annotation. However, need some help to have fixed length validation, as @Size(min=3, max=3). It is having message that ‘size must be between 3 and 3’. This is required to be changed. Answer If you want to change the default @Size message just declare parameter message into:

Advertisement