Using HTTP or SOAP to Get Information from MySQL
Several processes are defined that show how to get information from MySQL and Sakila, which is a sample database (included with MySQL) that has default schemas and tables.
Ensure to install JDBC Drivers for Design time and Run time.
For more information about a JDBC Connection shared resource, see the "JDBC Connection" section in the TIBCO ActiveMatrix BusinessWorks™ Bindings and Palettes Reference guide.
- Procedure
- In the samples directory, select and double-click tibco.bw.sample.palette.http.MultiEndpointApp. For more information, see Accessing Samples.
- In Project Explorer expand the tibco.bw.sample.palette.http.MultiEndpointApp project.
- Fully expand the Resources directory and then double-click HTTPConnectorResource.httpConnResource. Verify that the Host and Port values are correct.
- Double-click JDBCConnectionResource.jdbcResource and verify the database connection properties. Click the Test Connection button to verify your database configuration.
- Fully expand the Processes directory and double-click ActorService.bwp, FilmService.bwp, or SakilaService.bwp.
- Click .
- At the left hand tree of Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
- Click the Applications tab and then click the Deselect All button if you have multiple applications. Select the checkbox next to tibco.bw.palette.http.MultiEndpointApp.application.
- Click
Debug.
This runs the sample in Debug mode.
- Click the
Terminate
icon to stop the process.
Actor Name: CUBA OLIVIER
Film Title: ALIEN CENTERDescription: A Brilliant Drama of a Cat And a Mad Scientist who must Battle a Feminist in A MySQL Convention CUBA OLIVIER
Understanding the Configuration
Three processes are defined:
- ActorService Process: contains the HTTP Receiver requests the input query to retrieve actor information using JDBC Query Activity. The response is provided back to HTTP Response activity.
- FilmService Process: this process has logic similar to the ActorServer process to fetch film information using the JDBC Query activity.
- SakilaService Process: returns the actor information using the SOAP service, which invokes a JDBC Query and returns the result.