⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dynamicclientexampletest.java

📁 Xfire文件 用于开发web service 的一个开源工具 很好用的
💻 JAVA
字号:
package org.codehaus.xfire.aegis.example;import java.net.MalformedURLException;import java.net.URL;import junit.framework.TestCase;import org.codehaus.xfire.client.Client;import org.codehaus.xfire.util.DOMUtils;import org.w3c.dom.Document;public class DynamicClientExampleTest    extends TestCase{    public void SKIPtestCurrencyConverter() throws MalformedURLException, Exception    {        Client client = new Client(new URL("http://www.webservicex.net/CurrencyConvertor.asmx?WSDL"));                Object[] results = client.invoke("ConversionRate", new Object[] {"BRL", "UGX"});                // Service returns a double of the currency conversion rate.        System.out.println((Double) results[0]);    }        public void SKIPtestWeatherForecast() throws MalformedURLException, Exception    {        Client client = new Client(new URL("http://www.webservicex.net/WeatherForecast.asmx?WSDL"));                Object[] results = client.invoke("GetWeatherByZipCode", new Object[] {"49506"});                // The response is a complex type which we don't know how to represent.        // So XFire converts it into a org.w3c.dom.Document. You can then navigate        // the document and find the desired information.        DOMUtils.writeXml((Document) results[0], System.out);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -