Mule ESB

Web Service Consumer Connector with Mule ESB CE

Most examples found in the official documentation and various blogs shows how to use the Web Service Consumer in Mule ESB Enterprise Edition. So they are using DataWeave or, for Mule ESB 3.6 or earlier, DataMapper to prepare the XML payload to be send. This is sometimes misinterpreted by users so that they think that the Web Service Consumer by it self is a Enterprise Edition only feature, when in fact it is available, and very useful, even in Mule ESB Community edition.
In this blog I will explain two ways to prepare the payload to be used by the Web Service Consumer when you can not or do not want to use DataMapper or DataWeave. I expect that the reader is familiare with the basics of creating a Mule ESB application and using the HTTP Listner connector aswell as the Web Service Consumer.

Building a HTTP Proxy flow in Mule 3.6+

Using a ESB to proxy incoming HTTP (and HTTPS) calls to an internal service, adding cross cutting concerns such as logging and authentication, is not uncommon. This blog will describe how to build such a proxy flow using Mule ESB 3.6.1 Community Edition.

What does the official documentation say ?

The official MuleSoft documentation includes a description on how to Proxying Your API how ever this guide is based on the assumption that you are using the Anypoint API Gateway which is part of MuleSofts AnypointPlatform offering.
Thus this guide is not applicable when working with the community edition of Mule ESB. Luckily we can still use much of this guide to build our own proxy flow.

Reading mail with Mule POP3S transport from server with selfsigned certificate

Mule ESB makes it very easy to process incomming e-mail messages using the POP3 protocol.

Here is a simple example that will check for new e-mail messages evry 10 seconds and print some basic header information together with the body.

However since POP3 is a clear text protcoll you should always make sure to secure it using Transport Layer Security (TLS). Fortuantly in Mule ESB equaly easy to use TLS secured POP3 (also known as POP3S). The flow below does the same as the previous but now the communication is secured.

Using MEL for your logging, filter, content based routes and transformation needs

One of the features of Mules ESB, that I find very useful, is the Mule Expression Language (MEL). It can be used not only for flow control and filters, in fact most of the components and transformers that come out-of-the-box with Mule ESB support that properties are specified using MEL.

The simplest example is when you want to use the default logger component to log some part of the message such as the payload and/or variables/properties.