WSO2 ESB SugarCRM Proxy Service
The article was created and inspired by a request sent to me a few days ago. Exactly the question read: How can I configure a Proxy Service for SugarCRM on WSO2 Enterprise Service Bus (ESB)? The answer to the question was simple enough and in the course of this article we will see how easy it is to configure a Proxy Service.
1. What is a Proxy Service
A Proxy Service is a virtual service that receives messages and optionally processes them before being forwarded to a service defined by an endpoint. This approach allows you to perform the necessary transformations and introduces additional functionality without changing the existing service. For example, if you want to use WS-Security with an existing service is not secure, you can create a proxy service safely through the enabling of module WS-Security specifying a security policy. In addition, you can create a proxy service to transform requests and responses based on configurations XSLT . A proxy service can also make the switch on the transport protocol and interface, message processing through the mediation sequences and tasks, interrupting the flow or send a message to the client even without sending it to the actual service.
You can create the following types of proxy services:
- Pass Through Proxy: forwards the messages to the endpoint without performing any processing on them;;
- Secure Proxy: Use WS-Security to process incoming requests and forward them to the back-end service is not secure;
- WSDL Based Proxy : A proxy service is created from a remote WSDL of a web service exists. The information on the end point are extracted from the WSDL;
- Logging Proxy : Log all incoming requests and forwards them to a given endpoint. It can also record the responses from the backend service prior to routing to the client;
- Transformer Proxy : Turn all incoming requests using XSLT and then forwards them to a given endpoint. It can also transform responses from the backend service;
- Custom Proxy : A proxy personalized service where you can customize the sequences, endpoints, transport and other settings for QoS .
A proxy service is created and exposed on certain transport (http/s, JMS, VFS, etc…) through the Axis2 engine and can be either SOAP or REST/POX. L ‘EPR (End Point Reference) of the proxy service is built according to the name of the service, as required by the standard adopted by Axis2.
2. Pass Through Proxy Configuration
In the case of the proposed study, the type of proxy service that you create is a Pass Through Proxy as indicated in Figure 1.
The creation of a Pass Through Proxy requires knowledge of the following basic elements:
- Name for the service;
- Target end point: End point of the backend service. E ‘can specify either the URL or select the end point from the register of WSO2;
- URI of the WSDL document of the service backend. As for the target endpoint, you can specify either the URL or select the resource (WSDL) from WSO2 Registry;
- The transport type (http, https, local, etc …).
Figure 3 shows the configuration of the proxy service from the management console, in Figure 4 the list of installed services, while at Listing 1, the XML configuration of the proxy service. Once the configuration of the proxy service is terminated and the deployment was successful, the service will be online and ready to be called:
- End Point of the service: http://esb-shiruslabs.dontesta.it:8280/services/SugarCRMProxy
- WSDL of the service: http://esb-shiruslabs.dontesta.it:8280/services/SugarCRMProxy?wsdl
3. Testing the Proxy Service
Using the management console of WSO2 you can run tests on the service you just created and verify that everything is working properly. Access to GUI testing is done directly from the list of services (see Figure 4) by clicking the “Try this service”. The interface is quite simple, for those who are accustomed to the use of SoapUI or similar instruments will not be anything new. On the left bar lists the operations available on the service and the central part there are two boxes, left the box for the SOAP message request, the box on the right that shows the SOAP message response.
4. Monitoring services
WSO2 ESB provides a variety of options to monitor and manage the performance of the server, through a series of monitoring tools accessible directly from the management console, as well as Java Management Extensions (JMX). The data collected from these control mechanisms ESB can be used to regulate the flow of messages on the bus, to detect fault mediation and track messages. The platform allows you to perform statistics on the following:
Furthermore, WSO2 ESB exposes a series of management resources as JMX MBean that can be used to manage and monitor the server, these can be accessed remotely using a JMX client such as JConsole or Visual VM. Several JMX MBeans are exposed via SNMP as a result you can use tools like Nagios to run the server monitoring.
In the following figures shows some statistical data on the proxy service SugarCRMProxy just created.
It was easy to configure a proxy service, right? The creation of the proxy service did not require a single line of code, have been carried out configuration. Even the most complex cases, involving for example mediation sequences, balancing endpoint, etc… can be resolved through configuration-only operations. An added value of the platform are the services of monitoring and QoS free to allow you to monitor the services and add new functionality as WS-Security, Response Caching, etc….
Vi siete mai chiesti cos'è e come funziona il sistema di Security Audit di Liferay? Ho cercato di rispondere alla domanda non soffermandomi solo al "cosè e come funziona", sono andato ben oltre. Non vi resta che leggere questo EBook per scoprire.