[英]Generate WSDL from java class\source
我有一個包含“邏輯”類的包(如CheckAuthenticationDataLogic.java,GetVocabularyiesLogic.java)。 另一個類--ApiService.java用於生成wsdl。 ApiService.java有很多像這樣的方法:
/**
* Check authentication data.
* @param contractNumber - number of contract.
* @param msisdn - msisdn.
* @param superPassword - super password.
* @return result of authentication.
*/
@WebMethod
@WebResult(name = "result")
public CheckAuthenticationDataResult checkAuthenticationData(@WebParam(name = "contractNumber")
final String contractNumber,
@WebParam(name = "msisdn")
final String msisdn,
@WebParam(name = "superPassword")
final String superPassword) {
return runLogic(new CheckAuthenticationDataLogic(contractNumber, msisdn, superPassword));
}
如你所見它只是一個代理方法...所以我想避免兩次做同樣的工作,並從邏輯類生成WSDL而不編寫ApiService.java。 是否存在用於此目的的任何工具或庫?
Axis2是另一種選擇,特別是java2wsdl命令/插件
Metro( http://metro.java.net/ )Web服務堆棧提供了一個工具(wsgen),用於從帶注釋的Java生成WSDL。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.