I like the idea of clean easily read XML configuration in my Mule projects. Therefore I externalize DataWeave transformations , SQL quires and other content. In this article I will compare assets that Mule gives as to achieve externalization of such things in Mule 3 and Mule 4.
DataWeave Modules, new way to introduce reusability
It is always desirable to reuse as much code as possible. We can do the same regarding DataWeave transformations and custom functions. In this article, I will describe how to reuse code in the newest DataWeave using modules. For those working with DataWeave 1.0, I will describe how to reuse code with readUrl function. DataWeave…
Property placeholder’s issue in MUnit
In this brief article I will describe the problem and solution that I have lately faced. As it is a good practice not to hard-code connection data I have extracted them to external file called connection.properties. I did not expect to receive an error something like $[smtp.host]. I did not know what it can means. Below I have described what it is.
Huge number in exponential notation in DataWeave. How to convert it?
In the last article, I have described a nuisance with casting to an integer value. This time we will look at huge numbers and their formatting. In addition, I will mention scientific notation. All these topics are around the number format used by the DataWeave engine. So let’s see what the problem looks like. Problem…
Routing SOAP messages in Mule CE
Anyone who has designed RESTfull API appreciate API Kit Router available in Mule. It not only generates flows based on API definition but also route and validate messages. Our flows looks more concise and easy to read. This feature is available for both Community and Enterprise editions. For SOAP Web Services SOAP Router is available. However this time this utility works only for Enterprise Edition. Some time ago I developed a couple of services on Mule Community Edition. All services have WSDL contracts and I must say that when I now think about the implementation I would appreciate such router. So I have decided to write something similar that would work for Mule CE.
How to convert decimal number into integer using DataWeave
This article is about converting decimal numbers into integer ones. This may seem tricky at first. You may say that we do not need to do anything special and the DataWeave engine will handle it underneath. However, there is a nuance that you should be aware of. In transformation to XML, this may not actually…
How to avoid repetition in DataWeave for conditional checks?
Tip number 1 will be about data existence check. There is often a situation that nearly the same conditions need to be checked in every line. I have seen many transformations that were really long and complex. Reading them was not only difficult but a lot of repeatable conditional checks were made. Here I will…
Entry Point Resolver how the message is passed
Sometime it is needed to use custom JAVA code to processes current message. Developed custom code is known as Java Component. How mule knows which method should invoke and what parameters should be there passed? There are some rules that your class may full fill in order to work without any additional configuration. However when you have more sophisticated use case or class is fairly complex you would probably need Entry Point Resolver configured. I will explain on simple examples some of them. This is valid for Mule version 3.x. In next article I will describe in more detail new Java Module available in version 4.x.
Web Service Consumer – a simple way to handle SOAP service
In my previous post, I have described the usage of the CXF proxy client to consume soap web service. We will create a similar service but this time we will use Web Service Consumer. Background We are going to create in mule simple service which consumes SOAP Web Service. The client can call our flow…
CXF proxy client – consume SOAP web service
When it is time to consume the SOAP Web Service mule has a couple of ways to handle this task. There was a time when I would generate stub classes based on the WSDL file, but I wanted to create flows without generating a single line of code. So I found out that we could use a…