📄 testhelloclient.java
字号:
package test;
import javax.xml.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class TestHelloClient {
public static void main(String[] args) {
try {
// String URL = "http://localhost:8090/axis/HelloClient.jws";
String URL = "http://fhs.6617.com/GetWeatherPlus.asmx";
Service service = new Service();
Call call = null;
call = (Call) service.createCall();
call.setOperationName(new QName(
"http://fhs.6617.com/GetWeatherPlus.asmx", "GetSupportCity"));
call.setTargetEndpointAddress(new java.net.URL(URL));
String str = (String) call.invoke(new Object[] { "西安" });
System.out.println(str);
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -