拉风的咖菲猫
这个问题我已经解决了。代码如下:
public class Demo {
public static void main(String args[]){
Client client;
try {
client = new Client(new URL("http://localhost:7003/interfWeb/services/demoInterface?wsdl"));
Object[] results = client.invoke("demo", new Object[] {"hello"});
System.out.println(results[0]);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Demo是接口中的方法,hello是参数。