如何使用TSOAPDataModule建立一个简单的Soap数据库程序? (100分)

http://www.csdn.net/develop/read_article.asp?id=8964
 
严重关注
 
李维的范例是没有使用TSOAPDataModule
从这里可以看出
他的代码:
代码:
type
  IMyEssays = interface(IInvokable)
    ['{1C8ABA87-455B-4430-9881-239F5FFE7F49}']
    function GetEssayTitles : TEssaysInfos ;
stdcall;
    function GetEssayContent(const iID : Integer) : String;
stdcall;
  end;
...
TSOAPDataModule使用的代码:
代码:
type
  ItestData = interface(IAppServer)
    ['{A3A6BA77-B8E9-4FB9-8D2D-5CD48769AF6D}']
    function GetName:String;stdcall;
  end;
  TtestData = class(TSoapDataModule, ItestData, IAppServer)
...
从这里我也知道了使用array of TRemoteTable实现数据的传递。但是我更想知道如何用
TSOAPDataModule实现
 
TO:autumn
到这里看看:http://www.marcocantu.com/code/md6htm/SoapDataServer.htm
 
我调试不成功
http://localhost:1024/SoapDataServer.SoapDataServer/Soap/ISoapTestDm
不能生成wsdl,用
http://localhost:1024/SoapDataServer.SoapDataServer/wsdl/ISoapTestDm
可以生成interface 。但是call getRecordCount出错,在delphi ide中设计client的时候
不能得出DataSetProvider1
 
关注关注关注关注关注
 
我也没试成功![:(]
 
让我继续研究一下,wagxu介绍的网站不错,谢谢[:)]
 
有时间我也再试试。TSOAPDataModule好象存在着一些问题;
(转自borland新闻组)
TSoapDataModule should behave is a
TInvokableClass and destroy itself when the reference count drops to zero.
However, it is derived from TComponent whichdo
es not destroy itself in that
case. Furthermore the reference
counting of TComponentdo
es not behave like a TInvokableClass.
This means that it is not suitable to use
procedure TSoapTestDmCreateInstance(out obj: TObject);
begin
obj := TSoapTestDm.Create(nil);
end;

initialization
InvRegistry.RegisterInvokableClass(TSoapTestDm,
TSoapTestDmCreateInstance);
InvRegistry.RegisterInterface(TypeInfo(ISoapTestDm));
end.

With every SOAP call a new object is created, which is never destroyed or
reused.
 
我的Web App Debugger在stating后10分钟以后就会报错,说什么什么堵赛
感觉delphi soap 的expert有点问题
 
To autumn:
我找到了<< Mastering Delphi 6 >>这本书(包括完整的例子)。
在http://www.inprises.com/control/infos.htm你可以看看。
上面给你的sample就是这本书的。
 
我已经试成功了,你也就照那本书带的例子试吧。
 
是啊,wagxu说得太对啦!我已经不用了,用复合类型传递数据吧!
 
let me try it!
 
我也成功了。谢谢wagxu,谢谢你介绍一本好书。
 
顶部