【问题标题】:Websphere 7 error: A WSDL Definition could not be generated for the implementation classWebsphere 7 错误:无法为实现类生成 WSDL 定义
【发布时间】:2014-01-13 14:22:13
【问题描述】:

对不起,我的英语不好

我有一个使用 jax-wsspring 的应用程序,它可以在 tomcat 上正常工作,但我应该将它部署在 Websphere 7 .

WAS7 抛出以下异常:

00000027 WSModuleDescr E WSWS7027E:由于以下错误,无法正确构建 JAX-WS 服务描述: javax.xml.ws.WebServiceException: WSWS7054E: Web 服务 无法为 com.foo.MyEndpoint Web 服务实现类因为 出现以下错误:java.lang.Exception: A WSDL Definition could not be 为实现类生成:com.foo.MyEndpoint at com.ibm.ws.websvcs.wsdl.WASWSDLGenerator.generateWsdl(WASWSDLGenerator.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
{
...
}

知道什么会导致这个问题吗?如何检查,这里究竟有什么问题?错误信息太模糊了……

【问题讨论】:

  • 我认为是环境问题。我用谷歌搜索发现theseissues
  • 我之前看过这个页面,我们的管理员说,这些Fix Packs已经安装在了。
  • 日志中是否还有其他提示问题的错误消息?如果没有,我建议与 IBM 开一个 PMR; WSWS7027E 错误消息令人费解。

标签: java web-services wsdl jax-ws websphere-7


【解决方案1】:

我发现,我像下面这样更改了我的课程并且它有效。

@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
{
...
}

【讨论】:

    【解决方案2】:

    我只是偶然发现了同样的问题,但根本原因不同。希望这会在将来避免某人头疼:

    我在 EAR 部署中使用的类中使用了自定义注释 (@MyAnnotation)。这在部署时产生了上述错误。去掉注解后,错误就消失了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-07
      • 2017-02-05
      • 2015-01-23
      相关资源
      最近更新 更多