wyona/yanel — Issue #2: Upgrade to MOXy 2.3.0
Author: baszero
Created: 2011-10-12 08:41:34+00:00
State: open

**Request**:
Yanel currently has a [dependency](https://github.com/wyona/yanel/blob/master/src/build/dependencies.xml#L39) to the JAXB Implementation MOXy v2.1.2, which does not support CDATA element values.

I just successfully tested with version 2.3.0 and the new annotation works great.

So would it be possible that Yanel is upgrading to the new version? Would be awesome! Thanks.

**Prepared files, JAR and POM**:

https://github.com/baszero/zgmaven/tree/master/snapshots/org/eclipse/persistence/org.eclipse.persistence.antlr/2.3.0
https://github.com/baszero/zgmaven/tree/master/snapshots/org/eclipse/persistence/org.eclipse.persistence.asm/2.3.0
https://github.com/baszero/zgmaven/tree/master/snapshots/org/eclipse/persistence/org.eclipse.persistence.core/2.3.0
https://github.com/baszero/zgmaven/tree/master/snapshots/org/eclipse/persistence/org.eclipse.persistence.moxy/2.3.0

**Code examples**:

Data Object:

```java
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name=DialogMessage.ROOTNAME, namespace="XYZ")
public class DialogMessage {

@XmlTransient
public static final String ROOTNAME = "dialog";

@XmlElement(name="content-html", namespace=ZGXMLHelper.ZWISCHENGAS_NS)
@XmlCDATA
private String contentHTML = null;

public String getContentHTML() {
return contentHTML;
}

public void setContentHTML(String contentHTML) {
this.contentHTML = contentHTML;
}

}
```

in the package folder where the data object is: ```package-info-java```:

```html
@javax.xml.bind.annotation.XmlSchema(
namespace = "XYZ",
xmlns = {@javax.xml.bind.annotation.XmlNs(prefix = "z", namespaceURI ="XYZ")},
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package com.xyz;
```

and the ```jaxb.properties``` file to enable MOXy:

```
javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory
```