Java Web服务调用和泛型,奇怪的行为

Java Web服务调用和泛型,奇怪的行为,java,web-services,exception,generics,soap,Java,Web Services,Exception,Generics,Soap,我有一个web服务界面,如下所示: @WebService @SOAPBinding(style = SOAPBinding.Style.RPC) public interface MyWS<T> { @WebMethod Person getRow(int id); @WebMethod T insertRow(T a); } 奇怪,哈 发生了什么事?是发布的jar中的com.myproject.Person?是的。真奇怪!它不起作用。 Exce

我有一个web服务界面,如下所示:

@WebService
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface MyWS<T> {    
    @WebMethod Person getRow(int id);

    @WebMethod T insertRow(T a);    
}
奇怪,哈


发生了什么事?

是发布的jar中的
com.myproject.Person
?是的。真奇怪!它不起作用。
Exception in thread "main" javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
 - with linked exception:
[com.sun.istack.internal.SAXException2: class com.myproject.Person nor any of its super class is known to this context.
javax.xml.bind.JAXBException: class com.myproject.Person nor any of its super class is known to this context.]