web services - marshal and unmarshal with CXF -
in server when client attempt access webservice error
caused by: javax.xml.bind.jaxbexception: hibernate.sbaraque not known context @ com.sun.xml.bind.v2.runtime.jaxbcontextimpl.getbeaninfo(jaxbcontextimpl.java:619) @ com.sun.xml.bind.v2.runtime.elementbeaninfoimpl$1.serializebody(elementbeaninfoimpl.java:145) ... 42 more
this error show when client try call methode :
@webresult(name="listes") public list findbypropery(@webparam(name="arg1") string arg1, @webparam(name="value1") object value1); which call dao class
public list findbypropery(string arg1, object value1) { // todo auto-generated method stub system.out.println("findbypropery dao in"); return getsession().createquery("from sbaraque "+arg1+" = ?").setparameter(0, value1).list(); } this interface :
@webservice public interface interfaceservice { public void save(@webparam(name="object") object obj); public void modify(@webparam(name="object") object obj); public void delete(@webparam(name="object") object obj); @webresult(name="listes") public list findall(); @webresult(name="object") public object findbyid (@webparam(name="id") integer id); @webresult(name="listes") public list findbylistpropery(@webparam(name="arg1") string arg1, @webparam(name="value1") object value1, @webparam(name="arg2") string arg2, @webparam(name="value2") object value2); @webresult(name="listes") public list findbypropery(@webparam(name="arg1") string arg1, @webparam(name="value1") object value1); @webresult(name="listes") public list findbysqlrequest(@webparam(name="request") string request); @webresult(name="listes") public list findbyhqlrequest(@webparam(name="request") string request); }
you need add @xmlseealso annotation point possible classes service accept , return. otherwise, jaxb not know them.
Comments
Post a Comment