Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to influence the URL to access a registered Delphi WebService

We've written a webservice dll with Delphi XE2 and it is running in our IIS7 server, accessible with the url http://server/webservice.dll/soap

To be able to debug the service, I've created a webservice.exe project, which can be run in the WebAppDebugger of Delphi. The problem now arrises that the webservice running in the debugger is accessible with the url http://localhost/webservice.webservice/soap

Our client application has the last part of the url "webservice.dll/soap" hardcoded (security reasons) so i cannot change that when testing with our client application, the server-address part "http://server/" is configurable in the client.

So, my question: How can i register the debug service in my webappdebugger to use an url like my production dll?

like image 732
Bascy Avatar asked Apr 12 '12 09:04

Bascy


1 Answers

I've found the solution myself ;-)

In the initialization of the debugform there was the following line:

TWebAppSockObjectFactory.Create('Webservice');

changing this to:

TWebAppSockObjectFactory.Create('dll');

made the overall address change to http://localhost/Webservice.dll/

This did leave a small problem that the debugger project had to be renamed to Webservice.exe in stead of WebserverDebug.exe as it was called, but moving it to subfolder made this rename possible.

like image 129
Bascy Avatar answered Nov 02 '22 15:11

Bascy