简体   繁体   English

Websphere 7错误:无法为实现类生成WSDL定义

[英]Websphere 7 error: A WSDL Definition could not be generated for the implementation class

Excuse me for my english 对不起我的英语

I have an application that uses jax-ws and spring , it work on tomcat fine, but i should deploy it on Websphere 7 . 我有一个使用jax-wsspring的应用程序,它可以很好地处理tomcat,但我应该在Websphere 7上部署它。

WAS7 throws the following exception: WAS7抛出以下异常:

00000027 WSModuleDescr E WSWS7027E: JAX-WS Service Descriptions could not be correctly built because of the following error: javax.xml.ws.WebServiceException: WSWS7054E: The Web Services Description Language (WSDL) file could not be generated for the com.foo.MyEndpoint Web service implementation class because of the following error: java.lang.Exception: A WSDL Definition could not be generated for the implementation class: com.foo.MyEndpoint at com.ibm.ws.websvcs.wsdl.WASWSDLGenerator.generateWsdl(WASWSDLGenerator.java:230) 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)

my endpoint classes are: 我的端点类是:

@WebService(endpointInterface = "com.foo.MyService", targetNamespace = "http://www.foo.com/xsd")
public class MyEndpoint  implements MyService
{
...
}

and interface is: 和界面是:

@WebService(portName = "MyPort", serviceName = "MyService", 
  targetNamespace = "http://www.foo.com/xsd")
public interface MyService
{
...
}

Any idea what can cause that problem? 知道什么会导致这个问题吗? How to check, what exactly is wrong here? 如何检查,这里到底出了什么问题? The error message is too vague... 错误信息太模糊了......

I figure out that, i changed my classes like the following and it works. 我发现,我改变了我的类,如下所示,它的工作原理。

@WebService(targetNamespace = "http://www.foo.com/xsd")
public interface MyService
{
...
}

and endpoint class: 和端点类:

@WebService(endpointInterface = "com.foo.MyService", targetNamespace = "http://www.foo.com/xsd")
public class MyEndpoint  implements MyService
{
...
}

I just stumbled upon the same problem but with a different root cause. 我只是偶然发现同样的问题,但却有不同的根本原因。 Hope this will save someone a headache in the future: 希望这将在未来让人头疼:

I used a custom annotation (@MyAnnotation) in classes that were used inside an EAR deployment. 我在EAR部署中使用的类中使用了自定义注释(@MyAnnotation)。 This produced the abovementioned error while deploying. 这在部署时产生了上述错误。 After getting rid of the annotations, the error disappeared. 在删除注释后,错误消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM