1. 程式人生 > >Axis2呼叫webservice Client--RPCServiceClient

Axis2呼叫webservice Client--RPCServiceClient

params.addElement(new Parameter("ifUser", String.class, USERNAME,null));
params.addElement(new Parameter("ifPass", String.class, PSW, null));
params.addElement(new Parameter("ifCode", String.class, modulName,null));
params.addElement(new Parameter("ifEvent", String.class, "", null));
params.addElement(new Parameter("info", String.class, xmlStr,null));

call.setParams(params);
call.setMethodName(strFunction);
Response resp;
try {
resp = call.invoke(url, strSoapAction);
} catch (SOAPException e) {
throw new Exception("呼叫接口出錯!URL=" + strUrl + "\n"
+ e.getMessage());
}