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:

  1. Pass Through Proxy: forwards the messages to the endpoint without performing any processing on them;;
  2. Secure Proxy: Use WS-Security to process incoming requests and forward them to the back-end service is not secure;
  3. 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;
  4. 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;
  5. 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;
  6. Custom Proxy : A proxy personalized service where you can customize the sequences, endpoints, transport and other settings for QoS .

The easiest way to create and manage a proxy service is through the management console, you can still use the environment as well as WSO2 Studio manually configure via the configuration file XML .

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.

Figura 1. Web Service Proxy

Figure 1. Web Service Proxy

The creation of a Pass Through Proxy requires knowledge of the following basic elements:

  1. Name for the service;
  2. 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;
  3. 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;
  4. The transport type (http, https, local, etc …).
Figura 2. SugarCRMProxy Proxy Service

Figure 2. SugarCRMProxy Proxy Service

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
Figura 3. Configurazione Proxy Service di SugarCRM

Figure 3. Configuration Proxy Service for SugarCRM

Figura 4. Lista servizi installati sull'ESB

Figure 4. List of the services deployed on ESB

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.

Figura 5. Test del servizio SugarCRMProxy

Figure 5. Testing of the service SugarCRMProxy

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:

  • System
  • Transport
  • Mediation

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.

Figura 6. Overview del servizio SugarCRMProxy

Figure 6. Overview of the service SugarCRMProxy

Figura 7. Tracker messaggi SOAP del servizio SugarCRMProxy

Figure 7. Tracker of the SOAP messages.

5.Conclusions

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….

Enhanced by Zemanta
Liferay Portal Security AuditCos'è e come funzione il framework di Security Audit

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.

Ottieni il tuo EBook

Antonio Musarra

I began my journey into the world of computing from an Olivetti M24 PC (http://it.wikipedia.org/wiki/Olivetti_M24) bought by my father for his work. Day after day, quickly taking control until … Now doing business consulting for projects in the enterprise application development using web-oriented technologies such as J2EE, Web Services, ESB, TIBCO, PHP.

You may also like...

Liferay SSL/TLS SecurityCome configurare il bundle Liferay per abilitare il protocollo SSL/TLS

Sei curioso di scoprire come configurare il bundle Liferay per funzionare in modalità sicura tramite protocollo SSL/TLS? In questo eBook ( #LFRDEPGUIDE ) ti spiego come farlo step-by-step; per il bundle Apache Tomcat e WildFly. Ricorda di lasciare un tuo feedback dopo averlo letto.