13,824
社区成员
发帖
与我相关
我的任务
分享
str = p->getWeatherbyCityName("上海"); //看来CB6 与 C#.net 的中文字符类型转换之间存在问题。
//str = p->getSupportCity(""); //空白参数的调用正常
void __fastcall TForm1::Button1Click(TObject *Sender)
{ //注意 WeatherWebService.cpp 中新加的 Regist代码
HTTPRIO1->WSDLLocation = "http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl";
HTTPRIO1->URL = "http://www.webxml.com.cn/WebServices/WeatherWebService.asmx";
HTTPRIO1->Service = "WeatherWebService";
HTTPRIO1->Port = "WeatherWebServiceSoap";
NS_WeatherWebService::_di_WeatherWebServiceSoap p =NS_WeatherWebService::GetWeatherWebServiceSoap(true,"");
ArrayOfString str;
//str = p->getWeatherbyCityName("上海"); //看来CB6 与 C#.net 的中文字符类型转换之间存在问题。
str = p->getSupportCity(""); //空白参数的调用正常
int iLen = str.Length;
Memo1->Lines->Add(AnsiString(iLen));
for(int a=0;a<str.Length;a++)
{
Memo1->Lines->Add(str[a]);
}
}
InvRegistry()->RegisterInvokeOptions(__interfaceTypeinfo(WeatherWebServiceSoap),ioDocument); //uky 20110422