Overview
The wso2 enterprise integrator is new to industry. This example use case will help you understand how to develop a end to end scenario using wso2 developer studio and wso2 enterprise integrator on windows environment.
Use Case
As an integration engineer, I have a soap web service hosted on one of our internal server and I want to expose the same web service to external world using wso2 enterprise integrator 6.1.1.
You can see this as a trivial example. But I hope, this would help understand for a newbie to move to the integration world.
Sequence Diagram
Setting Up Environment and Sample Web Service
Here we use Windows environment for this use case implementation.
Download, install and start EI 6.1.1
https://wso2.com/integration#download
We better use ‘git bash’ ui to start the enterprise integrator on windows.
./integrator.sh
Download, install and start WSO2 developer studio
https://wso2.com/products/developer-studio/
Setup Simple Quote Web service
First fix the sample issue in ei-6.1.1
Issue: There is a known issue in ei6.1.1 that its sample web services are unable to start. Server could not start due to class loading issue java.lang.NoSuchMethodException: samples.util.SampleAxis2Server https://github.com/wso2/product-ei/issues/570 Solution: Copy this file to your local location - https://github.com/madhawa-gunasekara/product-ei/blob/6796ad68c2773baf0d3cbd700960202dbbb6cddf/samples/product/src/main/scripts/axis2server.bat
Build SimpleStockQuote Axis web service sample
cd F:\software\wso2\wso2ei-6.1.11\wso2ei-6.1.1\samples\axis2Server\src\SimpleStockQuoteService ant
Start the Axis server
cd F:\software\wso2\wso2ei-6.1.11\wso2ei-6.1.1\samples\axis2Server axis2server.bat
Verify samples using following URL
http://localhost:9000/services/
Design Proxy Service Using Developer Studio
Create ‘ESB Config Project’
- Open developer studio dashboard
- Click ‘ESB Config Project’
- Create ‘simple-quote’ project
Create Address Endpoint
- Click ‘Endpoint’ from dashboard
Create Custom Proxy Service
- Click ‘Proxy Service’ from dashboard
- Drag and drop Send Mediator and Created Endpoint for request path
- Add a Send mediator to response path as well.
- Go to source view of the proxy and set the publishing WSDL as follows
<publishWSDL uri=”http://localhost:9000/services/SimpleStockQuoteService?wsdl”/>
Without this setting proxy does not expose any methods to outside
Create ‘Composite Application Project’ from far right of the dashboard
This is to build the car application.
- Click ‘Composite Application Project’ from dashboard
Please make sure to select your dependencies correctly as shown.
Connect EI server to eclipse
- Click Server from dashboard
Build two projects from maven and deploy from UI
Login to management console and test the service
- Click Try It
- Select getSimpleQuote method from left pannel
- Send