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, specify the file name of a WSDL document (or XML file) or provide the URL where that document is published. If you do not know the URL for the WSDL document you want to import, click Search UDDI. This launches the UDDI browser
  5. If the WSDL document is on a server that requires authentication, click Options. An Import Options dialog box appears.
  6. Enter a user name and password before the wizard can retrieve the WSDL document.
  7. 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.
  8. 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.

To use the UDDI Browser

  1. In the UDDI Browser, indicate the UDDI registry.
  2. To locate the business from which you want to import a Web Service, enter the name of the business.
  3. For exact match and a case sensitive search, click the check boxes, Exact Match and Case Sensitive.
  4. In the Rows text box, enter the number of matches you want.
  5. To specify the order of the results, in the Sort drop down list, choose from Name, Description, LastUpdatedDescending, and LastUpdatedAescending.
  6. Click Find. All of the matches appear in the tree view in the upper right corner. When you select a TModel that represents a Web Service with a WSDL document, the Import button becomes enabled.
  7. Click the Import button.

Web Services Overview 

Using Web Services 

Accessing a "Hello World" Web Services Application

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!