开发者

Installing a delphi 7 isapi web service

I have developed an isapi web service in delphi 7 and I need to install it in a server so it can be consumed by a c# application.

I copied the dll of the isapi in a folder and created a virtual directory in the IIS of the server.

When I call the web service from the browser (http://localhost/webservi开发者_运维知识库ce/ws.dll) the website for the web service that delphi creates for default appears. If I create the web reference in the C# application the reference is loaded normally using the URL I provided above.

The problem is that when I debug the C# application step by step, it calls a function inside the delphi web service but it doesn't do anything. The web service doesn't return anything.

I remember I had a similar problem before and the way to fix it was to copy some delphi dll's to the system32 folder of the server in which I was installing the web service but I don't remember which files I needed to copy and if that actually solves the problem.

Consuming the web service doesn't throw any exception inside the .net application. It just doesn't do anything. The functions returns nothing.

Any ideas?


The problem was the following.

My web service is used to consume another guy's delphi web service. I had to develop this web service since there is a .NET application that should consume the other guy's delphi web service but the guy that developed it used complex data types that .NET doesn't support. So I had to develop my web service to act as a translator. I used .NET supported data types in that one and the .NET application consumes my delphi web service just to consume the other guy's web service. It's kind of messy but I wasn't able to persuade the other guy to use standard data types. My web service has a routine that takes the SOAP URL's from the other guy's web service from an ini file. I didn't remember that I developed that routine to look for that ini file in a specific path.

The routine looks like this:

 ifParams:=TIniFile.Create('C:\BancorTranslator\BancorTranslator.ini');
 HostAnula:= ifParams.ReadString('GLOBAL','HOSTANULA','');
 HostDepos:= ifParams.ReadString('GLOBAL','HOSTDEPOS','');
 HostTrans:= ifParams.ReadString('GLOBAL','HOSTTRANS','');
 HostConsu:= ifParams.ReadString('GLOBAL','HOSTCONSU','');

I had the ini file in a different location so when my web service tried to consume the other guy's web service, the SOAP URL's configured in my web service were blank. I changed the routine to look for the ini file in the same folder where my web service is being hosted and it works fine now. No need to copy any files in the system32 folder. It was my mess.

Thank you all for your help ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜