웹 서비스 일기예보 찾기
2244 단어 Webwebservice
->new->Axis2 wizards
->Axis2 Cord Generator
-> Generate java source code from WSDL file
->WSDL file local->
http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx?wsdl->
custom package name com.zyl.test
http://WebXml.com.cn/ com.zyl.test
->output path
package com.zyl.test;
import java.rmi.RemoteException;
public class TestWeather {
public static void main(String[] args) throws RemoteException {
WeatherWSStub weather = new WeatherWSStub();
WeatherWSStub.GetRegionCountry region_country = new WeatherWSStub.GetRegionCountry();
WeatherWSStub.ArrayOfString country = weather
.getRegionCountry(region_country).localGetRegionCountryResult;
String[] countries = country.localString;
for (String string : countries) {
System.out.println(string);
String[] mycountry = string.split(",");
System.out.println(mycountry[0] + ">>>>>>>" + mycountry[1]);
}
WeatherWSStub.GetRegionProvince region_province = new WeatherWSStub.GetRegionProvince();
WeatherWSStub.ArrayOfString province = weather
.getRegionProvince(region_province).localGetRegionProvinceResult;
String[] provincies = province.localString;
for (String string : provincies) {
System.out.println(string);
}
WeatherWSStub.GetSupportCityString region_city = new WeatherWSStub.GetSupportCityString();
region_city.setTheRegionCode("3114");
String[] cities = weather.getSupportCityString(region_city).localGetSupportCityStringResult.localString;
for (String string : cities) {
System.out.println(string);
}
WeatherWSStub.GetWeather city_weather = new WeatherWSStub.GetWeather();
city_weather.setTheCityCode("650");
String[] localweather = weather.getWeather(city_weather).localGetWeatherResult.localString;
for (String string : localweather) {
System.out.println(string);
}
}
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Fortinet FortiWeb Web Application Firewall Policy BypassFrom: Geffrey Velasquez Date: Wed, 2 May 2012 20:33:23 -0500...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.