Foxtable(狐表)用户栏目专家坐堂 → 关于调用webservice的问题


  共有2840人关注过本帖平板打印复制链接

主题:关于调用webservice的问题

帅哥哟,离线,有人找我吗?
jialihaha
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:996 积分:6630 威望:0 精华:0 注册:2014/10/20 11:06:00
关于调用webservice的问题  发帖心情 Post By:2014/10/31 17:05:00 [只看该作者]

现在我给出一段代码:
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的内容

 回到顶部