soaphttpdisp.pas

来自「Delphi开发webservice的一套例子」· PAS 代码 · 共 59 行

PAS
59
字号
{*******************************************************}
{                                                       }
{      x Borland Delphi Visual Component Library         }
{                                                       }
{       Copyright (c) 2000    Inprise Corporation       }
{                                                       }
{*******************************************************}

unit SoapHTTPDisp;

interface

uses Classes;

type

  IHTTPSoapDispatch = interface
  ['{9E733EDC-7639-4DAF-96FF-BCF141F7D8F2}']
    procedure DispatchSOAP(const Path, SoapAction: WideString; const Request: TStream;
      Response: TStream);
  end;

  THTTPSoapDispatchNode = class(TComponent)
  private
    procedure SetSoapDispatcher(const Value: IHTTPSoapDispatch);
  protected
    FSoapDispatcher: IHTTPSoapDispatch;
    procedure Notification(AComponent: TComponent; Operation: TOperation); override;
  public
    procedure DispatchSOAP(const Path, SoapAction: WideString; const Request: TStream;
      Response: TStream);
  published
    property Dispatcher: IHTTPSoapDispatch read FSoapDispatcher write SetSoapDispatcher;
  end;

implementation

procedure THTTPSoapDispatchNode.SetSoapDispatcher(const Value: IHTTPSoapDispatch);
begin
  ReferenceInterface(FSoapDispatcher, opRemove);
  FSoapDispatcher := Value;
  ReferenceInterface(FSoapDispatcher, opInsert);
end;

procedure THTTPSoapDispatchNode.Notification(AComponent: TComponent; Operation: TOperation);
begin
  inherited;
  if (Operation = opRemove) and AComponent.IsImplementorOf(FSoapDispatcher) then
    FSoapDispatcher := nil;
end;

procedure THTTPSoapDispatchNode.DispatchSOAP(const Path, SoapAction: WideString;
  const Request: TStream;  Response: TStream);
begin

end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?