軟件是對質量的不懈追求

          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 閱讀(340) 評論(0)  編輯  收藏


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


          網站導航:
           
          主站蜘蛛池模板: 抚州市| 高雄县| 利川市| 屯门区| 重庆市| 辉县市| 陈巴尔虎旗| 青冈县| 雷州市| 江源县| 靖宇县| 都匀市| 晋宁县| 桑植县| 朝阳区| 枣强县| 裕民县| 尖扎县| 同仁县| 郧西县| 昌乐县| 石楼县| 临洮县| 株洲市| 宁波市| 瑞丽市| 诏安县| 桃园县| 灵璧县| 共和县| 巴彦淖尔市| 达孜县| 内黄县| 金秀| 定远县| 百色市| 楚雄市| 阿图什市| 宽甸| 金平| 平安县|