有没有一种方法可以防止将@WebService的endpointInterface属性中使用的接口的方法公开到Web服务中?我正在使用endpointInterface,因为这似乎是使该服务在带有Metro的JBoss上运行的唯一方法,不这样做会导致:javax.xml.ws.WebServiceException: Undefined port type 最佳答案 试图注释您不想公开为@WebMethod(exclude = true)的方法吗?