From: http://www.bobswart.nl/weblog/Blog.aspx? Rootid = 5: 798
ACouple of years ago I wrote an article consuming C # web services with Delphi 7 Professional, and while the information in the article is still correct, it's no longer complete, because ASP. NET 2.0 changed the rules a little bit.
Even if you follow the examples exactly on creating the Web service in C # and in creating the consuming application in Delphi for Win32, no matter what you try to echo, the result will always come back as 0 for numbers or as an empty string for strings.
This is due to the fact that the C # Web Service is deployed on an ASP. NET 2.0 machine (which changed some of the ways WSDL was published compared to. NET 1.1 ).
The problem is caused by the fact that any. NET web service is using the document | literal binding. with ASP. NET 1.x web services, this was specified using Element, but with ASP. NET 2.0 Microsoft has changed that and now specifies the style in the Operation input and output nodes instead of the binding element. the Delphi Win32 WSDL importer is not able to recognize this, and as a result the generated import unit is using the (for Delphi default) binding type of RPC instead of. net document | literal binding type.
Codegear is aware of the situation, and is already working on fixing the problem in the Win32 WSDL importer. in the meantime, there is a workaround available that you can use, namely manually specifying the iodocument as invokeoptions for the soap interface type, as follows:
Invregistry. registerinvokeoptions (typeinfo (XXX), iodocument );
Where xxx is the name of your soap interface type.
This line of code needs to be added to the initialization section of the generated Win32 import unit, and will make sure the parameters and result types are no longer empty when Win32 clients are talking to ASP. NET 2.0 web services.