package org.eclipse.stp.example;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
public final class SayHi_SayHiPort_Client {
private static final QName SERVICE_NAME = new QName("http://example.stp.eclipse.org/", "SayHiService");
private SayHi_SayHiPort_Client() {
}
public static void main(String args[]) throws Exception {
if (args.length == 0) {
System.out.println("please specify wsdl");
System.exit(1);
}
URL wsdlURL = null;
File wsdlFile = new File(args[0]);
try {
if (wsdlFile.exists()) {
wsdlURL = wsdlFile.toURL();
} else {
wsdlURL = new URL(args[0]);
}
} catch (MalformedURLException e) {
e.printStackTrace();
}
SayHiService ss = new SayHiService(wsdlURL, SERVICE_NAME);
SayHi port = ss.getSayHiPort();
System.out.println("Invoking sayHello...");
System.out.println("Invoking sayHello...");
//*************Changed by Zhenghao***************
//java.lang.String _sayHi_arg0 = "";
java.lang.String _sayHello_arg0 = "Zhenghao";
//*************Ended Change by Zhenghao**********
java.lang.String _sayHello__return = port.SayHello(_sayHello_arg0); System.out.println("sayHello.result=" + _sayHello__return);
System.exit(0);
}
}
|