我有一个简单的web服务,如下所示
/**
* Test web service
*/
@Stateless
@WebService
public class HelloWorldWebService {
/**
* Greets the user by appending 'Hello' before the name
*/
@WebMethod
public String doWork(String name){
return "Hello " + name + " !";
}
}有没有办法(使用注释或其他方式)向Web服务或Web方法添加注释,以便当第三方调用(或检查WSDL)时,有描述web服务、其方法和参数的注释/文档;非常类似于后来包含在java文档中的注释。
我认为这是.NET web服务的possible (最后一条评论),但在Java web服务中不是很确定。
发布于 2010-09-02 22:44:55
考虑到生成文档的标准方式的lack,我们采用了enunciate的方式。
在Maven.上玩really很好。
发布于 2010-08-11 16:37:33
您可以向wsdl:WSDL Document Structure中添加<wsdl:documentation>元素
https://stackoverflow.com/questions/3456466
复制相似问题