Hello, I have this property in a POJO that is used in a web method:
@XmlJavaTypeAdapter(HoursAdapter.class)
public Hours getTotalEffort() {
return this.totalEffort;
}
the corresponding HoursAdapter looks like this:
public class HoursAdapter extends XmlAdapter<Integer, Hours> {
@Override
public Hours unmarshal(Integer i) throws Exception {
return Hours.hours(i);
}
@Override
public Integer marshal(Hours i) throws Exception {
return i.getHours();
}
}
I get a marshalling error upon marshaling response at the end of execution
of web method:
DEBUG Invoking handleMessage on interceptor
org.apache.cxf.interceptor.BareOutInterceptor@eccef1
DEBUG Invoking handleFault on interceptor
org.apache.cxf.interceptor.BareOutInterceptor@eccef1
...
DEBUG Invoking handleFault on interceptor
org.apache.cxf.ws.policy.PolicyOutInterceptor@4e40da
WARN Interceptor for
{http://.../SchedulerService}SchedulerService#{http://.../}processSchedule
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Marshalling Error: class
org.joda.time.Hours nor any of its super class is known to this context.
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:261)
at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:169)
at ...
Could anyone give me hint on how to fix this. I attempted @XmlSeeAlso with
no success since I get compilation error that org.joda.time.Hours has no
default parameterless constructor.
thanks
fahman
--
View this message in context:
http://cxf.547215.n5.nabble.com/Marshalling-error-on-org-joda-time-Hours-tp5711707.html
Sent from the cxf-user mailing list archive at Nabble.com.