请问:有用 ECO 成功开发 WebService 的高人没?

gcx_zw1027 2005-04-26 12:19:19
我在使用 Delphi 2005(SP2)开发 ECO WebService 中遇到一个问题。那就是创建 EcoSpace 时始终会出错。
据我跟踪发现,错误始终出在虚拟类 EcoSpaceProvider 的下面一行:
return GetStrategyhandler().GetSessionFreeEcoSpace() as lsdnEcoSpace;
在调用 GetSessionFreeEcoSpace() 时始终出错。即使是新建一个项目,随便写一个函数新建一个 EcoSpace 也一样照错不误。

我怀疑这是不是 Delphi 2005 的问题,因为无论我使用 Delphi 还是 C#Builder 的哪一个,不管怎么调,都是一样的问题,我也无法跟踪进函数的内部,查不到深入的原因。

实在是非常的无奈,我觉得 Eco 是非常不错的框架,但使用起来却始终毛病不断,同一个项目我重做了N多遍,耗费了大量的时间,而且也无法查到相关文档,真是可惜了。

望高手指教。
...全文
138 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
nytony 2005-05-17
  • 打赏
  • 举报
回复
我不是,帮丁了
Caobiao 2005-05-13
  • 打赏
  • 举报
回复
给段代码
//调用
function Tf_dm.DoDeepID(iYear, iMonth: integer): Boolean;
var
L: LeagueManage;
Addr: string;
begin
Result := False;
Addr := 'http://'+ ServerIP +':' + ServerPort + '/services/LeagueManage';
L := GetLeagueManage(False,Addr,Nil);
Result := L.computeDeep(iYear,iMonth);
end;

//对应Unit
unit LeagueManage1;

interface

uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;

type

// ************************************************************************ //
// The following types, referred to in the WSDL document are not being represented
// in this file. They are either aliases[@] of other types represented or were referred
// to but never[!] declared in the document. The types from the latter category
// typically map to predefined/known XML or Borland types; however, they could also
// indicate incorrect WSDL documents that failed to declare or import a schema type.
// ************************************************************************ //
// !:int - "http://www.w3.org/2001/XMLSchema"
// !:boolean - "http://www.w3.org/2001/XMLSchema"


// ************************************************************************ //
// Namespace : http://192.168.0.13:8080/services/LeagueManage
// transport : http://schemas.xmlsoap.org/soap/http
// style : rpc
// binding : LeagueManageSoapBinding
// service : LeagueManageService
// port : LeagueManage
// URL : http://192.168.0.13:8080/services/LeagueManage
// ************************************************************************ //
LeagueManage = interface(IInvokable)
['{AF38C902-5079-6FF3-3C25-5A219C3283A5}']
function updatePositionAll(const year: Integer; const month: Integer): Boolean; stdcall;
function computeDeep(const year: Integer; const month: Integer): Boolean; stdcall;
end;

function GetLeagueManage(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): LeagueManage;


implementation

function GetLeagueManage(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): LeagueManage;
const
defWSDL = 'http://192.168.0.13:8080/services/LeagueManage?wsdl';
defURL = 'http://192.168.0.13:8080/services/LeagueManage';
defSvc = 'LeagueManageService';
defPrt = 'LeagueManage';
var
RIO: THTTPRIO;
begin
Result := nil;
if (Addr = '') then
begin
if UseWSDL then
Addr := defWSDL
else
Addr := defURL;
end;
if HTTPRIO = nil then
RIO := THTTPRIO.Create(nil)
else
RIO := HTTPRIO;
try
Result := (RIO as LeagueManage);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;


initialization
InvRegistry.RegisterInterface(TypeInfo(LeagueManage), 'http://192.168.0.13:8080/services/LeagueManage', 'UTF-8');
InvRegistry.RegisterDefaultSOAPAction(TypeInfo(LeagueManage), '');

end.
Caobiao 2005-05-13
  • 打赏
  • 举报
回复
用过DELPHI7调用WebService成功,没用过2005
TCat 2005-05-12
  • 打赏
  • 举报
回复
来学习的

684

社区成员

发帖
与我相关
我的任务
社区描述
智能路由器通常具有独立的操作系统,包括OpenWRT、eCos、VxWorks等,可以由用户自行安装各种应用,实现网络和设备的智能化管理。
linuxpython 技术论坛(原bbs)
社区管理员
  • 智能路由器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧