delphi调用c#写的webservice中文出现乱码的问题

解决方法:HTTPRIO1的属性---HttpWebNode--UseUtf8InHeader设置为true

代码片断:

function TLoginManager.Get_LoginManagerSoap: ILoginManagerSoap;
const
  defSvc='LoginManager';
  defPrt='LoginManagerSoap';
var
  RIO: THTTPRIO;
begin
  Result:= nil;
  RIO:= THTTPRIO.Create(nil);
  try
    Result:=(RIO as ILoginManagerSoap);
    RIO.WSDLLocation := SemsClientApp.Config.Server.URL+'/WebService/LoginManager.asmx?wsdl';
    RIO.Service:=defSvc;
    RIO.Port:=defPrt;
    RIO.HTTPWebNode.UseUTF8InHeader:=True;
  finally
    if (Result=nil) then RIO.Free;
  end;
end;

posted @ 2008-08-01 11:28  Max Woods  阅读(1754)  评论(0编辑  收藏  举报