简体   繁体   中英

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 .

WAS7 throws the following exception:

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)

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. This produced the abovementioned error while deploying. After getting rid of the annotations, the error disappeared.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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