Wednesday, April 22, 2015

Setup WSO2 ESB server and ActiveMQ server (Part 2)

We will create a simple proxy service to verify WSO2 ESB working fine.

From the part 1, the WSO2 ESB server has been installed in local machine, and we can get into it  through the URL:
The WSO2 ESB server - Console URL is  https://localhost:9443/carbon/admin/login.jsp

There is an echo service built in the wso2 ESB server. We will just add a simple proxy service to make sure it goes through.

    1) Go to WSO2 ESB console. Click on the left side Services - Add - Proxy Service.
On the middle of the window, choose Pass Through Proxy.



   2) Now you get into the page. Enter Proxy service name, and Target URL, then click Create button.



   3) Now you can see the service is in the deployed services list.
       Click source view link.


  4) In the source view window, we will use the follow xml document replace the default one. Then save it.

 <?xml version="1.0" encoding="UTF-8"?>  
 <proxy xmlns="http://ws.apache.org/ns/synapse"  
     name="echoProxy"  
     transports="https,http"  
     statistics="disable"  
     trace="disable"  
     startOnLoad="true">  
   <target>  
    <outSequence>  
      <send/>  
    </outSequence>  
    <endpoint>  
      <address uri="http://localhost:9763/services/echo"/>  
    </endpoint>  
   </target>  
   <publishWSDL uri="http://localhost:9763/services/echo?wsdl"/>  
   <description/>  
 </proxy>  


   5) Now click Try this service 


6) In the try echoProxy service window, we can change the attribute in the request window, then click send, in the response window, we can see the result.



If we get the return number as above, that means the simple proxy service is working in the wso2 esb server.



No comments:

Post a Comment