import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;public class WSClientUtil { /** * get web service proxy client * @param serviceClass * @param address * @return */ @SuppressWarnings("unchecked") public staticT getWSClient(Class serviceClass, String address) { JaxWsProxyFactoryBean proxyBean = new JaxWsProxyFactoryBean(); proxyBean.setServiceClass(serviceClass); proxyBean.setAddress(address); Object proxy = proxyBean.create(); // WSSecurityClient.setSecurity(proxy); return (T) proxy; }}