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
- Choose FileNewOther. The New Items dialog box appears.
- Select WebServices folder.
- Double-click the Soap Server Application icon. The SOAP Server Application wizard opens.
- 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.
- To create a a Web Service from scratch, click Yes. The Add New Web Service wizard opens.
- 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.
- 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
- Choose FileNewOther. A New Items dialog appears.
- Select WebServices folder.
- Double-click the icon labeled WSDL importer. A WSDL Import Wizard appears.
- 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.
- 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.
- 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.
- 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.