有什么方法可以使用JAX-WS从Javadoc生成WSDL文档吗?

les*_*es2 18 java documentation wsdl jax-ws wsgen

我希望可以使用某种类型的扩展(尽管我认为我的希望是愚蠢的乐观).

   /**
     * <p>
     * Gets the {@link ResultObject} given the identifier. The following
     * fields are not available for some users and will contain a null value:
     * </p>
     * 
     * <ul>
     * <li>{@code resultObject.comment}</li>
     * <li>{@code resultObject.anotherObject.actionById}</li>
     * <li>{@code resultObject.anotherObject.actionByName}</li>
     * </ul>
     * 
     * <p>
     * The {@code daysInPurgatory} value will be {@code -1} when not
     * applicable
     * </p>
     * 
     * @param requestUser
     *            the user initiating the request
     * @param identifier
     *            the id of the ResultObject
     * @return the {@link ResultObject} or {@code null} if none exists
     * @throws SomeException
     *             if the {@code identifier} is {@code null}
     */
    @WebMethod
    @WebResult(name = "resultObject")
    public ResultObject getResultObjectById(
     @WebParam(name = "RequestUser", header = true, partName = "RequestUser") final String requestUser,
     @WebParam(name = "identifier") final Long identifier)
     throws SomeException;
Run Code Online (Sandbox Code Playgroud)

谢谢,LES2

Pas*_*ent 7

您并不是唯一一个寻找生成WSDL文档的方法(请参阅从Javadoc线程生成WSDL文档),但是,AFAIK,没有标准的 JAX-WS方法来实现这一点.

现在,也许看看JBWS-1850@Documentation提到的JBoss专有注释,在使用Java-> WSDL方法时生成2.9jaxws:bindingJavadoc Customization中描述的工件.这不完全是你要求的,但它可能会给你一些想法.

在任何情况下,我想这需要提供自己WSDLGeneratorExtension的扩展wsgen和生成所需的WSDL.