Estudiante
Contents
1. 2. 3. Introduction .................................................................................................................................... 2 Prerequisites ................................................................................................................................... 2 Setup............................................................................................................................................... 2 3.1. 3.2. 3.3. 4. Get Apache Axis2 .................................................................................................................... 2 Populate MySQL Database ...................................................................................................... 2 Set up ODBC Access................................................................................................................ 3
Discovery ......................................................................................................................................... 4 4.1. 4.2. Web Service Creation using SOA Gateway ............................................................................. 4Accessing the WSDL ................................................................................................................ 6
5.
Accessing Web Service with Java .................................................................................................... 8 5.1. 5.2. Initial Setup............................................................................................................................. 8 Building the generated Code .................................................................................................. 9
6.
Writing the Code ........................................................................................................................... 10 6.1. 6.2. 6.3. 6.4. Simple Java Program............................................................................................................. 10 Example using Java Swing ..................................................................................................... 12 Building the Code .................................................................................................................. 20 Running the code.................................................................................................................. 20
7. 8.
Conclusion ..................................................................................................................................... 23 Appendix ....................................................................................................................................... 23 SimpleTest.java................................................................................................................................. 23 RisarisBankDemo.java ....................................................................................................................... 23
Accessing MySQL from Java
Author: Brian Reynolds, Risaris Ltd
1. Introduction
In this tutorial we will show you how to build aJava application to access MySQL via the SOA Gateway.
2. Prerequisites
It is assumed that you are running the 3 components, MySQL, Java and the SOA Gateway on Windows. It is assumed you already have a SOA Gateway server and Control Centre installed. See here for more info about installing the SOA Gateway.
3. Setup
To build and run Java application, you will need a Java-compatible IDE. Thereare many available to download, such as NetBeans, JCreator, and IntelliJ. For the purposes of this tutorial, we are going to use Eclipse. The main reason for this is that you are already using Eclipse to run the SOA Gateway control centre, all you need to do is open the Java perspective, by clicking Window, Open Perspective, Java.
3.1.Get Apache Axis2
Apache Axis2 is an open source web...
Regístrate para leer el documento completo.