So... I am sorry if I have posted the question at the wrong place, yet I couldnt find a better place.
Anyway, my problem is as follows:
A week ago, we had to bring back to life some old projects of the firm. The projects are ... not too complex yet very big, and the real problem is that they are written in DELPHI 6 ... . The proccess of rewriting them on C# is soon to begin but we face the pending problem: The projects have to be operational, even only for inner firm operators. SO, an idea was born - to write wcf services for the database related operations of the delphi projects and then create the C# projects over that. So far so good, but here comes the bummer. We can't seem to find a way to consume the WCF from a delphi 6 project.
As my analisys goes so far, from articles in the internet, this is possible. However, I am not entirely sure that is possible on Delphi 6 (usually it is about higher versions of Delphi - 7, CodeGear and so on). As it is said, the best way to verify is to attempt, so ... we tried to connect an empty delphi project to a WCF Service. About the service:
The service is a simple WCF Service that we actually use in a different project written on Silverlight, and the Silverlight project has no problems consuming the service. What happens with Delphi:
Following tutorial procedure, we create a new delphi project -> new Project -> other. From the nodes we click 'Web Services' -> web services Importer... . Than in the new window we enter the adress of the service: http://serviceIp:port/Service.svc?wsdl -> button Generate and voala - a Unit file with the Services interfaces is generated. The file looks like this:
As promising as that looks it doesnt work. When build the compilator returns error - Undeclared identifier FOR ABSOLUTELY every single one of the procedures.
We tried so many things that I cant even remember now, yet we cant get rid of this error (we can change it with a different one but stil ... ).
As I have absolutely no knowledge of Delphi, Pascal or whatever, I dont know if this is something, but I notice that the procedure parameters are not a list of the real parameters of the service method, yet just the name of the procedure itself. Ex - 'procedure SelectAllImotsByEKATTE(var parameters: SelectAllImotsByEKATTE); stdcall;' - is 'public List<string> SelectAllImotsByEKATTE (int number, string byName);' in the service.
Ok, I think I covered as much as I could, if there is anything else that needs to be explained just say so. I will truly appriciate if someone can help find the answers to these questions:
Is Delphi 6 at particular able to consume WCF Services.
If it does, what are we doing wrong
Any ideas if we can get rid of the Undeclared Identifier...
Is it possible that the problem is in the configuration of the WCF Service.
Any and all help will be really appriciated. Sorry for the long post.
We have had similar issues even with XE2 and have finally abandoned it. Somehow what's generated is not usable enough, or a lot of definitions are missing. We've been unable to find any reasonable solution around this problem. Even changing the output by hand was not enough to get things going (and you do not want to start building and posting XML). If you do find something, please share.