Web Service Application

In the Web-based modeler, the web services are invoked using the JAX-WS 2.0 library.

In case you import a model from Eclipse-based modeler which contains the classes generated through Axis 1.2 in web service application, then the engine won't be able to execute the model.

Viewing and Editing Properties

The following properties can be specified:


Figure: Web Service Application - Configuration

In case you switch to the Integrator profile, UUID and ID options are displayed additionally.


Figure: UUID and UI Properties

Configuration

Comments

Click the Comments tab to add comments for the application. To add the comment, specify the comment in the text box and click Submit. The newest comment gets displayed at the top of the table. To delete the comment, select the comment and click the Delete icon. The user, who has submitted the comment, only that user can delete the comment. If the other user selects the comment or no comment is selected, the Delete icon remains in disabled state.


Figure: Comments

Example

In this example, we are loading the http://{hostname}:{port}/{contextName}/services/WeatherForecast?wsdl wsdl in the web service application. Once the wsdl is loaded, the related service, port, operation etc are populated accordingly. As an effect, the structured data types GetWeatherByZipCode, WeatherForecasts and GetWeatherByZipCodeResult are created. Follow the steps to work with the web service application.

  1. Create a web service application. Specify following configuration properties:


    Figure: Web Service Application

  2. WSDL URL - Specify http://{hostname}:{port}/{contextName}/services/WeatherForecast?wsdl wsdl and click Load. Once the wsdl is loaded, the Service, Port, Operation and all the other fields get populated.
  3. The structured type named GetWeatherByZipCode gets created. The following screenshot displays its details.


    Figure: Structured Type - GetWeatherByZipCode

  4. The structured type named WeatherForecasts gets created. The following screenshot displays its details.


    Figure: Structured Type - WeatherForecasts

  5. The structured type named GetWeatherByZipCodeResult gets created. The following screenshot displays its details.


    Figure: Structured Type - GetWeatherByZipCodeResult

  6. Create a structured data named GetWeatherByZipCode6 and associate the structured type GetWeatherByZipCode to it as shown in the following screenshot.


    Figure: Structured Data - GetWeatherByZipCode

  7. Create a structured data named GetWeatherByZipCodeResponse7 and associate the structured type GetWeatherByZipCodeResponse to it as shown in the following screenshot.


    Figure: Structured Data - GetWeatherByZipCodeResult

  8. Now create a process containing service task and specify the web service application as the implementation. The following screenshot displays the properties of the service task.


    Figure: Service Task

  9. Switch to Integrator profile. In the Implementation property of the service task, select WebServiceAppl application as the Implementation.


    Figure: Web Service Task - Implementation

  10. Create a process and map data with tasks as shown in the following screenshot.


    Figure: Process

  11. Specify in data mapping between the service task and GetWeatherByZipCode6 structured data as shown in the following screenshot.

  12. Figure: Input Data Mapping

  13. Select parameters_struct(GetWeatherByZipCode) as the input access point. Note that this access point is created automatically when we load the web service.
  14. Specify output data mapping between the service task and GetWeatherByZipCodeResponse7 structured data as shown in the following screenshot.


    Figure: Output Data Mapping

  15. Select parameters_struct(GetWeatherByZipCodeResponse7) as the output access point. Note that this access point is created automatically when we load the web service.
  16. Deploy the model. In the Workflow Execution perspective, execute the process Test WS. Enter the zip code of your city and complete the activity.


    Figure: Enter Zip Code

The next activity displays the weather of the city.


Figure: Weather of the City