11.07.2015 Views

Anyframe CXF JAX-WS Plugin

Anyframe CXF JAX-WS Plugin

Anyframe CXF JAX-WS Plugin

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DatabindingWhen performing marshalling/unmarshalling in XmlAdapter class developed above, <strong>CXF</strong>Map classused must also be additionally developed. If map type is not used, there is no need todevelop this. The following is a part of <strong>CXF</strong>Map.java developing <strong>CXF</strong>Map class. Developers useanyframe.common.cxf.map.<strong>CXF</strong>Map class provided by <strong>Anyframe</strong>, without needing without specialimplementation.@XmlType(name = "<strong>CXF</strong>Map")@XmlAccessorType(XmlAccessType.FIELD)public class <strong>CXF</strong>Map {@XmlElement(nillable = false, name = "entry")private List entries = new ArrayList();public List getEntries() {return entries;}@XmlAccessorType(XmlAccessType.FIELD)@XmlType(name = "Identified<strong>CXF</strong>")static class <strong>CXF</strong>Entry {// Map keys cannot be null@XmlElement(required = true, nillable = false)private String key;private Object value;3.1.2.Notespublic String getKey() {return key;}public void setKey(String key) {this.key = key;}public Object getValue() {return value;}public void setValue(Object value) {this.value = value;}...Notes when accessing method exposed to Web Services using <strong>JAX</strong>B Databinding.3.1.2.1.When databinding is needed in Java Type classundefined in SEI class during runtimeIn case of Java Type class which was not referred to as input value or return value of the method definedin SEI class, the following error message appears during databinding at runtime.org.apache.cxf.interceptor.Fault: Marshalling Error: class anyframe.sample.domain.Movie nor any of itssuper class is known to this context.The problem is solved as below.• Interface ClassIf method that returns List-type return value from SEI (Service Endpoint Interface) class methodexists and Java Type class saved in the related List is not referred to, when client calls the method,14

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!