Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use WSDL dynamically in Delphi

How can I use dynamic WSDL, it's operations and parameters, which is given in program config file?

For example, we have a config file:

[Section]
WSDL=http://example.com/SomePub/ws/SomeService?wsdl
Username=myuser
Password=mypass
OperationName=MyOperation
ParameterName=MyParameter

I.e. we have to use web-service, which is unknown, but given (by ini-file) only in run-time. So, we cannot use WSDL Import wizard in Delphi.

Can we write in Delphi such a program, which would load these settings from configuration, and then pass data to specified operation in specified parameter on web-service, which specified by given WSDL?

like image 931
vladon Avatar asked Sep 04 '13 03:09

vladon


1 Answers

Using SOAPUI, import the service and perform a sample call. Copy the raw request and the raw response into notepad. Modify the real data with 'tags' and include each raw template as a value in your INI. When you need to make the call, open your INI, grab the raw response template and replace tags with real values. Manually send the SOAP request and parse the response in the same way using the raw template.

like image 81
Tim Armstrong Avatar answered Sep 28 '22 19:09

Tim Armstrong