⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wsdlnode.pas

📁 Delphi开发webservice的一套例子
💻 PAS
字号:
{*******************************************************}
{                                                       }
{ Borland Delphi Visual Component Library               }
{                SOAP Support                           }
{                                                       }
{ Copyright (c) 2001 Borland Software Corporation       }
{                                                       }
{*******************************************************}

unit WSDLNode;

interface

uses Classes, WebNode, OpConvert, XMLDOc, XMLIntf, WSDLItems, TypInfo;

type

  TWSDLView = class(TComponent)
  private
    FPortType: string;
    FPort: string;
    FOperation: string;
    FService: string;
    FWSDL: TWSDLItems;
    FIWSDL: IXMLDocument;
    procedure SetWSDL(Value: TWSDLItems);
  public
    IntfInfo: PTypeInfo;
  published
    property PortType: string read FPortType write FPortType;
    property Port: string read FPort write FPort;
    property Operation: string read FOperation write FOperation;
    property Service: string read FService write FService;
    property WSDL: TWSDLItems read FWSDL write SetWSDL;
  end;

  TWSDLClientNode = class(TComponent, IWebNode)
  private
    FWSDLView: TWSDLView;
    FTransportNode: IWebNode;
    procedure SetTransportNode(Value: IWebNode);
  public

    procedure Notification(AComponent: TComponent; Operation: TOperation); override;
    procedure Execute(const DataMsg: WideString; Resp: TStream);
  published
    property WSDLView: TWSDLView read FWSDLView write FWSDLView;
    property TransportNode: IWebNode read FTransportNode  write SetTransportNode;
  end;

implementation

{ TWSDLClientNode }

procedure  TWSDLClientNode.Execute(const DataMsg: WideString; Resp: TStream);
begin
end;

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


procedure TWSDLClientNode.SetTransportNode(Value: IWebNode);
begin
  if Assigned(Value) then
  begin
    ReferenceInterface(FTransportNode, opRemove);
    FTransportNode := Value;
    ReferenceInterface(FTransportNode, opInsert);
  end;
end;

{ TWSDLView }

procedure TWSDLView.SetWSDL(Value: TWSDLItems);
begin
  if Assigned(Value) then
  begin
    FWSDL := Value;
    FIWSDL := Value as IXMLDocument;
  end;
end;

end.

⌨️ 快捷键说明

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