最近在學習Web Service SOAP的相關知識,我調用了四個方法:getSupportCity、getSupportDataSet、getSupportProvince和getWeatherbyCityName,通過apache cxf dynamic 方法寫這些請求
其中,Main.class
public class Main {
public static void main(String[] args) throws Exception {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient("org/example/weather.wsdl");
getSupportCity supportCity = new getSupportCity();
supportCity.getSupportCity(client);
System.out.println();
getSupportDataSet supportDataSet = new getSupportDataSet();
supportDataSet.getSupportDataSet(client);
System.out.println();
getSupportProvince supportProvince = new getSupportProvince();
supportProvince.getSupportProvince(client);
System.out.println();
getWeatherbyCityName cityweather = new getWeatherbyCityName();
cityweather.getWeatherbyCityName(client);
}
}
getWeatherbyCityName
public class getWeatherbyCityName {
public void getWeatherbyCityName(Client client) throws Exception{
Object[] res;
res = client.invoke("getWeatherbyCityName","北京");
System.out.println("Echo response: " + res[0]);
}
}
其他3個方法都能請求得到數據,但是getWeatherbyCityName報錯:
org.apache.cxf.binding.soap.SoapFault: No namespace on "html" element.
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:96)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:58)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:658)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2139)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2022)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1947)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:472)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:302)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:274)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:260)
at org.example.getWeatherbyCityName.getWeatherbyCityName(getWeatherbyCityName.java:10)
at org.example.Main.main(Main.java:27)
我不太理解為什麼,互聯網上沒有找到響應的問題解答,我把wsdl文件下載到本地了,weather.wsdl
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://WebXml.com.cn/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://WebXml.com.cn/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><a href="http://www.webxml.com.cn/" target="_blank">WebXml.com.cn</a> <strong>天氣預報 Web 服務,數據每2.5小時左右自動更新一次,準確可靠。包括 340 多箇中國主要城市和 60 多個國外主要城市三日內的天氣預報數據。</br>此天氣預報Web Services請不要用於任何商業目的,若有需要請<a href="http://www.webxml.com.cn/zh_cn/contact_us.aspx" target="_blank">聯繫我們</a>,歡迎技術交流。 QQ:8409035<br />使用本站 WEB 服務請註明或鏈接本站:http://www.webxml.com.cn/ 感謝大家的支持</strong>!<br /><span style="color:#999999;">通知:天氣預報 WEB 服務如原來使用地址 http://www.onhap.com/WebServices/WeatherWebService.asmx 的,請改成現在使用的服務地址 http://www.webxml.com.cn/WebServices/WeatherWebService.asmx ,重新引用即可。</span><br /><br />&nbsp;</wsdl:documentation>
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://WebXml.com.cn/">
<s:element name="getSupportCity">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="byProvinceName" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getSupportCityResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="getSupportCityResult" type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfString">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="getSupportProvince">
<s:complexType />
</s:element>
<s:element name="getSupportProvinceResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="getSupportProvinceResult" type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getSupportDataSet">
<s:complexType />
</s:element>
<s:element name="getSupportDataSetResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="getSupportDataSetResult">
<s:complexType>
<s:sequence>
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getWeatherbyCityName">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="theCityName" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getWeatherbyCityNameResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="getWeatherbyCityNameResult" type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getWeatherbyCityNamePro">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="theCityName" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="theUserID" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getWeatherbyCityNameProResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="getWeatherbyCityNameProResult" type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ArrayOfString" nillable="true" type="tns:ArrayOfString" />
<s:element name="DataSet" nillable="true">
<s:complexType>
<s:sequence>
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="getSupportCitySoapIn">
<wsdl:part name="parameters" element="tns:getSupportCity" />
</wsdl:message>
<wsdl:message name="getSupportCitySoapOut">
<wsdl:part name="parameters" element="tns:getSupportCityResponse" />
</wsdl:message>
<wsdl:message name="getSupportProvinceSoapIn">
<wsdl:part name="parameters" element="tns:getSupportProvince" />
</wsdl:message>
<wsdl:message name="getSupportProvinceSoapOut">
<wsdl:part name="parameters" element="tns:getSupportProvinceResponse" />
</wsdl:message>
<wsdl:message name="getSupportDataSetSoapIn">
<wsdl:part name="parameters" element="tns:getSupportDataSet" />
</wsdl:message>
<wsdl:message name="getSupportDataSetSoapOut">
<wsdl:part name="parameters" element="tns:getSupportDataSetResponse" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameSoapIn">
<wsdl:part name="parameters" element="tns:getWeatherbyCityName" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameSoapOut">
<wsdl:part name="parameters" element="tns:getWeatherbyCityNameResponse" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameProSoapIn">
<wsdl:part name="parameters" element="tns:getWeatherbyCityNamePro" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameProSoapOut">
<wsdl:part name="parameters" element="tns:getWeatherbyCityNameProResponse" />
</wsdl:message>
<wsdl:message name="getSupportCityHttpGetIn">
<wsdl:part name="byProvinceName" type="s:string" />
</wsdl:message>
<wsdl:message name="getSupportCityHttpGetOut">
<wsdl:part name="Body" element="tns:ArrayOfString" />
</wsdl:message>
<wsdl:message name="getSupportProvinceHttpGetIn" />
<wsdl:message name="getSupportProvinceHttpGetOut">
<wsdl:part name="Body" element="tns:ArrayOfString" />
</wsdl:message>
<wsdl:message name="getSupportDataSetHttpGetIn" />
<wsdl:message name="getSupportDataSetHttpGetOut">
<wsdl:part name="Body" element="tns:DataSet" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameHttpGetIn">
<wsdl:part name="theCityName" type="s:string" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameHttpGetOut">
<wsdl:part name="Body" element="tns:ArrayOfString" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameProHttpGetIn">
<wsdl:part name="theCityName" type="s:string" />
<wsdl:part name="theUserID" type="s:string" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameProHttpGetOut">
<wsdl:part name="Body" element="tns:ArrayOfString" />
</wsdl:message>
<wsdl:message name="getSupportCityHttpPostIn">
<wsdl:part name="byProvinceName" type="s:string" />
</wsdl:message>
<wsdl:message name="getSupportCityHttpPostOut">
<wsdl:part name="Body" element="tns:ArrayOfString" />
</wsdl:message>
<wsdl:message name="getSupportProvinceHttpPostIn" />
<wsdl:message name="getSupportProvinceHttpPostOut">
<wsdl:part name="Body" element="tns:ArrayOfString" />
</wsdl:message>
<wsdl:message name="getSupportDataSetHttpPostIn" />
<wsdl:message name="getSupportDataSetHttpPostOut">
<wsdl:part name="Body" element="tns:DataSet" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameHttpPostIn">
<wsdl:part name="theCityName" type="s:string" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameHttpPostOut">
<wsdl:part name="Body" element="tns:ArrayOfString" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameProHttpPostIn">
<wsdl:part name="theCityName" type="s:string" />
<wsdl:part name="theUserID" type="s:string" />
</wsdl:message>
<wsdl:message name="getWeatherbyCityNameProHttpPostOut">
<wsdl:part name="Body" element="tns:ArrayOfString" />
</wsdl:message>
<wsdl:portType name="WeatherWebServiceSoap">
<wsdl:operation name="getSupportCity">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>查詢本天氣預報Web Services支持的國內外城市或地區信息</h3><p>輸入參數:byProvinceName = 指定的洲或國內的省份,若為ALL或空則表示返回全部城市;返回數據:一個一維字符串數組 String(),結構為:城市名稱(城市代碼)。</p><br /></wsdl:documentation>
<wsdl:input message="tns:getSupportCitySoapIn" />
<wsdl:output message="tns:getSupportCitySoapOut" />
</wsdl:operation>
<wsdl:operation name="getSupportProvince">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>獲得本天氣預報Web Services支持的洲、國內外省份和城市信息</h3><p>輸入參數:無; 返回數據:一個一維字符串數組 String(),內容為洲或國內省份的名稱。</p><br /></wsdl:documentation>
<wsdl:input message="tns:getSupportProvinceSoapIn" />
<wsdl:output message="tns:getSupportProvinceSoapOut" />
</wsdl:operation>
<wsdl:operation name="getSupportDataSet">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br><h3>獲得本天氣預報Web Services支持的洲、國內外省份和城市信息</h3><p>輸入參數:無;返回:DataSet 。DataSet.Tables(0) 為支持的洲和國內省份數據,DataSet.Tables(1) 為支持的國內外城市或地區數據。DataSet.Tables(0).Rows(i).Item("ID") 主鍵對應 DataSet.Tables(1).Rows(i).Item("ZoneID") 外鍵。<br />Tables(0):ID = ID主鍵,Zone = 支持的洲、省份;Tables(1):ID 主鍵,ZoneID = 對應Tables(0)ID的外鍵,Area = 城市或地區,AreaCode = 城市或地區代碼。</p><br /></wsdl:documentation>
<wsdl:input message="tns:getSupportDataSetSoapIn" />
<wsdl:output message="tns:getSupportDataSetSoapOut" />
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityName">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br><h3>根據城市或地區名稱查詢獲得未來三天內天氣情況、現在的天氣實況、天氣和生活指數</h3><p>調用方法如下:輸入參數:theCityName = 城市中文名稱(國外城市可用英文)或城市代碼(不輸入默認為上海市),如:上海 或 58367,如有城市名稱重複請使用城市代碼查詢(可通過 getSupportCity 或 getSupportDataSet 獲得);返回數據: 一個一維數組 String(22),共有23個元素。<br />String(0) 到 String(4):省份,城市,城市代碼,城市圖片名稱,最後更新時間。String(5) 到 String(11):當天的 氣温,概況,風向和風力,天氣趨勢開始圖片名稱(以下稱:圖標一),天氣趨勢結束圖片名稱(以下稱:圖標二),現在的天氣實況,天氣和生活指數。String(12) 到 String(16):第二天的 氣温,概況,風向和風力,圖標一,圖標二。String(17) 到 String(21):第三天的 氣温,概況,風向和風力,圖標一,圖標二。String(22) 被查詢的城市或地區的介紹 <br /><a href="http://www.webxml.com.cn/images/weather.zip">下載天氣圖標<img src="http://www.webxml.com.cn/images/download_w.gif" border="0" align="absbottom" /></a>(包含大、中、小尺寸) <a href="http://www.webxml.com.cn/zh_cn/weather_icon.aspx" target="_blank">天氣圖例説明</a> <a href="http://www.webxml.com.cn/files/weather_eg.zip">調用此天氣預報Web Services實例下載</a> (VB ASP.net 2.0)</p><br /></wsdl:documentation>
<wsdl:input message="tns:getWeatherbyCityNameSoapIn" />
<wsdl:output message="tns:getWeatherbyCityNameSoapOut" />
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityNamePro">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br><h3>根據城市或地區名稱查詢獲得未來三天內天氣情況、現在的天氣實況、天氣和生活指數(For商業用户)</h3><p>調用方法同 getWeatherbyCityName,輸入參數:theUserID = 商業用户ID</p><br /></wsdl:documentation>
<wsdl:input message="tns:getWeatherbyCityNameProSoapIn" />
<wsdl:output message="tns:getWeatherbyCityNameProSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="WeatherWebServiceHttpGet">
<wsdl:operation name="getSupportCity">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>查詢本天氣預報Web Services支持的國內外城市或地區信息</h3><p>輸入參數:byProvinceName = 指定的洲或國內的省份,若為ALL或空則表示返回全部城市;返回數據:一個一維字符串數組 String(),結構為:城市名稱(城市代碼)。</p><br /></wsdl:documentation>
<wsdl:input message="tns:getSupportCityHttpGetIn" />
<wsdl:output message="tns:getSupportCityHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="getSupportProvince">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>獲得本天氣預報Web Services支持的洲、國內外省份和城市信息</h3><p>輸入參數:無; 返回數據:一個一維字符串數組 String(),內容為洲或國內省份的名稱。</p><br /></wsdl:documentation>
<wsdl:input message="tns:getSupportProvinceHttpGetIn" />
<wsdl:output message="tns:getSupportProvinceHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="getSupportDataSet">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br><h3>獲得本天氣預報Web Services支持的洲、國內外省份和城市信息</h3><p>輸入參數:無;返回:DataSet 。DataSet.Tables(0) 為支持的洲和國內省份數據,DataSet.Tables(1) 為支持的國內外城市或地區數據。DataSet.Tables(0).Rows(i).Item("ID") 主鍵對應 DataSet.Tables(1).Rows(i).Item("ZoneID") 外鍵。<br />Tables(0):ID = ID主鍵,Zone = 支持的洲、省份;Tables(1):ID 主鍵,ZoneID = 對應Tables(0)ID的外鍵,Area = 城市或地區,AreaCode = 城市或地區代碼。</p><br /></wsdl:documentation>
<wsdl:input message="tns:getSupportDataSetHttpGetIn" />
<wsdl:output message="tns:getSupportDataSetHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityName">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br><h3>根據城市或地區名稱查詢獲得未來三天內天氣情況、現在的天氣實況、天氣和生活指數</h3><p>調用方法如下:輸入參數:theCityName = 城市中文名稱(國外城市可用英文)或城市代碼(不輸入默認為上海市),如:上海 或 58367,如有城市名稱重複請使用城市代碼查詢(可通過 getSupportCity 或 getSupportDataSet 獲得);返回數據: 一個一維數組 String(22),共有23個元素。<br />String(0) 到 String(4):省份,城市,城市代碼,城市圖片名稱,最後更新時間。String(5) 到 String(11):當天的 氣温,概況,風向和風力,天氣趨勢開始圖片名稱(以下稱:圖標一),天氣趨勢結束圖片名稱(以下稱:圖標二),現在的天氣實況,天氣和生活指數。String(12) 到 String(16):第二天的 氣温,概況,風向和風力,圖標一,圖標二。String(17) 到 String(21):第三天的 氣温,概況,風向和風力,圖標一,圖標二。String(22) 被查詢的城市或地區的介紹 <br /><a href="http://www.webxml.com.cn/images/weather.zip">下載天氣圖標<img src="http://www.webxml.com.cn/images/download_w.gif" border="0" align="absbottom" /></a>(包含大、中、小尺寸) <a href="http://www.webxml.com.cn/zh_cn/weather_icon.aspx" target="_blank">天氣圖例説明</a> <a href="http://www.webxml.com.cn/files/weather_eg.zip">調用此天氣預報Web Services實例下載</a> (VB ASP.net 2.0)</p><br /></wsdl:documentation>
<wsdl:input message="tns:getWeatherbyCityNameHttpGetIn" />
<wsdl:output message="tns:getWeatherbyCityNameHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityNamePro">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br><h3>根據城市或地區名稱查詢獲得未來三天內天氣情況、現在的天氣實況、天氣和生活指數(For商業用户)</h3><p>調用方法同 getWeatherbyCityName,輸入參數:theUserID = 商業用户ID</p><br /></wsdl:documentation>
<wsdl:input message="tns:getWeatherbyCityNameProHttpGetIn" />
<wsdl:output message="tns:getWeatherbyCityNameProHttpGetOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="WeatherWebServiceHttpPost">
<wsdl:operation name="getSupportCity">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>查詢本天氣預報Web Services支持的國內外城市或地區信息</h3><p>輸入參數:byProvinceName = 指定的洲或國內的省份,若為ALL或空則表示返回全部城市;返回數據:一個一維字符串數組 String(),結構為:城市名稱(城市代碼)。</p><br /></wsdl:documentation>
<wsdl:input message="tns:getSupportCityHttpPostIn" />
<wsdl:output message="tns:getSupportCityHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="getSupportProvince">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br /><h3>獲得本天氣預報Web Services支持的洲、國內外省份和城市信息</h3><p>輸入參數:無; 返回數據:一個一維字符串數組 String(),內容為洲或國內省份的名稱。</p><br /></wsdl:documentation>
<wsdl:input message="tns:getSupportProvinceHttpPostIn" />
<wsdl:output message="tns:getSupportProvinceHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="getSupportDataSet">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br><h3>獲得本天氣預報Web Services支持的洲、國內外省份和城市信息</h3><p>輸入參數:無;返回:DataSet 。DataSet.Tables(0) 為支持的洲和國內省份數據,DataSet.Tables(1) 為支持的國內外城市或地區數據。DataSet.Tables(0).Rows(i).Item("ID") 主鍵對應 DataSet.Tables(1).Rows(i).Item("ZoneID") 外鍵。<br />Tables(0):ID = ID主鍵,Zone = 支持的洲、省份;Tables(1):ID 主鍵,ZoneID = 對應Tables(0)ID的外鍵,Area = 城市或地區,AreaCode = 城市或地區代碼。</p><br /></wsdl:documentation>
<wsdl:input message="tns:getSupportDataSetHttpPostIn" />
<wsdl:output message="tns:getSupportDataSetHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityName">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br><h3>根據城市或地區名稱查詢獲得未來三天內天氣情況、現在的天氣實況、天氣和生活指數</h3><p>調用方法如下:輸入參數:theCityName = 城市中文名稱(國外城市可用英文)或城市代碼(不輸入默認為上海市),如:上海 或 58367,如有城市名稱重複請使用城市代碼查詢(可通過 getSupportCity 或 getSupportDataSet 獲得);返回數據: 一個一維數組 String(22),共有23個元素。<br />String(0) 到 String(4):省份,城市,城市代碼,城市圖片名稱,最後更新時間。String(5) 到 String(11):當天的 氣温,概況,風向和風力,天氣趨勢開始圖片名稱(以下稱:圖標一),天氣趨勢結束圖片名稱(以下稱:圖標二),現在的天氣實況,天氣和生活指數。String(12) 到 String(16):第二天的 氣温,概況,風向和風力,圖標一,圖標二。String(17) 到 String(21):第三天的 氣温,概況,風向和風力,圖標一,圖標二。String(22) 被查詢的城市或地區的介紹 <br /><a href="http://www.webxml.com.cn/images/weather.zip">下載天氣圖標<img src="http://www.webxml.com.cn/images/download_w.gif" border="0" align="absbottom" /></a>(包含大、中、小尺寸) <a href="http://www.webxml.com.cn/zh_cn/weather_icon.aspx" target="_blank">天氣圖例説明</a> <a href="http://www.webxml.com.cn/files/weather_eg.zip">調用此天氣預報Web Services實例下載</a> (VB ASP.net 2.0)</p><br /></wsdl:documentation>
<wsdl:input message="tns:getWeatherbyCityNameHttpPostIn" />
<wsdl:output message="tns:getWeatherbyCityNameHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityNamePro">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><br><h3>根據城市或地區名稱查詢獲得未來三天內天氣情況、現在的天氣實況、天氣和生活指數(For商業用户)</h3><p>調用方法同 getWeatherbyCityName,輸入參數:theUserID = 商業用户ID</p><br /></wsdl:documentation>
<wsdl:input message="tns:getWeatherbyCityNameProHttpPostIn" />
<wsdl:output message="tns:getWeatherbyCityNameProHttpPostOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WeatherWebServiceSoap" type="tns:WeatherWebServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getSupportCity">
<soap:operation soapAction="http://WebXml.com.cn/getSupportCity" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getSupportProvince">
<soap:operation soapAction="http://WebXml.com.cn/getSupportProvince" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getSupportDataSet">
<soap:operation soapAction="http://WebXml.com.cn/getSupportDataSet" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityName">
<soap:operation soapAction="http://WebXml.com.cn/getWeatherbyCityName" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityNamePro">
<soap:operation soapAction="http://WebXml.com.cn/getWeatherbyCityNamePro" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WeatherWebServiceSoap12" type="tns:WeatherWebServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getSupportCity">
<soap12:operation soapAction="http://WebXml.com.cn/getSupportCity" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getSupportProvince">
<soap12:operation soapAction="http://WebXml.com.cn/getSupportProvince" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getSupportDataSet">
<soap12:operation soapAction="http://WebXml.com.cn/getSupportDataSet" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityName">
<soap12:operation soapAction="http://WebXml.com.cn/getWeatherbyCityName" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityNamePro">
<soap12:operation soapAction="http://WebXml.com.cn/getWeatherbyCityNamePro" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WeatherWebServiceHttpGet" type="tns:WeatherWebServiceHttpGet">
<http:binding verb="GET" />
<wsdl:operation name="getSupportCity">
<http:operation location="/getSupportCity" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getSupportProvince">
<http:operation location="/getSupportProvince" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getSupportDataSet">
<http:operation location="/getSupportDataSet" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityName">
<http:operation location="/getWeatherbyCityName" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityNamePro">
<http:operation location="/getWeatherbyCityNamePro" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WeatherWebServiceHttpPost" type="tns:WeatherWebServiceHttpPost">
<http:binding verb="POST" />
<wsdl:operation name="getSupportCity">
<http:operation location="/getSupportCity" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getSupportProvince">
<http:operation location="/getSupportProvince" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getSupportDataSet">
<http:operation location="/getSupportDataSet" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityName">
<http:operation location="/getWeatherbyCityName" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getWeatherbyCityNamePro">
<http:operation location="/getWeatherbyCityNamePro" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WeatherWebService">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><a href="http://www.webxml.com.cn/" target="_blank">WebXml.com.cn</a> <strong>天氣預報 Web 服務,數據每2.5小時左右自動更新一次,準確可靠。包括 340 多箇中國主要城市和 60 多個國外主要城市三日內的天氣預報數據。</br>此天氣預報Web Services請不要用於任何商業目的,若有需要請<a href="http://www.webxml.com.cn/zh_cn/contact_us.aspx" target="_blank">聯繫我們</a>,歡迎技術交流。 QQ:8409035<br />使用本站 WEB 服務請註明或鏈接本站:http://www.webxml.com.cn/ 感謝大家的支持</strong>!<br /><span style="color:#999999;">通知:天氣預報 WEB 服務如原來使用地址 http://www.onhap.com/WebServices/WeatherWebService.asmx 的,請改成現在使用的服務地址 http://www.webxml.com.cn/WebServices/WeatherWebService.asmx ,重新引用即可。</span><br /><br />&nbsp;</wsdl:documentation>
<wsdl:port name="WeatherWebServiceSoap" binding="tns:WeatherWebServiceSoap">
<soap:address location="http://www.webxml.com.cn/WebServices/WeatherWebService.asmx" />
</wsdl:port>
<wsdl:port name="WeatherWebServiceSoap12" binding="tns:WeatherWebServiceSoap12">
<soap12:address location="http://www.webxml.com.cn/WebServices/WeatherWebService.asmx" />
</wsdl:port>
<wsdl:port name="WeatherWebServiceHttpGet" binding="tns:WeatherWebServiceHttpGet">
<http:address location="http://www.webxml.com.cn/WebServices/WeatherWebService.asmx" />
</wsdl:port>
<wsdl:port name="WeatherWebServiceHttpPost" binding="tns:WeatherWebServiceHttpPost">
<http:address location="http://www.webxml.com.cn/WebServices/WeatherWebService.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
我懷疑是不是wsdl和SOAP協議不兼容,有大佬能幫我看一下嗎,萬分感謝了