HTTP://LOCALHOST/SOAP/P_1.EXE/WSDL
会显示什么?

解决方案 »

  1.   

    你的程序有问题,http://www.csdn.net/Develop/read_article.asp?id=8663
    或http://go1.163.com/comanche/mentals/tech/delphi/d6_soap1.htm
      

  2.   

    to raptor:
      你的东东我早就看过了,可我是按Delphi update#2打补丁之后的格式编写的,即一个单元写、注册接口,另一个单元注册类。但还是不行。
      

  3.   

    程序:
    unit U_1;interfaceuses
      SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
      TForm1 = class(TForm)
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementationuses ComApp;{$R *.DFM}const
      CLASS_ComWebApp: TGUID = '{BC4CF973-F724-47B8-9BA2-880D6F70D69B}';initialization
      TWebAppAutoObjectFactory.Create(Class_ComWebApp,
        'cai_FirstWebService', 'cai_FirstWebService Object');end.{ Invokable interface IFirstWS }unit FirstWSIntf;interfaceuses InvokeRegistry, Types, XSBuiltIns;type  { Invokable interfaces must derive from IInvokable }
      IFirstWS = interface(IInvokable)
      ['{E5BE9B95-5AE4-4B57-9049-5342F55E1054}']  function GetMessage(num : integer):string;stdcall;    { Methods of Invokable interface must not use the default }
        { calling convention; stdcall is recommended }
      end;implementationuses FirstWSImpl;initialization
      { Invokable interfaces must be registered }
      InvRegistry.RegisterInterface(TypeInfo(IFirstWS));end.
     { Invokable implementation File for TFirstWS which implements IFirstWS }unit FirstWSImpl;interfaceuses InvokeRegistry, Types, XSBuiltIns,FirstWSIntf;type  { TFirstWS }
      TFirstWS = class(TInvokableClass, IFirstWS)
      public
      function GetMessage(num : integer):string;stdcall;  end;implementation
     procedure createwebtest(out obj:tobject);
     begin
      obj:=TFirstWS.Create;
     end;
     
      function TFirstWS.GetMessage(num : integer):string;
      begin
       case num of
       1: result := '你很可爱';
       2: result := 'ok2;
       end;
      end;
    initialization
      { Invokable classes must be registered }
      InvRegistry.RegisterInvokableClass(TFirstWS,createwebtest);end.
      

  4.   

    hehe ,开webdebug试试吧,好象exe都要用这个才可以,如果是dll就可以放在iis下