While your project is open in Delphi, follow the link:
File | New | Other ... | Delphi Projects | WebServices | Importer WSDL
Now the WSDL Importer Wizard will begin. Enter the WSDL address for your web service and click Next. It will show you various WSDL processing options. If necessary, you can change the settings. In the end, when the wizard is complete, you will have a new block in your project that contains the client-side shell classes and interfaces for your web service. Now you can use this class in different ways. The easiest way is to call a function called Get (Your_WebService_Name). For example, if your web service name is TestWebService, the function will be called GetTestWebService.
The function will return an interface, which is the same interface as your web service, now you can call the methods of this interface and it automatically passes the request to the remote server and returns the result back to you. A sample source code might look like this:
var MyTestService: ITestService; begin MyTestService := GetTestService(); MyTestService.TestMethod; end;
Another option is that you manually configure the THttpRio object and use it. In fact, this is what the Get (Your_WebService_Name) function does inside.
source share