軟件是對質量的不懈追求

          xfire 動態客戶端


          import java.net.URL;

          import org.codehaus.xfire.client.Client;

          public class XfireClient
          {

              
          public static void main(String[] args)
              {
                  DyClient();
              }

              
          /**
               * You get a DynamicClient when you create a Client with the URL of a WSDL
               
          */
              
          public static void DyClient()
              {
                  
          try
                  {
                      Client client 
          = new Client(
                              
          new URL(
                                      
          "http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx?wsdl"));
                      Object[] results 
          = client.invoke("qqCheckOnline",
                              
          new Object[] { "31506173" });
                      System.out.println((String) results[
          0]);

                  }
                  
          catch ( Exception e)
                  {
                      e.printStackTrace();
                  }
              }
          }




          必須jar:
          commons-codec-1.3.jar
          commons-httpclient-3.0.jar
          commons-logging-1.0.4.jar
          jdom-1.0.jar
          wsdl4j-1.6.1.jar
          xfire-all-1.2.6.jar
          XmlSchema-1.1.jar

          posted on 2010-03-08 16:00 BlakeSu 閱讀(344) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 唐河县| 左权县| 苍溪县| 黎城县| 花莲县| 汉源县| 玉山县| 稻城县| 方正县| 仙游县| 买车| 鄂尔多斯市| 宁波市| 娄烦县| 舒兰市| 无棣县| 邳州市| 盘锦市| 广饶县| 武强县| 蓬莱市| 宣武区| 黄陵县| 南澳县| 洮南市| 靖州| 拉萨市| 砚山县| 怀宁县| 西宁市| 万盛区| 邢台市| 古丈县| 皋兰县| 友谊县| 磐安县| 麻江县| 思茅市| 车险| 手机| 乐亭县|