網上找的一個web service示例在我的電腦上運行不了﹐iis好象沒問題﹐大哥們看一下(50分)

  • 主题发起人 xang2001
  • 开始时间
X

xang2001

Unregistered / Unconfirmed
GUEST, unregistred user!
program Project7;
{$APPTYPE CONSOLE}
uses
WebBroker,
CGIApp,
Unit13 in 'Unit13.pas' {WebModule1: TWebModule},
HitchHiker in 'HitchHiker.pas';
{$R *.RES}
begin
Application.Initialize;
Application.CreateForm(TWebModule1, WebModule1);
Application.Run;
end.
////////////////////////////////////////////////
unit Unit13;
interface
uses
SysUtils, Classes, HTTPApp, WSDLPub, SOAPPasInv, SOAPHTTPPasInv,
SoapHTTPDisp, WebBrokerSOAP;
type
TWebModule1 = class(TWebModule)
HTTPSoapDispatcher1: THTTPSoapDispatcher;
HTTPSoapPascalInvoker1: THTTPSoapPascalInvoker;
WSDLHTMLPublish1: TWSDLHTMLPublish;
private
{ Private declarations }
public
{ Public declarations }
end;

var
WebModule1: TWebModule1;
implementation
{$R *.DFM}
end.

///////////////////////////////////////////////////////
unit HitchHiker;
interface
uses
InvokeRegistry;
type
IHitchHiker = interface(IInvokable)
['{06723E05-662D-11D5-81CE-00104BF89DAD}']
function TheAnswer: Integer;
stdcall;
function TheQuestion: String;
stdcall;
end;

THitchHiker = class(TInvokableClass, IHitchHiker)
public
function TheAnswer: Integer;
stdcall;
function TheQuestion: String;
stdcall;
end;

implementation
{ THitchHiker }
function THitchHiker.TheAnswer: Integer;
begin

Result := 42
end;

function THitchHiker.TheQuestion: String;
begin

Result := 'Whatdo
you get when you multiply six by nine?'
end;

initialization
InvRegistry.RegisterInterface(TypeInfo(IHitchHiker));
InvRegistry.RegisterInvokableClass(THitchHiker);
end.

//////////////////////////////////////////////////////////////
 
你是否启动了web app debug???
 
难道真正应用时也要起web app debug吗?
我知道如果是dll的,放在iis可以执行的目录下就可以了,可是作成web app 。。。
方式的又怎样脱离delphi环境运行呢?
 
将project7.exe拷贝到Scripts路径下.
在浏览器地址栏中键入:
http://localhost/scripts/project6.exe/wsdl
看看有没有正确结果
 
很久都没有结果出来,但是如果起了web app debug就有结果了!
 
出错信息:
CGI Timeout
The specified CGI application exceeded the allowed time for processing.
The server has deleted the process.
 
web app debug server只是拿来开发时调试用的啊,真正用的时候你还要重新做成ISAPI
或者CGI的形式啊,把代码拷一下就得了。
 
这是已经编译好的CGI程序了,Web App Debugger是肯定用不到的啦。
我同意LeeChange的看法。
 
同意justcool!
 
顶部