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
0
votes
1 answer

JAXB: Represent nested Model Group Schema Components with a java object hierarchy

Schema allows a designer to specify optional sequences of child elements as follows;
JFK
  • 1,527
  • 16
  • 21
0
votes
1 answer

JAXB moxy Error: Invalid parameter type encountered while processing external metadata via properties Map

I followed this example to implement moxy in my project. However I am getting the following error and have not been able to find a solution yet. Exception in thread "main" Local Exception Stack: Exception [EclipseLink-50019] (Eclipse…
GenerousJoker
  • 87
  • 1
  • 12
0
votes
1 answer

json recursive loop stackoverflow using jax-rs and jpa

I am getting objects in correct way but the JSON response is having recursive endless issues. entity @Entity public class ListItem { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; …
Mab
  • 181
  • 2
  • 3
  • 13
0
votes
1 answer

Need help on using Jersey 2.17 and moxy to handle XML any collection

Jaxb classes (provided, I cannot change them), FindResponse.java @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { }) @XmlRootElement(name = "findResponse") public class FindResponse { @XmlElement(required = true) …
H.Sheng
  • 171
  • 3
  • 12
0
votes
0 answers

How do you enable MOxy on WebSphere Liberty without breaking Glassfish?

Is there a way of creating an application using MOXy on WebSphere Liberty which uses Jackson and does not support JAXB by default for their JAX-RS implementation without breaking Glassfish or creating a separate build for WebSphere Liberty?
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
0
votes
2 answers

Validation is skipped when constraints are only in parent class

I am using MOXy as JAXB provider along with Bean Validation. I'm trying to validate a class where only parent fields are annotated with constraints. I can see that MOXy is skipping validation for this class, probably it is not looking into the…
smolarek999
  • 509
  • 1
  • 5
  • 21
0
votes
1 answer

Jersey incorrectly parsing json long

I'm using jersey to create a json/xml REST api. But I've encountered some strange behavior in Moxy. It seems to cut off a java long and round the value up when it is larger than a certain value. The primary key I use for the entity in question is:…
0
votes
1 answer

Moxy xmlbinding with virtual props having individual xml-path

Is it possible to have a Moxy xml-bindings oxm file for an object such as shown below. The object has a Map that is Keyed with name of the parameter, and Value would be a configured value. Each parameter has its own xml-path. The question is where…
0
votes
1 answer

MOXy - Force Single Element Arrays to be Objects

We have a Jersey 1.18 jax-rs service that used to use the jersey-json package for JSON support. We're attempting to migrate to use MOXy, but not break our JSON interface. Unfortunately jersey-json marshals single element lists as objects and…
Samuel
  • 16,923
  • 6
  • 62
  • 75
0
votes
3 answers

JSON to object in Java

I have the following JSON: { "book":{ "isbn" : "12356789", "title" : "Algorithm", "author" : [ "Cormen", "Rivest", …
user3449953
  • 43
  • 1
  • 8
0
votes
2 answers

MOXy order of fields in the target Java object matters when unmarshalling

It seems there is a bug in the MOXy. The piece of code below works perfectly when fields in class Request declared as metaInfo and then content, but test fails on unmarshalling with exception when fields declared in reverse order (content first and…
Sla
  • 91
  • 7
0
votes
1 answer

Jersey - Moxy returning appended json in class property

I have a Jersey client that makes a call to a 3rd party rest api and retrieves some JSON. {"A":1,"W":2,"List":[{"name":"John","amount":10.0}]} After that I need to append this JSON to my response class and give it back in the…
themonkey
  • 377
  • 1
  • 3
  • 9
0
votes
1 answer

Disable internal logging of MOXy (eclipselink)

For a project I'm using MOXy in order to (un)marshal XML files, and I have some problem with it that I didn't have with the standard jaxb engine. But here, I'll focus on a single issue: I want to disable the internal logging of eclipselink. For…
Tiller
  • 436
  • 1
  • 4
  • 22
0
votes
1 answer

MOXy null collections with @XmlElements doesn' work

I've created a ticket here that explains the issue I am experiencing https://bugs.eclipse.org/bugs/show_bug.cgi?id=460541 Essentially if we have an @XmlElementWrapper with @XmlElements then when unmarshalling if XML element is empty the setter on…
0
votes
1 answer

Null values for nested items unmarshalling in JAXB/MOXY

JAXB is unmarshalling the first elements encountered of each type in an XML document fine but leaving the children of any nested elements of the same type null. Briefly, the problematic structure is as…
John Baker
  • 89
  • 12