How to override a service name in WSDL using Delphi XE2?

I am using Delphi XE2 to create a webservice application. However, I need to determine the name of the service according to the external specification.

Delphi adds a β€œservice” to the default service name. Is it possible to override this?

The "service" is added in the TWebServEx.GenerateWSDL method (Soap.WebServExp, line 261).

+4
source share
1 answer

You can use the OnAfterPublishingWSDL event of your TWSDLHTMLPublish component to change the service name:

 procedure TMyWebModule.WSDLHTMLPublishAfterPublishingWSDL(const WSDLDoc: IWSDLDocument); begin WSDLDoc.Definition.Attributes[SName] := 'MyServiceName'; end; 
+6
source

Source: https://habr.com/ru/post/1432079/


All Articles