Web services 使用CXF封送和解封送

Web services 使用CXF封送和解封送,web-services,jaxb,jax-ws,cxf,Web Services,Jaxb,Jax Ws,Cxf,在我的服务器中,当客户端试图访问我的Web服务时,我收到此错误 Caused by: javax.xml.bind.JAXBException: hibernate.SBaraque is not known to this context at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:619) at com.sun.xml.bind.v2.runtime.Eleme

在我的服务器中,当客户端试图访问我的Web服务时,我收到此错误

Caused by: javax.xml.bind.JAXBException: hibernate.SBaraque is not known to this context at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:619) at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:145) ... 42 more 哪一个叫做DAO类

公共列表FindByProperty(字符串arg1,对象值1){
//TODO自动生成的方法存根
System.out.println(“findbyproperty-DAO-IN”);
返回getSession().createQuery(“从SBaraque,其中“+arg1+”=?”).setParameter(0,Value1.list();
}
这是我的界面:

@WebService
公共接口服务{
公共作废保存(@webgram(name=“object”)object obj);
公共作废修改(@webgram(name=“object”)object obj);
公共作废删除(@webgram(name=“object”)object obj);
@WebResult(name=“listes”)
公共列表findAll();
@WebResult(name=“object”)
公共对象findById(@WebParam(name=“id”)整数id);
@WebResult(name=“listes”)
公共列表FindBylistProperty(@WebParam(name=“arg1”)字符串arg1,
@WebParam(name=“Value1”)对象值1,
@WebParam(name=“arg2”)字符串arg2,
@WebParam(name=“Value2”)对象值2;
@WebResult(name=“listes”)
公共列表FindByProperty(@WebParam(name=“arg1”)字符串arg1,
@WebParam(name=“Value1”)对象值1;
@WebResult(name=“listes”)
公共列表findBySQLRequest(@WebParam(name=“request”)字符串请求);
@WebResult(name=“listes”)
公共列表findByHQLRequest(@WebParam(name=“request”)字符串请求);
}   

您可能需要添加一个@xmlsee注释,该注释将指向服务将接受和返回的所有可能类。否则,JAXB对它们一无所知