client访问webService
2016-12-05 本文已影响0人
简书_捡书
client访问webservice服务
String URL = "xxx";
String namespace = "yyy";
String operation = "Interface";
Object[] objArray = new Object[5];
objArray[0] = "111";
objArray[1] = "222";
objArray[2] = "333";
JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance();
Client client = factory.createClient(URL);
QName opName = new QName(namespace, operation);
Object[] results = client.invoke(opName ,objArray);