Questions tagged [moxy]

MOXy is the object-to-XML and object-to-JSON component of EclipseLink. It is a JAXB (JSR-222) implementation with extensions for supporting: XPath based mapping, JPA entities, and infoset preservation.

MOXy is the object-to-XML and object-to-JSON component of EclipseLink. It is a JAXB (JSR-222) implementation with extensions for supporting: XPath based mapping, JPA entities, and infoset preservation.

868 questions
6
votes
1 answer

Issue with Eclipselink and @XmlRef

I am using Eclipselink 2.3.2 as my JAXB (JSR-222) provider. I have created a generic list which consists of a list of items and a set of Pagination Links. import java.util.List; import javax.xml.bind.annotation.*; @XmlRootElement(name =…
6
votes
2 answers

How to set namespace aware to false?

I'm trying to parse some XML with EclipseLink MOXy, and it's failing on the line with the xsi attribute. If I remove this, it parses fine. However, I've got 100GiB of XML to wade through and changing the source files is not an option. It's been…
DeejUK
  • 12,891
  • 19
  • 89
  • 169
6
votes
3 answers

JAXB outputting invalid XML when data contains non-displayable chars

I'm using JAXB 2.2.5 to output Xml from a JAXB Model, the data is populated from the database and occasionally the database contains non-displayable characters that it should not such as 0x1a If it does then JAXB outputs invalid Xml by just…
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
6
votes
1 answer

Ignoring DTDs when unmarshalling with EclipseLink MOXy

When trying to unmarshall some XML into a POJO using EclipseLink MOXy I'm getting a FileNotFoundException where it's looking for the document's DTD as a relative path. Exception in thread "main" org.springframework.oxm.UnmarshallingFailureException:…
DeejUK
  • 12,891
  • 19
  • 89
  • 169
6
votes
1 answer

JAXBContext, jaxb.properties and moxy

The jaxb.properties needs to be in the same package as the domain classes you are creating the JAXBContext on. I am using Moxy's xml driven configuration since I doesn't want to use annotations or XJC generated objects. I have an existing domain…
Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
5
votes
2 answers

How to POST JSON request to a Jersey REST service?

I can successfully post XML data to my service, but, trying to do the same using JSON is failing. The POJO is: @XmlRootElement public class Address { String city; String zip; //Getters & setters... } The service resource…
RajV
  • 6,860
  • 8
  • 44
  • 62
5
votes
1 answer

XmlAdapter and XmlIDREF in moxy jaxb

I am trying to use MOXy JAXB to serialize a class A which looks like: @XmlAccessorType(XmlAccessType.NONE) @XmlRootElement public class A { private Map fooBar = new HashMap(); private Set foos = new HashSet(); …
Kasper Nielsen
  • 191
  • 1
  • 7
5
votes
1 answer

JAXB: Qualified attributes disables default namespace xmlns=""?

When I use @XmlSchema(attributeFormDefault = XmlNsForm.QUALIFIED, ...) or@XmlAttribute(namespace = "sample.com/y", ...) JAXB ignores @XmlSchema(namespace = "sample.com/x", ...) and instead of:
Ali Shakiba
  • 20,549
  • 18
  • 61
  • 88
5
votes
1 answer

Is there a possibility to hide the "@type" entry when marshalling subclasses to JSON using EclipseLink MOXy (JAXB)?

I'm about to develop a JAX-RS based RESTful web service and I use MOXy (JAXB) in order to automatically generate my web service's JSON responses. Everything is cool, but due to the fact that the web service will be the back-end of a JavaScript-based…
Philipp T.
  • 51
  • 2
5
votes
1 answer

How to generate Java from an XSD using MOXy under Maven-3?

What's the easiest/best way to generate Java from an XSD using MOXy under Maven-3? The reference JAXB interface has a nice Maven plugin, but it doesn't appear to support MOXy. Does anyone have anything concrete to offer? (I know I can write…
Ed Staub
  • 15,480
  • 3
  • 61
  • 91
5
votes
1 answer

MOXy @XmlPath ignored

I have a very simple class with two fields, String sourceAddress and int port. I want them to be mapped on the source/address and source/port nodes instead of the jaxb default sourceAddress and sourcePort. So i use MOXy @XmlPath annotation. The…
AgostinoX
  • 7,477
  • 20
  • 77
  • 137
5
votes
1 answer

How to replace jackson for moxy on payara 5

I read a lot about how to replace jackson for moxy on payara 5 but never achieve a good solution, so I create a small project and hope that someone can help me. pom.xml javax
tiagomistral
  • 143
  • 8
5
votes
1 answer

EclipseLink-Moxy Unable to load custom DomHandler class while instantiating JAXB context

I am using Eclipselink Moxy Implementation of JAXB in my project to map complex XML to String Object using XmlAnyElement. For this I have implemented DomHandler named as LayoutHandler. I am using JAXB for resteasy web services deployed in JBoss…
Murli
  • 1,258
  • 9
  • 20
5
votes
2 answers

Jpa entities over a JAX WS services without infinite loop

How can I send JPA generated entities over an JAX WS web service without getting the an XML infinite cycle exception because of the cycle of references in those entities? Any idea? I found this MOXy that can do it...partially. But i already have…
Andr
  • 617
  • 2
  • 9
  • 24
5
votes
2 answers

Is it possible to map a JSON object to a string with Moxy?

Suppose I have a data model like: public class MyModel { private String someString; private String someJson; // Data structure owned by client, persisted as a CLOB } I'm serving the model via a REST API (Jersey) to a client. I know that I…
Eric
  • 5,842
  • 7
  • 42
  • 71