📄 phoneclient.java
字号:
// ==================== Program Discription ==========================
// PhoneClient.java
// 程序描述:示例21-7 : 编写Web服务客户端
// ==============================================================
package com.webservice;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
public class PhoneClient
{
public static void main(String args[])
{
System.out.println("************************************************");
System.out.println("This is a J2SE client for PhonePrice Webservice.");
System.out.println("It will make a call to the getGreeting method of");
System.out.println("PhonePrice's service through a ServiceLocator.");
System.out.println("************************************************");
System.out.println("");
try {
PhonePriceServiceLocator loc = new PhonePriceServiceLocator();
PhonePrice port = loc.getPhonePrice() ;
port.setPrice("zxxxx","100");
System.out.println(port.getPrice("motorola"));
} catch (Exception e) {
e.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -