以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [转帖]webservice问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=59265)

--  作者:jialihaha
--  发布时间:2014/10/31 17:20:00
--  [转帖]webservice问题
现在我给出一段代码:
Dim rqst As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://www.webxml.com.cn/WebServices/WeatherWebService.asmx/getWeatherbyCityName?theCityName=59316")
Dim rsps As System.Net.HttpWebResponse = rqst.GetResponse
Dim stm As System.IO.Stream = rsps.GetResponseStream()
rsps = Nothing
rqst = Nothing
Dim reader As New System.IO.StreamReader(stm)
Dim strXML As String = reader.ReadToEnd
stm.Dispose()

在命令窗口执行,500报错,求大神指导,是什么原因导致的,网址是可以打开的,也可以看到xml的内容


有点甜老师说去掉www,这样得到的不是我要的页面,更不是需要的xml,求帮助

--  作者:有点甜
--  发布时间:2014/10/31 17:37:00
--  
 请不要重复发帖
--  作者:jialihaha
--  发布时间:2014/10/31 17:38:00
--  
不好意思哦