[英]Lombok and Web services: A WSDL Definition could not be generated for the implementation class
[英]Websphere 7 error: A WSDL Definition could not be generated for the implementation class
對不起我的英語
我有一個使用jax-ws和spring的應用程序,它可以很好地處理tomcat,但我應該在Websphere 7上部署它。
WAS7拋出以下異常:
00000027 WSModuleDescr E WSWS7027E:由於以下錯誤,無法正確構建JAX-WS服務描述:javax.xml.ws.WebServiceException:WSWS7054E:無法為com.foo生成Web服務描述語言(WSDL)文件。 MyEndpoint Web服務實現類,因為以下錯誤:java.lang.Exception:無法為實現類生成WSDL定義:com.ibm.ws.websvcs.wsdl.WASWSDLGenerator.generateWsdl(WASWSDLGenerator)中的com.foo.MyEndpoint的.java:230)
我的端點類是:
@WebService(endpointInterface = "com.foo.MyService", targetNamespace = "http://www.foo.com/xsd")
public class MyEndpoint implements MyService
{
...
}
和界面是:
@WebService(portName = "MyPort", serviceName = "MyService",
targetNamespace = "http://www.foo.com/xsd")
public interface MyService
{
...
}
知道什么會導致這個問題嗎? 如何檢查,這里到底出了什么問題? 錯誤信息太模糊了......
我發現,我改變了我的類,如下所示,它的工作原理。
@WebService(targetNamespace = "http://www.foo.com/xsd")
public interface MyService
{
...
}
和端點類:
@WebService(endpointInterface = "com.foo.MyService", targetNamespace = "http://www.foo.com/xsd")
public class MyEndpoint implements MyService
{
...
}
我只是偶然發現同樣的問題,但卻有不同的根本原因。 希望這將在未來讓人頭疼:
我在EAR部署中使用的類中使用了自定義注釋(@MyAnnotation)。 這在部署時產生了上述錯誤。 在刪除注釋后,錯誤消失了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.