请教如何利用WebService,WeatherWebService 来获取地方的天气预报
1个回答
展开全部
解决方案 »
FormCreate中,把HTTPRIO1.WSDLLocation的赋值语句调到最上面,即procedure TForm1.FormCreate(Sender: TObject);
begin
HTTPRIO1.WSDLLocation := 'http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl';
HTTPRIO1.Service := 'WeatherWebService';
HTTPRIO1.Port := 'WeatherWebServiceSoap';
// HTTPRIO1.WSDLLocation := 'http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl';
end;
D2007中测试通过
FormCreate中,把HTTPRIO1.WSDLLocation的赋值语句调到最上面,即procedure TForm1.FormCreate(Sender: TObject);
begin
HTTPRIO1.WSDLLocation := 'http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl';
HTTPRIO1.Service := 'WeatherWebService';
HTTPRIO1.Port := 'WeatherWebServiceSoap';
// HTTPRIO1.WSDLLocation := 'http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl';
end;
D2007中测试通过
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询