我有一個包含「邏輯」類的包(比如CheckAuthenticationDataLogic.java,GetVocabulariesLogic.java)。另一個類 - ApiService.java用於生成wsdl。 ApiService.java充滿了這樣的方法:從java class source生成WSDL
/**
* 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 。 爲此目的的任何工具或庫是否存在?
我有一個錯誤「線程中的異常」主「java.lang.NoClassDefFoundError」,它發生是因爲這個類不是放在classpath中,而是放在遠程庫中(庫放在另一個文件夾中)。我如何將這些庫包含到我的類路徑中? – Oleksandr
wsgen -wsdl:Xsoap1.2 -extension -d testGen -cp/home/vidocq/workspace/ws-crp/build/output/eclipse-classes com.crp.logic.CheckAuthenticationDataLogic – Oleksandr
運行'wsgen時會出現什麼錯誤'用'-cp'?請更新您的問題,詳細介紹您的項目配置(位於何處)以及跟蹤。 –