Client.java
package Sample;
import java.util.ArrayList;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.apache.ws.commons.schema.utils.NamespacePrefixList;
import javax.xml.ws.*;
import org.apache.cxf.jaxws.JaxWsClientProxy;
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.MessageSenderInterceptor;
public class Client {
private Client() {
}
public static void main(String[] args) throws Exception {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(IWebservice.class);
factory.setAddress("");
factory.getInInterceptors().add(new LoggingInInterceptor());
IWebservice client = (IWebservice) factory.create();
System.out.println("Invoke show()");
System.out.println(client.show("show hello!"));
System.exit(0);
}
}