RAD Studio
ContentsIndex
PreviousUpNext
Building a "Hello World" Web Services Application

Web Services are self-contained modular applications that can be published and invoked over a network (such as the World Wide Web). Web Services use SOAP, a standard lightweight protocol for exchanging information in a distributed environment. It uses HTTP as a communications protocol and XML to encode remote procedure calls.

To build a "Hello World" Web Services application

  1. Choose FileNewOther. The New Items dialog box appears.
  2. Select WebServices folder.
  3. Double-click the Soap Server Application icon. The SOAP Server Application wizard opens.
  4. Choose the type of Web server application you want to use for your Web Service. The wizard generates a new Web server application that includes a Web module that contains three components—HTTPSoapPascalInvoker, HTTPSoapDispatcher, and WSDLHTMLPublish. When you exit the SOAP Server Application wizard, it asks you if you want to define an interface for your Web Service.
  5. To create a a Web Service from scratch, click Yes. The Add New Web Service wizard opens.
  6. To add a new Web Service, specify the name of the invokable interface you want to expose to clients. The Add New Web Service wizard lets you specify the name of the invokable interface and generates the code to declare and register the interface and its implementation class.
  7. To implement a Web Service that has already been defined in a WSDL document, use the WSDL importer to generate the interfaces

To use the WSDL importer

  1. Choose FileNewOther. A New Items dialog appears.
  2. Select WebServices folder.
  3. Double-click the icon labeled WSDL importer. A WSDL Import Wizard appears.
  4. In that dialog box, either specify the file name of a WSDL document (or XML file) or click the ellipsis button [...] to browse for the file.
  5. If the WSDL document is on a server that requires authentication, click Options. On the Import Options dialog box, enter the user name and password required before the wizard can retrieve the WSDL document. After completing the import options, click OK.
  6. Click Next. The WSDL importer displays the code it generates for every definition in the WSDL document that is compatible with the Web Services framework.
  7. Click Finish. The importer creates new units that define and register invokable interfaces for the operations defined in the document, and that define and register remotable classes for the types that the document defines.

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