其实是这样,见代码
{ SOAP WebModule }
unit MainWM;interfaceuses
  SysUtils, Classes, HTTPApp,InvokeRegistry, WSDLIntf, TypInfo, WebServExp,
  WSDLBind, XMLSchema, WSDLPub, SOAPPasInv, SOAPHTTPPasInv, SOAPHTTPDisp,
  WebBrokerSOAP, DB, ADODB;type
  TWebModule1 = class(TWebModule)
    HTTPSoapDispatcher1: THTTPSoapDispatcher;
    HTTPSoapPascalInvoker1: THTTPSoapPascalInvoker;
    WSDLHTMLPublish1: TWSDLHTMLPublish;
    ADOConnection1: TADOConnection;
    ADOQuery1: TADOQuery;
    procedure WebModule1DefaultHandlerAction(Sender: TObject;
      Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
  ISoapHello = Interface ( IInvokable )
  ['{6DF34980-6FFC-11D5-9E62-0050BABD8FE1}']  //  这个GUID你自己用 Ctrl+Shift+G 产生
    Function GetHello( aID : Integer ) : WideString; StdCall;
    Function GetHelloff( aID : Integer ) : WideString; StdCall;
  End;
   TSoapHello = Class ( TInvokableClass, ISoapHello )
  Protected
    Function GetHelloff( aID : Integer ) : WideString; StdCall;
    Function GetHello( aID : Integer ) : WideString; StdCall;
    
  End;  ISoapHello1 = Interface ( IInvokable )
  ['{BCEC4BFC-0E0E-488E-9250-3E24A5DE423D}']  //  这个GUID你自己用 Ctrl+Shift+G 产生
    Function GetHello1( aID : Integer ) : WideString; StdCall;
  End;
   TSoapHello1 = Class ( TInvokableClass, ISoapHello1 )
  Protected
    Function GetHello1( aID : Integer ) : WideString; StdCall;
  End;var
  WebModule1: TWebModule1;implementation{$R *.dfm}procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;
  Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
  WSDLHTMLPublish1.ServiceInfo(Sender, Request, Response, Handled);
end;Function TSoapHello.GetHello( aID : Integer ) : WideString;
Begin
  If ( aID = 1 ) Then
    Result := 'Hello world!'
  Else
    ADOQuery1.xxx    //Result := 'Error ID!';
End;Function TSoapHello.GetHelloff( aID : Integer ) : WideString;
Begin
  If ( aID = 2 ) Then
    Result := 'Hello world!'
  Else
    Result := 'Error ID!';
End;Function TSoapHello1.GetHello1( aID : Integer ) : WideString;
Begin
  If ( aID = 1 ) Then
    Result := 'Hello world!'
  Else
    Result := 'Error ID!';
End;Initialization
  InvRegistry.RegisterInterface( TypeInfo( ISoapHello ) );
  InvRegistry.RegisterInvokableClass( TSoapHello );
  InvRegistry.RegisterInterface( TypeInfo( ISoapHello1 ) );
  InvRegistry.RegisterInvokableClass( TSoapHello1 );
end.我想在“ADOQuery1.xxx”这里写点东西,可是一写“.”后就提示Build
  [Error] MainWM.pas(64): Undeclared identifier: 'ADOQuery1'
  [Fatal Error] SoapTest.dpr(10): Could not compile used unit 'MainWM.pas'说我未声明ADOQuery1,怎么会呢?我都是在IDE里托进来的