Illustrates how to use Mule to create a SOAP webservice without writing Java code. This example application complements How To Series - Part 1. You can create this SOAP service in front of a MySQL database.
After reading this document, creating, and running the example in Mule, you should be able to leverage what you have learned to create a simple SOAP web service in front of any integration application.
In this example, a user calls the Mule application by submitting a
request via a SOAP client (ex-SOAPUI). The application receives the request with a customerID or loanID. It uses the input request parameter to lookup the loan database table. The database record is returned in SOAP response message to the SOAP client.
As with other examples, you can create template applications straight out of the box in Anypoint Studio. You can tweak the configurations of these use
case-based examples to create your own customized applications in Mule.
Follow the procedure below to create, then run the application.
Download and setup the MySQL driver in it's default location. You can check out some of the YouTube videos for assistance with this step.
Start the MySQL server from System Preferences
Open the Example project in Anypoint Studio from Anypoint Exchange.
Open src/main/resources/loan.sql and run it in your mysql instance. This script creates a table name "loan" and loads it with mock data.
Open soap-on-db.xml file located in src/main/app directory. Set url attribute of the db:mysql-config element to:
<db:mysql-config name="MySQL_Configuration" host="localhost" port="3306" user="<username>" password="<password>" database="bank" doc:name="MySQL Configuration"/>
Configure the username and password as per the database being used.
Run the example application in Anypoint Studio or Standalone.
Open SOAP UI. Create a new project and point it to the WSDL URL (http://localhost:8081/bank/loan?wsdl). In the request message populate the loanId or customerId for the lookup and press send.