这是我通过WSDL导入的代码:
....function GetDhsbServicePort(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): DhsbServicePort;
const
  defWSDL = 'http://192.100.99.108/webservice_dhsb/DhsbService?wsdl';
  defURL  = 'http://192.100.99.108:80/webservice_dhsb/DhsbService';
  defSvc  = 'DhsbService';
  defPrt  = 'DhsbServicePort';
var
  RIO: THTTPRIO;
begin
  Result := nil;
  if (Addr = '') then
  begin
    if UseWSDL then
      Addr := defWSDL
    else
      Addr := defURL;
  end;
  if HTTPRIO = nil then
    RIO := THTTPRIO.Create(nil)
  else
    RIO := HTTPRIO;
  try
    //下面的两句是我手工加的
    RIO.HTTPWebNode.UserName := 'abcd';
    RIO.HTTPWebNode.Password := '11111111';    Result := (RIO as DhsbServicePort);
    if UseWSDL then
    begin
      RIO.WSDLLocation := Addr;
      RIO.Service := defSvc;
      RIO.Port := defPrt;
    end else
      RIO.URL := Addr;
  finally
    if (Result = nil) and (HTTPRIO = nil) then
      RIO.Free;
  end;
end;
...我通过IE来访问是没有问题的,服务器端是WebLogic8 用Java写的我的程序总是报出"Unauthorized xxx(401)的错误,也就是说客服务端不能登录上去