
從圖可見,只有55%的人用native resolution,可悲!
After some studies, to my surprise, building a web service client using the Axis library (not the web service itself) is in fact very easy. I would like to summarize my experience in this blog.
#!/bin/sh java -classpath "/home/craft/whc/axis-1_1/lib/axis.jar: /home/craft/whc/axis-1_1/lib/log4j-1.2.8.jar: /home/craft/whc/axis-1_1/lib/commons-logging.jar: /home/craft/whc/axis-1_1/lib/commons-discovery.jar: /home/craft/whc/axis-1_1/lib/wsdl4j.jar: /home/craft/whc/axis-1_1/lib/jaxrpc.jar: /home/craft/whc/axis-1_1/lib/saaj.jar" org.apache.axis.wsdl.WSDL2Java StockQuote.wsdl |
import java.net.URL; import org.apache.axis.client.Service; import org.apache.axis.client.Call; public class StockClient { public static void main(String[] args) throws Exception { NET.webserviceX.www.StockQuote service = new NET.webserviceX.www.StockQuoteLocator(); NET.webserviceX.www.StockQuoteSoap port = service.getStockQuoteSoap(); String result = port.getQuote("MSFT"); System.out.println("Result = "+result); } } |
#!/bin/sh javac -source 1.5 -classpath "/home/craft/whc/axis-1_1/lib/axis.jar: /home/craft/whc/axis-1_1/lib/log4j-1.2.8.jar: /home/craft/whc/axis-1_1/lib/commons-logging.jar: /home/craft/whc/axis-1_1/lib/commons-discovery.jar: /home/craft/whc/axis-1_1/lib/jaxrpc.jar: /home/craft/whc/axis-1_1/lib/saaj.jar:." StockClient.java |
#!/bin/sh java -classpath "/home/craft/whc/axis-1_1/lib/axis.jar: /home/craft/whc/axis-1_1/lib/log4j-1.2.8.jar: /home/craft/whc/axis-1_1/lib/commons-logging.jar: /home/craft/whc/axis-1_1/lib/commons-discovery.jar: /home/craft/whc/axis-1_1/lib/jaxrpc.jar: /home/craft/whc/axis-1_1/lib/saaj.jar:." -Dhttp.proxySet=true -Dhttp.proxyHost="10.36.250.25" -Dhttp.proxyPort=8080 StockClient |