【问题标题】:Documenting EJB3 Web Services记录 EJB3 Web 服务
【发布时间】:2011-03-28 06:06:24
【问题描述】:

我有一个简单的网络服务如下

/**
 * 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 + " !";
  }
}

有没有办法(使用注释或其他方式)将 cmets 添加到 Web 服务或 Web 方法,以便当第三方调用它(或检查 WSDL)时,有描述 Web 服务的 cmets/文档,它的方法和参数;很像后来包含在 java 文档中的 cmets。

我认为这是 .NET Web 服务的 possible(最后评论),但在 Java Web 服务中不确定。

【问题讨论】:

标签: java web-services documentation comments ejb-3.0


【解决方案1】:

您可以将<wsdl:documentation> 元素添加到wsdl:WSDL Document Structure

【讨论】:

    【解决方案2】:

    鉴于生成文档的标准方式lack,我们采用了enunciate方式。

    really 与 Maven 配合得很好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-10-13
      • 2013-03-18
      • 1970-01-01
      • 2010-09-13
      • 1970-01-01
      • 2012-08-06
      • 2015-11-27
      • 1970-01-01
      相关资源
      最近更新 更多