24 Sep

Modify input file name while moving to another directory using Mule ESB

In this tutorial I am going to show you how we can move files from one directory to another directory in Mule ESB. We will use File Connector to take an Excel file as input  and this Excel file will be moved to another directory but with modified name.

You can see also File transfer from source directory to destination directory in Mule ESB

Read More

08 Jul

Convert JAXB Object to XML in Mule ESB

In this tutorial I am going to show you how we can convert JAXB object into XML data in Mule ESB. We will use File Connector to take an XML file as input then we will map it to an appropriate JAXB object, then finally we will convert the JAXB object back into XML data.

You can see also Convert XML to JAXB Object in Mule ESB

The JAXB transformers allow objects to be serialized to XML and back again using the JAXB binding framework.

Java Architecture for XML Binding (JAXB) allows Java developers to map Java classes to XML representations. JAXB provides two main features: the ability to marshal Java objects into XML and the inverse, i.e. to unmarshal XML back into Java objects. In other words, JAXB allows storing and retrieving data in memory in any XML format, without the need to implement a specific set of XML loading and saving routines for the program’s class structure.

Mule support binding frameworks such as JAXB and Jackson. These frameworks use annotations to describe how data is mapped to a Java object model. Reference https://docs.mulesoft.com/mule-user-guide/v/3.7/jaxb-transformers

Read More

07 Jul

Convert XML to JAXB Object in Mule ESB

In this tutorial I am going to show you how we can convert XML data into JAXB object in Mule ESB. We will use File Connector to take an XML file as input then we will map it to an appropriate JAXB object.

You can see also Convert JAXB Object to XML in Mule ESB

The JAXB transformers allow objects to be serialized to XML and back again using the JAXB binding framework.

Java Architecture for XML Binding (JAXB) allows Java developers to map Java classes to XML representations. JAXB provides two main features: the ability to marshal Java objects into XML and the inverse, i.e. to unmarshal XML back into Java objects. In other words, JAXB allows storing and retrieving data in memory in any XML format, without the need to implement a specific set of XML loading and saving routines for the program’s class structure.

Mule support binding frameworks such as JAXB and Jackson. These frameworks use annotations to describe how data is mapped to a Java object model. Reference https://docs.mulesoft.com/mule-user-guide/v/3.7/jaxb-transformers

Read More

02 Jul

Convert file data to map-payload and insert into MySQL using Mule ESB

This tutorial will show you how to use Mule JDBC Transport to convert text file data to Map and insert into MySQL database in Mule based application. You may also review Mule JDBC Insert Example and Dump CSV data into MySQL Database using Mule ESB

Connectors provide an abstraction layer over data transport mechanisms. Connectors exist for things such as files, email messages, databases, JMS, and even Jabber messages. A connector saves you the tedium of having to implement the details of a particular communication mechanism yourself. This allows you to focus on solving your integration problem and not on the plumbing of a particular communications protocol.

The JDBC Transport lets you send and receive messages with a database using the JDBC protocol. Common usage includes retrieving, inserting, updating, and deleting database records, as well as invoking stored procedures, such as, to create new tables dynamically.

In our example, we’d require a File connector and a Database connector. The File connector would provide the payload or content which needs to be inserted into database. The Database connector would provide the capacity to insert the data or payload to the target database. Read More

01 Jul

Dump CSV data into MySQL Database using Mule ESB

This tutorial will show you how to use Mule JDBC Transport to dump CSV data into MySQL database in Mule based application. You may also review Mule JDBC Insert Example

Connectors provide an abstraction layer over data transport mechanisms. Connectors exist for things such as files, email messages, databases, JMS, and even Jabber messages. A connector saves you the tedium of having to implement the details of a particular communication mechanism yourself. This allows you to focus on solving your integration problem and not on the plumbing of a particular communications protocol.

The JDBC Transport lets you send and receive messages with a database using the JDBC protocol. Common usage includes retrieving, inserting, updating, and deleting database records, as well as invoking stored procedures, such as, to create new tables dynamically.

In our example, we’d require a File connector and a Database connector. The File connector would provide the payload or content which needs to be inserted into database. The Database connector would provide the capacity to insert the data or payload to the target database. Read More

29 Jun

Mule JDBC Insert Example

This tutorial will show you how to use Mule JDBC Transport to insert data into MySQL database in Mule based application.

Connectors provide an abstraction layer over data transport mechanisms. Connectors exist for things such as files, email messages, databases, JMS, and even Jabber messages. A connector saves you the tedium of having to implement the details of a particular communication mechanism yourself. This allows you to focus on solving your integration problem and not on the plumbing of a particular communications protocol.

The JDBC Transport lets you send and receive messages with a database using the JDBC protocol. Common usage includes retrieving, inserting, updating, and deleting database records, as well as invoking stored procedures, such as, to create new tables dynamically.

In our example, we’d need a File connector and a Database connector. The File connector would provide the payload or content which needs to be inserted into database. The Database connector would provide the capacity to insert the data or payload to the target database. Read More

23 Jun

Mule VM Transport with File Connector Example

This tutorial will show you how to use VM Transport with File Connector in Mule based application.

You can see the same tutorial in youtube video https://youtu.be/OQUqruRJbrU

You may like the other tutorial Mule VM Transport with HTTP Example

What is VM Transport

The VM transport is nothing but an in-memory transport. Therefore when a message has to be passed through a VM endpoint, i.e., the message is being transferred from one endpoint to another endpoint in memory. So the VM transport can be used for intra-JVM communication between Mule flows. It can be used only in single Mule application and cannot be used to communicate between two or more Mule applications. This transport by default uses in-memory queues but can optionally be configured to use persistent queues. However, VM file persistency does not work on clusters.

By default VM transport is synchronous – messages pass through VM transport are delivered in a point-to-point fashion.

What is File Connector

The File connector allows your Mule application to exchange files with a file system. You can implement the File connector as an inbound endpoint (such as, a message source), or as an outbound endpoint. This endpoint implements a one-way exchange pattern only.

We simply put a file in a source directory and Mule will read the file from the source directory. Using Mule ESB it’s very easy to read the file from a location. If we had to read the file using manual coding then we had to write many lines of code. But using Mule ESB we just simply put a file in a directory and let the Mule know the file path and Mule does the rest of the thing. You can put any kind of file to the source for reading.

Read More

19 Oct

Append-String Transformer in Mule ESB

What is Mule ESB ?

Mule ESB is a lightweight Java-based enterprise service bus (ESB) and integration platform that allows developers to connect applications together quickly and easily, enabling them to exchange data. Mule ESB enables easy integration of existing systems, regardless of the different technologies that the applications use, including JMS, Web Services, JDBC, HTTP, and more.

This example shows how we can read a file from a source directory and append a string to the file content and display it into the console. We simply put a file in a source directory and Mule will read the file from the source directory. Using Mule ESB it’s very easy to read the file from a location. If we had to read the file using manual coding then we had to write many lines of code. But using Mule ESB we just simply put a file in a directory and let the Mule know the file path and Mule does the rest of the thing. You can put any kind of file to the source for reading. Read More

30 Aug

File transfer from source directory to destination directory in Mule ESB

Mule ESB is a lightweight Java-based enterprise service bus (ESB) and integration platform that allows developers to connect applications together quickly and easily, enabling them to exchange data. Mule ESB enables easy integration of existing systems, regardless of the different technologies that the applications use, including JMS, Web Services, JDBC, HTTP, and more.

This example shows how you can transfer or move a file from a source directory to destination directory. We simply put a file in a source directory and Mule will move the file to the destination directory. Using Mule ESB it’s very easy to move the file from one location to another location. If we had to move the file using manual coding then we had to write many lines of code and we could have moved the file to the destination. But using Mule ESB we just simple create two file endpoints and tell the source and destination path and Mule does the rest of the thing. You can put any kind of file to the source for transferring to the destination. Read More

Share