有没有办法用JAX-WS从Javadoc生成WSDL文档?
我希望有一种扩展可以做到这一点(尽管我认为我的希望过于乐观)有没有办法用JAX-WS从Javadoc生成WSDL文档?,java,documentation,wsdl,jax-ws,wsgen,Java,Documentation,Wsdl,Jax Ws,Wsgen,我希望有一种扩展可以做到这一点(尽管我认为我的希望过于乐观) /** * *获取给定标识符的{@link ResultObject}。以下 *某些用户无法使用字段,字段将包含空值: * * * *{@code resultObject.comment} *{@code resultObject.anotherObject.actionById} *{@code resultObject.anotherObject.actionByName} * * * *{@code daysInPurga
/**
*
*获取给定标识符的{@link ResultObject}。以下
*某些用户无法使用字段,字段将包含空值:
*
*
*
*- {@code resultObject.comment}
*- {@code resultObject.anotherObject.actionById}
*- {@code resultObject.anotherObject.actionByName}
*
*
*
*{@code daysInPurgatory}值在不存在时将为{@code-1}
*适用的
*
*
*@param requestUser
*发起请求的用户
*@param标识符
*ResultObject的id
*@返回{@link ResultObject}或{@code null}(如果不存在)
*@抛出了一些异常
*如果{@code identifier}是{@code null}
*/
@网络方法
@WebResult(name=“resultObject”)
public ResultObject getResultObjectById(
@WebParam(name=“RequestUser”,header=true,partName=“RequestUser”)最终字符串RequestUser,
@WebParam(name=“identifier”)最终长标识符
抛出一些异常;
谢谢,
LES2您并不是唯一一个在寻找生成WSDL文档的方法的人(请参阅线程),但是,顺便说一句,没有标准的JAX-WS方法可以做到这一点 现在,请看一看JBoss专有注释
@文档
,它在使用Java->WSDL方法时也会生成jaxws:binding
工件。这不完全是你想要的,但它可能会给你一些想法
在任何情况下,我想这都需要提供您自己的WSDLGeneratorExtension
来扩展wsgen
并生成所需的WSDL。您可以查看。可以使用从Javadoc注释生成静态HTML文件。这适用于SOAP(即JAX-WS)和REST(即JAX-RS)端点
有趣的是:
/**
* <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;