WebService调用工具(AXIS2)(二)

2014-11-24 09:01:44 · 作者: · 浏览: 2
)); }else { return callback(method.getName(),args,retType); } }else { call(method.getName(),args); return null; } } /** * 创建代理对象 * @throws IllegalArgumentException * @throws AxisFault */ @SuppressWarnings("unchecked") public static
T create(String endpoint,String nameSpace,Class clazz) throws AxisFault, IllegalArgumentException { ClassLoader loader = clazz.getClassLoader(); Class< >[] proxy = new Class[]{clazz}; T t =(T) Proxy.newProxyInstance(loader,proxy,new WebServiceUtil(endpoint,nameSpace)); return t; } }