锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲成a人片在线观看日本,亚洲av片在线观看,国产精品亚洲自在线播放页码http://m.tkk7.com/youngturk/category/52623.htmlThe world is a fine place , and worth fighting for it.zh-cnSun, 07 Apr 2013 08:03:02 GMTSun, 07 Apr 2013 08:03:02 GMT60eclipse鎻掍歡瀹炵幇Java璋冪敤 asmx 鐨刉eb Service http://m.tkk7.com/youngturk/archive/2013/04/06/397421.htmlyoungturkyoungturkSat, 06 Apr 2013 02:37:00 GMThttp://m.tkk7.com/youngturk/archive/2013/04/06/397421.htmlhttp://m.tkk7.com/youngturk/comments/397421.htmlhttp://m.tkk7.com/youngturk/archive/2013/04/06/397421.html#Feedback0http://m.tkk7.com/youngturk/comments/commentRss/397421.htmlhttp://m.tkk7.com/youngturk/services/trackbacks/397421.htmleclipse鎻掍歡(axis2 tool--Code Generator Wizard)瀹炵幇Java璋冪敤 asmx 鐨刉eb Service

涓涓幏寰楀ぉ姘旀儏鍐靛強(qiáng)鍥藉鍩庡競(jìng)鐨?Web Service
http://www.webservicex.net/globalweather.asmx?WSDL

AXIS2 涓嬭澆鍦板潃 http://ws.apache.org/axis2/download.cgi
鍏秂clipse宸ュ叿 http://ws.apache.org/axis2/tools/index.html
Code Generator Wizard - Eclipse Plug-in 鍙互浠clipse涓殑link鏂瑰紡瀹夎.鍗沖彲浠ラ氳繃鑷姩
鐢熸垚java service code.

鍏蜂綋姝ラ濡備笅錛?br />鍦╡clipse鐨刯ava project涓?NEW --> Other --> Axis2 Wizards -->Axis2 Code Generator
NEXT --> 閫夋嫨 Generate java source code from a WSDL file
NEXT --> 鍦╓SDL file location: 涓緭鍏?: http://www.webservicex.net/globalweather.asmx?WSDL
NEXT --> NEXT --> 閫夋嫨濂芥枃浠剁敓鎴愯礬寰?br />濡? E:\eclipseworkspace\axis213\src
FINISH 鍚庝細(xì)鑷姩鐢熸垚涓や釜鏂囦歡錛?br />GlobalWeatherCallbackHandler.java 鍜?GlobalWeatherStub.java

鏂板緩涓涓祴璇曟枃浠禛lobalWeatherTest.java.
鍐呭濡備笅:
package net.webservicex.www;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.StringReader;
import java.rmi.RemoteException;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

public class GlobalWeatherTest {
 public static void main(String[] args) throws RemoteException {
  GlobalWeatherStub stub = new GlobalWeatherStub();
  GlobalWeatherStub.GetCitiesByCountry request = new GlobalWeatherStub.GetCitiesByCountry();
  request.setCountryName("Korea");
  GlobalWeatherStub.GetCitiesByCountryResponse response = stub
    .GetCitiesByCountry(request);
  System.out.println("=================鍥藉鍩庡競(jìng)=================");
  //System.out.println(response.getGetCitiesByCountryResult());
  String xml = response.getGetCitiesByCountryResult();
  parseXML(xml);
  
  GlobalWeatherStub.GetWeather weatherRequest = new
  GlobalWeatherStub.GetWeather();
  weatherRequest.setCountryName("Korea");
  weatherRequest.setCityName("Seoul");
  GlobalWeatherStub.GetWeatherResponse weatherResponse =
  stub.GetWeather(weatherRequest);
  System.out.println("=================鍥藉/鍩庡競(jìng)/澶╂皵=================");
  System.out.println(weatherResponse.getGetWeatherResult());
 }

 public static void parseXML(String xml) {
  DocumentBuilderFactory domfac = DocumentBuilderFactory.newInstance();
  try {
   DocumentBuilder dombuilder = domfac.newDocumentBuilder();
   StringReader rd = new StringReader(xml);
   InputSource is = new InputSource(rd);

   Document doc = dombuilder.parse(is);
   Element root = doc.getDocumentElement();
   NodeList citys = root.getChildNodes();

   if (citys != null) {
    for (int i = 0; i < citys.getLength(); i++) {
     Node city = citys.item(i);
     if (city.getNodeType() == Node.ELEMENT_NODE) {
      for (Node node = city.getFirstChild(); node != null; node = node
        .getNextSibling()) {
       if (node.getNodeType() == Node.ELEMENT_NODE) {
        if (node.getNodeName().equals("Country")) {
         String country = node.getFirstChild()
           .getNodeValue();
         System.out.print(country);
        }
        if (node.getNodeName().equals("City")) {
         String cityname = node.getFirstChild()
           .getNodeValue();
         System.out.println(" || " + cityname);
        }
       }
      }
     }
    }
   }
  } catch (ParserConfigurationException e) {
   e.printStackTrace();
  } catch (FileNotFoundException e) {
   e.printStackTrace();
  } catch (SAXException e) {
   e.printStackTrace();
  } catch (IOException e) {
   e.printStackTrace();
  }
 }
}


榪愯緇撴灉濡備笅:

=================鍥藉鍩庡競(jìng)=================
Korea, Republic of || Kwangju Ab
Korea, Republic of || Kunsan Ab
Korea, Republic of || Yosu Airport
Korea, Republic of || Chunchon Ab
Korea, Republic of || Hoengsong Ab
Korea, Republic of || Kangnung Ab
Korea, Republic of || Wonju
Korea, Republic of || Cheju International Airport
Korea, Republic of || Pusan / Kimhae International Airport
Korea, Republic of || Mosulpo Ab
Korea, Republic of || Sach'On Ab
Korea, Republic of || Ulsan
Korea, Republic of || Tonghae Radar Site
Korea, Republic of || Seoul / Yongdungp'O Rokaf Wc
Korea, Republic of || Pyongtaek Ab
Korea, Republic of || Seoul
Korea, Republic of || Seoul E Ab
Korea, Republic of || Koon-Ni Range
Korea, Republic of || Osan Ab
Korea, Republic of || Paengnyongdo Ab
Korea, Republic of || Yeonpyeungdo
Korea, Republic of || Seoul / Kimp'O International Airport
Korea, Republic of || Yeoju Range
Korea, Republic of || Suwon Ab
Korea, Republic of || Camp Stanley / H-207
Korea, Republic of || Yongsan / H-208 Hp
Korea, Republic of || Andong
Korea, Republic of || Paekado
Korea, Republic of || Taejon Kor-Afb
Korea, Republic of || Songmu Ab
Korea, Republic of || Taejon
Korea, Republic of || Pohang Ab
Korea, Republic of || Jung Won Rok-Ab
Korea, Republic of || Mangilsan Ab
Korea, Republic of || Taegu Ab
Korea, Republic of || Sangju
Korea, Republic of || Taegu
Korea, Republic of || Chongju Ab
Korea, Republic of || Woong Cheon
Korea, Republic of || Yechon Ab
Korea, Democratic People's Republic of || Kimchaek
Korea, Democratic People's Republic of || Pyongyang
=================鍥藉/鍩庡競(jìng)/澶╂皵=================
<?xml version="1.0" encoding="utf-16"?>
<CurrentWeather>
  <Location>Seoul / Kimp'O International Airport, Korea, South (RKSS) 37-33N 126-48E 18M</Location>
  <Time>Oct 24, 2007 - 11:00 AM EDT / 2007.10.24 1500 UTC</Time>
  <Wind> from the NNW (330 degrees) at 2 MPH (2 KT) (direction variable):0</Wind>
  <Visibility> less than 1 mile:0</Visibility>
  <SkyConditions> partly cloudy</SkyConditions>
  <Temperature> 48 F (9 C)</Temperature>
  <DewPoint> 48 F (9 C)</DewPoint>
  <RelativeHumidity> 100%</RelativeHumidity>
  <Pressure> 30.24 in. Hg (1024 hPa)</Pressure>
  <Status>Success</Status>
</CurrentWeather>

WSDL

=============鏈鏂扮殑axis2-eclipse-codegen-wizard-1.4 鐢ㄦ硶(20080806)==============

鐢ㄥ悓妯g殑鏂規(guī)硶鐢熸垚浠g⒓鏈変簲鍊?
GlobalWeather.java
GlobalWeatherLocator.java
GlobalWeatherSoap.java
GlobalWeatherSoapProxy.java
GlobalWeatherSoapStub.java

瀹㈡埗绔鐢ㄥ涓?
GlobalWeatherLocator gwl = new GlobalWeatherLocator();
GlobalWeatherSoapStub binding = (GlobalWeatherSoapStub)gwl.getGlobalWeatherSoap();
System.out.println(">>>"+binding.getCitiesByCountry("Korea"));
System.out.println(binding.getWeather("Seoul", "Korea"));



youngturk 2013-04-06 10:37 鍙戣〃璇勮
]]>
Apache axis2 + Eclipse 寮鍙?WebService http://m.tkk7.com/youngturk/archive/2013/03/21/396822.htmlyoungturkyoungturkThu, 21 Mar 2013 14:16:00 GMThttp://m.tkk7.com/youngturk/archive/2013/03/21/396822.htmlhttp://m.tkk7.com/youngturk/comments/396822.htmlhttp://m.tkk7.com/youngturk/archive/2013/03/21/396822.html#Feedback0http://m.tkk7.com/youngturk/comments/commentRss/396822.htmlhttp://m.tkk7.com/youngturk/services/trackbacks/396822.htmlhttp://blog.csdn.net/xiaochunyong/article/details/7764683
http://wenku.baidu.com/view/b3c7f14033687e21af45a98a.html###

youngturk 2013-03-21 22:16 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 久操免费在线观看| 一级视频免费观看| 亚洲一区二区三区亚瑟| 亚洲人成免费电影| 久久久精品视频免费观看| 6080午夜一级毛片免费看| 日韩人妻无码免费视频一区二区三区 | 在线观看www日本免费网站| 日本红怡院亚洲红怡院最新| 久久久久久久亚洲Av无码| 中文字幕亚洲码在线| 国产福利电影一区二区三区,免费久久久久久久精| 99精品热线在线观看免费视频| 国产成人精品免费视频大全五级| 666精品国产精品亚洲| 国产精品亚洲一区二区无码| 中国性猛交xxxxx免费看| 免费看又爽又黄禁片视频1000| 亚洲av无码av制服另类专区| 国产青草亚洲香蕉精品久久| 一本色道久久88亚洲综合 | 亚洲依依成人精品| 处破痛哭A√18成年片免费| 亚洲国产成人私人影院| 老司机午夜精品视频在线观看免费| 国产精彩免费视频| 亚洲AV美女一区二区三区| www成人免费观看网站| 亚洲AV本道一区二区三区四区| 天天影院成人免费观看| 1区1区3区4区产品亚洲| 在线观看av永久免费| 亚洲美女视频免费| 成人免费视频小说| 亚洲精华国产精华精华液好用| 中文字幕在线免费看线人| 亚洲第一永久AV网站久久精品男人的天堂AV| 亚洲人成图片网站| 国产精品亚洲美女久久久 | 亚洲一区二区三区高清| 日韩高清免费观看|