Access Keys:
Skip to content (Access Key - 0)
Cancel    
Cancel   
 

Mule Components

Oct 01, 2013 13:12

Robin Pille

Dec 12, 2013 15:40

Mulesoft Current Mule Documentation

Mule Components

Mulesoft Documentation Page

Contents

Mule Components

Components are message processors which execute business logic on messages.  They enable you to perform specific actions without writing any Mule-specific code. You can drop a component – a POJO, Spring bean, Java bean, or script – into a flow to perform almost any customized task within your Mule application. For example, you can use a component to verify that items on an invoice are in stock in a warehouse, or to update a database with a customer's order history. 

Skip to the code

Scripting Components

Mule includes several scripting components that you can use in flows in order to execute custom business logic. These components enable you to drop a chunk of custom-written logic into your flow to act upon messages.  


The example below illustrates the use of a Groovy script component. The script uses the value of state to determine which of four sales regions to which to assign the lead.

 

Web Service Components

Also included are two components to facilitate exposing, consuming and proxying Web services. The SOAP component leverages the CXF framework Mule uses to support SOAP Web services; the REST component works with Jersey to support RESTful Web services; both are bound to HTTP.

APIkit offers a new and improved way of building a REST API. Access the APIkit Documentation to learn how to build REST APIs in a few hours or days.

 

HTTP Components

Further, Mule provides two HTTP components to facilitate working with calls over HTTP. Use the HTTP Response Builder to convert a message into a format consistent with HTTP responses; use the HTTP Static Resource Handler to easily serve up static content when called.

 

Other Components

Finally, Mule includes several other components designed to meet rather specific needs. 

  • Use a Logger component to log activities in the flow as they occur. 
  • Use an Expression component to evaluate a particular expression upon a message in a flow.
  • Use an Echo component to return the payload of a message as a call response.
  • Use a Flow Ref component to access another flow from within a flow.

Examples

Groovy Script Component

 

Web Service Components

    example.RestExampleResource

     

    HTTP Components

       

       

      Go Further