cxf - NoSuchMethodError: Creating rest service -
i have written jax-rs service following auto created interface wadl configuration. landing following issue. can cause of error? service running single play object, path params not arrayofplay. able send arrayofplay server client facing trouble while sending client server.
@path("/play") public interface playservice { @post @consumes({"application/xml", "application/json" }) @produces({"application/xml", "application/json" }) @path("/post") response postupdate(arrayofplay arrayofplay); }
java.lang.nosuchmethoderror: javax.ws.rs.internalservererrorexception.validate(ljavax/ws/rs/core/response;ljavax/ws/rs/core/response$status;)ljavax/ws/rs/core/response; @ javax.ws.rs.internalservererrorexception.<init>(internalservererrorexception.java:126) @ org.apache.cxf.jaxrs.utils.specexceptions.tointernalservererrorexception(specexceptions.java:79) @ org.apache.cxf.jaxrs.utils.exceptionutils.tointernalservererrorexception(exceptionutils.java:106) @ org.apache.cxf.jaxrs.interceptor.jaxrsininterceptor.convertexceptiontoresponseifpossible(jaxrsininterceptor.java:226) @ org.apache.cxf.jaxrs.interceptor.jaxrsininterceptor.processrequest(jaxrsininterceptor.java:215) @ org.apache.cxf.jaxrs.interceptor.jaxrsininterceptor.handlemessage(jaxrsininterceptor.java:77) @ org.apache.cxf.phase.phaseinterceptorchain.dointercept(phaseinterceptorchain.java:307)
cxf version: 3.1.0
arrayofplay
@xmlaccessortype(xmlaccesstype.field) @xmltype(name = "", proporder = { "play" }) @xmlrootelement(name = "arrayofplay") public class arrayofplay implements serializable { private final static long serialversionuid = 1l; @xmlelement(name = "play", required = true) protected list<play> play; public list<play> getplay() { if (play == null) { play = new arraylist<play>(); } return this.play; } }
update: if send list instead of arrayofplay able make work. how represent list in wadl? current representation is:
<representation mediatype="application/xml" element="ns:arrayofplay"/>
Comments
Post a Comment