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

📄 localhost.webservice1.pas

📁 Delphi 2005精彩编程百例-源代码
💻 PAS
字号:
//------------------------------------------------------------------------------
// <autogenerated>
//     This code was generated by a tool.
//     Runtime Version: 1.1.4322.573
//
//     Changes to this file may cause incorrect behavior and will be lost if 
//     the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------

// 
// 此源代码由 wsdl, Version=1.1.4322.573 自动生成。
// 
unit localhost.WebService1;

interface

uses System.Diagnostics, 
  System.Xml.Serialization, 
  System.Web.Services.Protocols, 
  System.ComponentModel, 
  System.Web.Services, System.Web.Services.Description;

/// <remarks/>
type
  [System.Diagnostics.DebuggerStepThroughAttribute]
  [System.ComponentModel.DesignerCategoryAttribute('code')]
  [System.Web.Services.WebServiceBindingAttribute(Name='CalServiceSoap', Namespace='h' +
  'ttp://tempuri.org/')]
  CalService = class(System.Web.Services.Protocols.SoapHttpClientProtocol)
    /// <remarks/>
  public
    constructor Create;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute('http://tempu' +
    'ri.org/HelloWorld', RequestNamespace='http://tempuri.org/', ResponseNamespace='h' +
    'ttp://tempuri.org/', Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    function HelloWorld: string;
    /// <remarks/>
    function BeginHelloWorld(callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
    /// <remarks/>
    function EndHelloWorld(asyncResult: System.IAsyncResult): string;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute('http://tempu' +
    'ri.org/Add', RequestNamespace='http://tempuri.org/', ResponseNamespace='h' +
    'ttp://tempuri.org/', Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    function Add(x: System.Double; y: System.Double): System.Double;
    /// <remarks/>
    function BeginAdd(x: System.Double; y: System.Double; callback: System.AsyncCallback; 
      asyncState: System.Object): System.IAsyncResult;
    /// <remarks/>
    function EndAdd(asyncResult: System.IAsyncResult): System.Double;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute('http://tempu' +
    'ri.org/Substract', RequestNamespace='http://tempuri.org/', ResponseNamespace='h' +
    'ttp://tempuri.org/', Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    function Substract(x: System.Double; y: System.Double): System.Double;
    /// <remarks/>
    function BeginSubstract(x: System.Double; y: System.Double; callback: System.AsyncCallback; 
      asyncState: System.Object): System.IAsyncResult;
    /// <remarks/>
    function EndSubstract(asyncResult: System.IAsyncResult): System.Double;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute('http://tempu' +
    'ri.org/Multiply', RequestNamespace='http://tempuri.org/', ResponseNamespace='h' +
    'ttp://tempuri.org/', Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    function Multiply(x: System.Double; y: System.Double): System.Double;
    /// <remarks/>
    function BeginMultiply(x: System.Double; y: System.Double; callback: System.AsyncCallback; 
      asyncState: System.Object): System.IAsyncResult;
    /// <remarks/>
    function EndMultiply(asyncResult: System.IAsyncResult): System.Double;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute('http://tempu' +
    'ri.org/Divide', RequestNamespace='http://tempuri.org/', ResponseNamespace='h' +
    'ttp://tempuri.org/', Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    function Divide(x: System.Double; y: System.Double): System.Double;
    /// <remarks/>
    function BeginDivide(x: System.Double; y: System.Double; callback: System.AsyncCallback; 
      asyncState: System.Object): System.IAsyncResult;
    /// <remarks/>
    function EndDivide(asyncResult: System.IAsyncResult): System.Double;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute('http://tempu' +
    'ri.org/Factorial', RequestNamespace='http://tempuri.org/', ResponseNamespace='h' +
    'ttp://tempuri.org/', Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    function Factorial(num: Integer): Integer;
    /// <remarks/>
    function BeginFactorial(num: Integer; callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
    /// <remarks/>
    function EndFactorial(asyncResult: System.IAsyncResult): Integer;
  end;
  
implementation

{$AUTOBOX ON}
{$HINTS OFF}
{$WARNINGS OFF}

/// <remarks/>
constructor CalService.Create;
begin
  inherited Create;
  Self.Url := 'http://localhost/useWebService/WebService1.asmx';
end;

/// <remarks/>
function CalService.HelloWorld: string;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.Invoke('HelloWorld', New(TArrayOfSystem_Object, 0));
  Result := (string(results[0]));
end;

/// <remarks/>
function CalService.BeginHelloWorld(callback: System.AsyncCallback; asyncState: System.Object): System.IAsyncResult;
type
  TArrayOfSystem_Object = array of System.Object;
begin
  Result := Self.BeginInvoke('HelloWorld', New(TArrayOfSystem_Object, 0), callback, 
      asyncState);
end;

/// <remarks/>
function CalService.EndHelloWorld(asyncResult: System.IAsyncResult): string;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.EndInvoke(asyncResult);
  Result := (string(results[0]));
end;

/// <remarks/>
function CalService.Add(x: System.Double; y: System.Double): System.Double;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.Invoke('Add', TArrayOfSystem_Object.Create(x, y));
  Result := (System.Double(results[0]));
end;

/// <remarks/>
function CalService.BeginAdd(x: System.Double; y: System.Double; callback: System.AsyncCallback; 
  asyncState: System.Object): System.IAsyncResult;
type
  TArrayOfSystem_Object = array of System.Object;
begin
  Result := Self.BeginInvoke('Add', TArrayOfSystem_Object.Create(x, y), callback, 
      asyncState);
end;

/// <remarks/>
function CalService.EndAdd(asyncResult: System.IAsyncResult): System.Double;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.EndInvoke(asyncResult);
  Result := (System.Double(results[0]));
end;

/// <remarks/>
function CalService.Substract(x: System.Double; y: System.Double): System.Double;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.Invoke('Substract', TArrayOfSystem_Object.Create(x, y));
  Result := (System.Double(results[0]));
end;

/// <remarks/>
function CalService.BeginSubstract(x: System.Double; y: System.Double; callback: System.AsyncCallback; 
  asyncState: System.Object): System.IAsyncResult;
type
  TArrayOfSystem_Object = array of System.Object;
begin
  Result := Self.BeginInvoke('Substract', TArrayOfSystem_Object.Create(x, y), 
      callback, asyncState);
end;

/// <remarks/>
function CalService.EndSubstract(asyncResult: System.IAsyncResult): System.Double;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.EndInvoke(asyncResult);
  Result := (System.Double(results[0]));
end;

/// <remarks/>
function CalService.Multiply(x: System.Double; y: System.Double): System.Double;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.Invoke('Multiply', TArrayOfSystem_Object.Create(x, y));
  Result := (System.Double(results[0]));
end;

/// <remarks/>
function CalService.BeginMultiply(x: System.Double; y: System.Double; callback: System.AsyncCallback; 
  asyncState: System.Object): System.IAsyncResult;
type
  TArrayOfSystem_Object = array of System.Object;
begin
  Result := Self.BeginInvoke('Multiply', TArrayOfSystem_Object.Create(x, y), 
      callback, asyncState);
end;

/// <remarks/>
function CalService.EndMultiply(asyncResult: System.IAsyncResult): System.Double;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.EndInvoke(asyncResult);
  Result := (System.Double(results[0]));
end;

/// <remarks/>
function CalService.Divide(x: System.Double; y: System.Double): System.Double;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.Invoke('Divide', TArrayOfSystem_Object.Create(x, y));
  Result := (System.Double(results[0]));
end;

/// <remarks/>
function CalService.BeginDivide(x: System.Double; y: System.Double; callback: System.AsyncCallback; 
  asyncState: System.Object): System.IAsyncResult;
type
  TArrayOfSystem_Object = array of System.Object;
begin
  Result := Self.BeginInvoke('Divide', TArrayOfSystem_Object.Create(x, y), callback, 
      asyncState);
end;

/// <remarks/>
function CalService.EndDivide(asyncResult: System.IAsyncResult): System.Double;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.EndInvoke(asyncResult);
  Result := (System.Double(results[0]));
end;

/// <remarks/>
function CalService.Factorial(num: Integer): Integer;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.Invoke('Factorial', TArrayOfSystem_Object.Create(num));
  Result := (Integer(results[0]));
end;

/// <remarks/>
function CalService.BeginFactorial(num: Integer; callback: System.AsyncCallback; 
  asyncState: System.Object): System.IAsyncResult;
type
  TArrayOfSystem_Object = array of System.Object;
begin
  Result := Self.BeginInvoke('Factorial', TArrayOfSystem_Object.Create(num), 
      callback, asyncState);
end;

/// <remarks/>
function CalService.EndFactorial(asyncResult: System.IAsyncResult): Integer;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.EndInvoke(asyncResult);
  Result := (Integer(results[0]));
end;

end.

⌨️ 快捷键说明

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