RAD Studio
ContentsIndex
PreviousUpNext
Using the SOAP Application Wizard

Web Service applications are a special form of Web Server application. Because of this, support for Web Services is built on top of the Web Broker architecture. To understand the code that the SOAP Application wizard generates, therefore, it is helpful to understand the Web Broker architecture. Information about Web Server applications in general, and Web Broker in particular, can be found in Creating Internet server applications and Using Web Broker

To launch the SOAP application wizard, choose FileNewOther, and on the WebServices page, double-click the Soap Server Application icon. Choose the type of Web server application you want to use for your Web Service. For information about different types of Web Server applications, see Types of Web server applications

The wizard generates a new Web server application that includes a Web module which contains three components:

  • An invoker component (THTTPSOAPPascalInvoker). The invoker converts between SOAP messages and the methods of any registered invokable interfaces in your Web Service application.
  • A dispatcher component (THTTPSoapDispatcher). The dispatcher automatically responds to incoming SOAP messages and forwards them to the invoker. You can use its WebDispatch property to identify the HTTP request messages to which your application responds. This involves setting the PathInfo property to indicate the path portion of any URL directed to your application, and the MethodType property to indicate the method header for request messages.
  • A WSDL publisher (TWSDLHTMLPublish). The WSDL publisher publishes a WSDL document that describes your interfaces and how to call them. The WSDL document tells clients that how to call on your Web Service application. For details on using the WSDL publisher, see Generating WSDL documents for a Web Service application.
The SOAP dispatcher and WSDL publisher are auto-dispatching components. This means they automatically register themselves with the Web module so that it forwards any incoming requests addressed using the path information they specify in their WebDispatch properties. If you right-click on the Web module, you can see that in addition to these auto-dispatching components, it has a single Web action item named DefaultHandler

DefaultHandler is the default action item. That is, if the Web module receives a request for which it can't find a handler (can't match the path information), it forwards that message to the default action item. DefaultHandler generates a Web page that describes your Web Service. To change the default action, edit this action item's OnAction event handler. 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!