The building blocks known as Components fall into three categories: General, Script, and Web Service.
General components execute whenever a message is received. The logic embedded into General components cannot be modified. Components such as Logging, Flow Reference, and Echo fall into this category.
Script components do not contain pre-packaged logic; instead they allow the developer to specify the logic (in the form of a custom script or a Java class) to add into the component. Script components also allow you to:
The Java Component allows you to reference a Java class. The other Script components support the Groovy, JavaScript, Python and Ruby scripting engines.
Web Service components, as the name implies, enable Mule to use SOAP and RESTful protocols to communicate with external Web services. The SOAP and RESTful components use CXF and Jersey services to convert messages from Java to XML. Web Service components also allow the developer to select or define the logic to be invoked by component. If using the RESTful component you only need to select a Java class and add a script to the component. On the other hand, SOAP configuration requires you to define attributes and select the operation method used to publish a SOAP web service. As an example of how the SOAP component can be used, a SOAP message could be sent to a web-service-enabled web site such as a used car price database, with the parameters needed for a search. The site would then return an XML-formatted document with the resulting data, e.g., prices, model and features. The data returned is then integrated directly into a third-party web site or application.