我做了一个返回类型为 STRING [] 的 Webservice Operation 以下是代码
@WebMethod(operationName = "authorize")
public String [] authorize(@WebParam(name = "Username")
String Username) {
CAuthorization CA = new CAuthorization();
String [] Result= null;
try {
Result = CA.CheckAuthorization(Username);
} catch (SQLException ex) {
Logger.getLogger(WS_Authentication.class.getName()).log(Level.SEVERE, null, ex);
}
**return Result;**
}
然后我做了一个 Servlet servlet 的代码是:
try { // Call Web Service Operation
java.lang.String result = null;
result = port.authorize(Username);
out.println("Result = "+result);
} catch (Exception ex) {
// TODO handle custom exceptions here
}
问题出在我的 WEBservice 代码中的 RETURN STATEMENT 我有任何表的属性,我想将这些属性带到 servlet 以便我可以在前端看到它们,但我在这里得到的是唯一的 LAST ATTRIBUTE
谢谢!