在我的服务器中,当客户端尝试访问我的网络服务时,我收到此错误
引起:javax.xml.bind.JAXBException:hibernate.SBaraque 对此上下文不知道 在 com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:619) 在 com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:145) ... 42 更多
当我的客户尝试调用此方法时显示此错误:
@WebResult(name="listes")
public List findByPropery(@WebParam(name="arg1") String arg1, @WebParam(name="Value1") Object Value1);
调用 DAO 类
public List findByPropery(String arg1, Object Value1) {
// TODO Auto-generated method stub
System.out.println("findByPropery DAO IN");
return getSession().createQuery("from SBaraque where "+arg1+" = ?").setParameter(0, Value1).list();
}
这是我的界面:
@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);
}