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

Ask*_*kar 5 java wsdl web-services jax-ws websphere-7

请原谅我的英语

我有一个使用jax-wsspring 的应用程序,它在 tomcat 上运行良好,但我应该将其部署在Websphere 7上。

WAS7 抛出以下异常:

00000027 WSModuleDecr E WSWS7027E:由于以下错误,无法正确构建 JAX-WS 服务描述:javax.xml.ws.WebServiceException:WSWS7054E:无法为 com.foo 生成 Web 服务描述语言 (WSDL) 文件。 MyEndpoint Web 服务实现类,因为出现以下错误:java.lang.Exception:无法为实现类生成 WSDL 定义: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
{
...
}
Run Code Online (Sandbox Code Playgroud)

接口是:

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

知道什么会导致这个问题吗?如何检查,这里到底出了什么问题?错误信息太模糊了...

Ask*_*kar 2

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

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

和端点类:

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