RPCServiceClient serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
EndpointReference targetEPR = new EndpointReference(serviceEpr);
options.setTo(targetEPR);
// 设置超时
options.setTimeOutInMilliSeconds(6000000L);
options.setAction(methodName);
options.setManageSession(true);
// 设定操作的名称
QName opQName = new QName(nameSpace, methodName);
// 设定返回值
// 操作需要传入的参数已经在参数中给定,这里直接传入方法中调用
Class[] opReturnType = new Class[] { String[].class };
Object[] response = serviceClient.invokeBlocking(opQName, args,
opReturnType);
webservice中嵌套调用以上方法时,在new RPCServiceClient()时报ClassCastException
org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver cannot be cast to org.apache.axis2.engine.MessageReceiver
盼高手解答