Creating a New Web Services (SOAP) ApplicationIn addition to database-driven applications, you can also create applications that interact with Web services. This chapter shows you how to generate an application against a SOAP service. To keep things simple, we create this as a separate application, but you could easily add this SOAP service to your existing database application.In order to create an application based on an external Web service, you need to understand the service that you want to access. SOAP services are defined in WSDL files, which you can view and edit in the Web Services Editor. At a minimum, you need to know:
• The input message for each operation you want to access, including all the message parts, their types and appropriate settings
• The output message for each operation you want to access, including all the message parts and their typesIn this tutorial, we create an application that includes a Google search operation. Google publishes the WSDL file, along with the relevant documentation, here:Look at the documentation that Google provides for the Web service and get a Google license key.
1.
2. Fig. 1 Create a New Project
4.
5. Fig. 2 Choose a Service
6. Fig. 3 Choose Operations
7. Fig. 4 Pick Message Parts ScreenHere you select the Message Parts that you want to include in the service call. By default, all the Message Parts are selected.
8.
9. Make the following selections in the Configure Message Parts screen:
Form Input
10. Click Next. The Pick Message Parts to Include in Result screen appears. This screen allows you to configure what you’re going to display in the search results page.
11. Fig. 6 Configure Results Page
12.
13. In the Request Page Name field, enter:Fig. 7 Name the Pages
15.
16. The Page Settings screen appears. Enter the following settings:
• In the Title field, enter:
• In the Footer field, enter:Fig. 8 Page Settings
17.
18.
19. Fig. 9 Enter a Name and Location
21. The ActiveGrid Studio generates a project file, called WebSearch.agp, a Page Flow file, called WebSearch.bpel, and other necessary files for the new application. All the files are listed in the Project Panel.
22. Double-click on the Page Flow file, WebSearch.bpel. The Page Flow appears in the Page Flow Editor (Figure 10).Fig. 10 The Page FlowTo run the application, right-click in the Page Flow Editor and select Run Process from the pop-up menu. The application runs (Figure 11).Fig. 11 The Running Application
ActiveGrid |
ActiveGrid Studio Tutorial |
Version 2.0 |