Escolar Documentos
Profissional Documentos
Cultura Documentos
1. Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Mule ESB 3 Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 How Mule Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.2 About Mule Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3 Understanding the Mule Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3.1 About SOA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3.2 Mediation - Separating Business Logic from Messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3.3 Orchestration - Routing Messages Between Service Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3.4 Components - Processing the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3.5 Endpoints - Wiring Everything Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3.6 Understanding the Logical Data Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.3.7 Policy Enforcement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.4 Understanding Enterprise Integration Patterns Using Mule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.5 Understanding Orchestration Using Mule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.6 Understanding Configuration Patterns Using Mule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.7 Connecting with Transports and Cloud Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.8 Using Mule with Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 2 2 4 6 7 7 8 9 10 11 12 14 15 16 17 18
Home
Introducing Mule ESB 3 Concepts
This book explains important concepts necessary for you to understand when developing with Mule effectively. Mule ESB 3 Concepts How Mule Works About Mule Configuration Understanding the Mule Architecture About SOA Mediation - Separating Business Logic from Messaging Orchestration - Routing Messages Between Service Components Components - Processing the Data Endpoints - Wiring Everything Together Understanding the Logical Data Flow Policy Enforcement Understanding Enterprise Integration Patterns Using Mule Understanding Orchestration Using Mule Understanding Configuration Patterns Using Mule Connecting with Transports and Cloud Connectors Using Mule with Web Services
Likewise, there are three general types of tasks you can perform to configure and customize your Mule deployment: Service Component Development: developing or reuse existing POJOs, services, Cloud Connectors, or Spring beans that contain the business logic and will consume, process, or enrich messages. Service Orchestration: configuring message processors, routers, transformers, and filters that provide the service mediation and orchestration capabilities required to allow composition of loosely coupled services using a Mule Flow. New orchestration elements can also be created and dropped into your deployment. Integration: A key requirement of service mediation is decoupling services from the underlying protocols. Mule provides transports to allow dispatching and receiving messages on different protocol connectors. These connectors are configured in the Mule configuration and then can be referenced from the orchestration layer. Mule supports many existing transports and all the popular communication protocols, but you may also develop a custom transport if you need to extend Mule to support a particular legacy or proprietary system. This page provides a high-level overview of the steps you take to perform these tasks.
Message Processors
Message Processors are the basic building block in Mule and in fact, components, routers, filters, and transformers are all message processors. There are also other special message processors that do not fall in one of those categories. These include a number of specialized modules like CXF and Jersey Web Services, BPM, as well as a few specialized integration elements like <poll>, <content-enricher>, and <logger>. You can also easily create your own custom message processor.
Routers
Inbound routers specify how messages are routed to a service, and outbound routers specify how messages are routed after the service has finished processing them. There are several default routers that come with Mule that you can use, or you can create your own routers. For more information, see Using Message Routers.
Filters
Filters specify conditions that must be met for a message to be routed to a service. There are several default filters that come with Mule that you can use, or you can create your own filters. For more information, see Using Filters.
Transformers
Transformers convert incoming payload data to the type required by the service component. After the service has finished processing the message, they can also convert the message to a different type as needed by the outbound transport. There are several default transformers you can use, or create your own. For more information, see Using Transformers.
Cloud Connectors
Cloud Connectors are actually message processors that are used to speak to application APIs over existing transports - almost always HTTP. Cloud Connectors typically connect SaaS applications, social media, cloud infrastructure services, and cloud-based data services.
Extend Mule
Mule provides a complete set of APIs for extending Mule. Typical custom extensions include: Cloud Connectors Transports Custom Message Processors Custom Transformers Configuration Patterns If you develop an extension to Mule that you think others might reuse or help support or improve, you could decide to share it on MuleForge. In addition to the Mule IDE, you can also use Maven to create new Mule projects (transports and other types of modules). For more information, see Using Maven.
This topic relates to the most recent version of Mule ESB To see the corresponding topic in a previous version of Mule ESB, click here
Following is an introduction to configuring Mule ESB via the Spring XML file. For details on this file, see About the XML Configuration File.
Each of these elements provides access to configuration object within Mule: Custom Message Processors - Observe a message, or modify either a message or the message flow. Examples include transformers and filters. Flows - Use message processors to define message flow between a source and a target. MULE3USER:Mule Global Configuration - Global settings, such as the default transaction time-out, that apply to the entire Mule configuration Connectors - Non-default configuration of any transports used Endpoints - Define the channel and address or path where messages are sent or received. You can define them globally and use them in multiple flows. Transformers - Convert data from one format to another. You can define them globally and use them in multiple flows. Filters - Filter out the messages that don't match specific criteria. You can define them globally and use them in multiple flows. Models - One or more models that logically group together your services. Services - One or more services that wrap your components (business logic) and configure routers, endpoints, transformers, and filters specifically for that service Following is an example of a simple Mule configuration file:
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xsi:schemaLocation=" http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.0/mule.xsd http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.0/mule-vm.xsd"> <vm:connector name="vmConnector" queueTimeout="5000"/> <vm:endpoint name="CustomerRequests" path="customer.requests"/> <vm:endpoint name="CustomerResponses" path="customer.responses"/> <custom-transformer name="ThisToThat" class="com.acme.transformer.ThisToThat"/> <flow name="myBasicFlow"> <inbound-endpoint ref="CustomerRequests"/> <component class="com.acme.service.BasicService"/> <outbound-endpoint ref="CustomerResponses" transformer-refs="ThisToThat"/> </flow> </mule>
Other, more advanced things you may configure at this level: Security Manager - Authenticates requests based on one or more security providers Agents - Agents are typically used for cross-cutting concerns such as logging or management Notifications - Allow you to be notified upon certain lifecycle events Transaction Management - Mule transactions are configured on inbound endpoints, where an endpoint can be configured to start a new transaction or join an existing one. Properties - Property placeholders, message properties, and system properties.
For a list of the available global configuration settings, see Global Settings Configuration Reference.
This section includes the following topics: About SOA Mediation - Separating Business Logic from Messaging Orchestration - Routing Messages Between Service Components Components - Processing the Data Endpoints - Wiring Everything Together Understanding the Logical Data Flow Policy Enforcement
About SOA
About SOA
Mule ESB is based on the concept of a service-oriented architecture (SOA). The SOA approach to development allows IT organizations to compose applications by building service interfaces around components of applications and exposing those to service consumers. Services are discrete sets of functionality that are completely separate from each other but can work together on a canonical set of objects. For example, if you need to process customer invoices, you might have one service that merges customer data from a database into the invoice and another service that checks the inventory database to see if the items on the invoice are in stock and a third service that fulfills the order. Because each service stands alone, services can be used as building blocks for multiple processes and do not have to be recreated for each type of process or message. For example, the service that merges customer data onto the invoice could also be used to merge customer data onto statements, letters, or other documents. The logic that determines how the invoice data and customer data are merged is decoupled from the logic that looks up and retrieves the necessary customer data. This modular approach allows you to create functionality once and re-use it as many times as needed, streamlining development. This decoupling is a key element of service mediation. Mediation is a well-known pattern for promoting loose coupling. In SOA, service mediation also describes the capabilities of the ESB to convert between transport protocols (including the ability to bridge between synchronous and asynchronous protocols), changing the representation of messages by transforming data, and enforcing compliance with policies by taking the necessary steps such as auditing, logging, security monitoring, etc. Constructing the building blocks into a logical process is called orchestration. Service orchestration using an ESB allows for automation of common backend processes at the application service layer. These processes can be scheduled or exposed as services that are triggered by external events. Service orchestration differs from business process orchestration which may include longer running stateful business processes, complex human interactions and approvals, or parallel execution of those types of processes at the business service layer. Using SOA, businesses can realize dramatic savings on development costs and can rapidly adapt to changing business conditions by reusing and reconfiguring existing services in developing new applications. SOA also enables better integration of enterprise IT resources, including previously isolated application silos and legacy systems. Mule fully supports the SOA approach and orchestrates communication among the services, allowing you to easily tie all these applications together.
sent over HTTP, the HTTP transport turns it into a Mule message, transformers change it along the way (such as from XML to a Java object) as required, and the flow directs the message to each component that needs to process it. All the transporting, transforming, and routing of the message are completely transparent to the component. This decoupling is service mediation.
Transformers are the key to exchanging data, as they allow Mule to convert the data to a format that another component or application can understand. Most importantly, data is transformed only as needed. Instead of mandating the conversion of every message to a single common data protocol (like XML) and specific message format, messages and their data are transformed only as needed for the target component or application where the message is being sent. Mule also enables content enrichment of messages through integration patterns that allow you to retrieve additional data during processing and attach it to the message. Multiple types of transports can be enabled to handle different channels, such as sending the message over a synchronous HTTP endpoint and then forwarding it as an asynchronous JMS message after it has been processed by the Customer Data component. This decoupling of the transport layer allow services to be reused across the enterprise regardless of the legacy technology decisions that were made and enable different choices in protocols to be made based on service level agreements or concerns around reliability or performance. Mediation also means that policy compliance can be layered into the architecture outside of the services. Logging, auditing, and security monitoring can all be performed without any modification of the existing code. Policy enforcement can even be applied based on who is calling the service or what routing has occurred. The separation of the business logic from the sending and transformation of messages allows for great flexibility in how you set up your architecture and makes it much simpler to customize the business logic without having to worry about the various formats in which a message might arrive. Your service component can work with the raw data of the message if desired, but it is not required.
Processing data using Mule Flows gives you complete flexibility in where and how messages are transformed, filtered, and routed. Each is just another step in the process. If you want to do any kind of sophisticated routing using Mule, it is recommended that you use the Flow pattern. Mule configuration patterns make it easy to perform common bits of orchestration, for instance, bridging two endpoints. Using configuration patterns where possible simplifies the work required to configure Mule. When business process orchestration is required, Mule provides a BPM module for enabling different BPM engines within Mule. Business process orchestration should be used for longer running stateful business processes, complex human interactions and approvals, or parallel execution of those types of processes at the business service layer rather than the application layer.
An important feature of components is that they don't have to have any Mule-specific code; they can simply be POJOs, Spring beans, Java beans, Groovy scripts, or web services containing the business logic for processing data in a specific way. Mule even supports a powerful type of component called a Cloud Connector that can connect to any cloud-based service or application and process or enrich the message. Cloud connectors operate on Application APIs, typically exposed over web services. Mule manages components for you, bundles them with configuration settings, exposes then as message processors, and ensures that the right information is passed to and from them based on the settings you specified for their flows in the Mule configuration file.
Mule supports chaining multiple processing steps together through an orchestration mechanism called flow. Flows allow any number of components to be chained together along with other forms of message processing. Flows allow Mule to orchestrate how and when a message is routed to a component. Components can also be exposed directly as services using the Simple Service pattern or the Service Model. You can have many different components that perform different business logic, such as one that verifies whether the items on the invoice are in stock and one that updates a separate customer database with the order history. The invoice, which is encapsulated in a message, can flow from one service component to the next until all the required processing is complete.
Addresses may be expressed as a Uniform Resource Identifier (URI) or as schema-specific XML configuration
For example, if a flow's inbound endpoint's address is http://myfirm.com/mule, the HTTP transport will dispatch to that flow any messages that have been sent to that URL. If the inbound endpoint specifies file://myserver/files/, the File transport, which is watching that directory, dispatches any new files created in that directory to the flow. Depending on the messaging style you specify, Mule may or may not generate a response to send back through the inbound endpoint to the sender. Mule supports several Message Exchange Patterns and each transport has a default pattern it will follow unless you specify otherwise. Mule will typically return the final result of the message processing back as the result; however response processing can also be specified to control what is returned. An outbound endpoint can also be specified to indicate where the message will go next. For example, after processing an HTTP request, you may want to place the result on a JMS queue as shown in the following illustration.
A flow can receive messages using many different transports. For each type of transport that a flow will use, you must specify one or more separate endpoints. For example, if you want one of your flows to handle messages coming in on both the HTTP and JMS channels, you would specify at least one inbound HTTP endpoint and at least one inbound JMS endpoint. Mule registers these endpoints with the flow, and the transport uses this registry information at runtime to configure itself and determine where to send and receive messages. Mule also supports dynamic endpoints, allowing the destination to be constructed from the content of the message. This allows routing-slip patterns where the message instructs Mule where to route it. The flow can also include filters that further specify which messages to send or receive. For example, you can specify that the component only receives RSS messages by a specific author. Specifying filters, routers, and endpoints for your services simply requires editing an XML configuration. You do not have to write any Java code. Some routers are also dynamic and can change behavior based on the content of the message or an external data source such as a file or database. As stated previously, your components code remains completely separate from messaging and routing, which you handle through Mule configuration.
In summary, Mule provides a simple and lightweight way to write components that do something to data without needing to worry about the sender or recipient of the data, the format of the data, or the technology being used to send/receive the data. Although many brokering and integration technologies offer the ability to connect to disparate data sources, they often require extra coding to get messages to behave the way you want and to deliver the data where you want it to go. Mule allows you to quickly develop service components and then change the way they behave through simple XML configuration instead of writing Java code.
1. The customer places an order on the company web site, and an invoice is created as an XML form and submitted to
1. http://myfirm.com/orders. 2. The HTTP transport receives the XML invoice and wraps it in a Mule message. The Customer Data flow's inbound endpoint is set to http://myfirm.com/orders, so the HTTP transport dispatches the message to the service. 3. The XML to Object transformer converts the XML invoice into a Java object. 4. The flow passes the message with its transformed payload to the Customer Data component. 5. The Customer Data component queries the master customer database to pull additional data about the customer and updates the invoice with the data. 6. What follows in the flow is an HTTP outbound endpoint, so the HTTP transport determines that it must now dispatch the message to its address, http://myfirm.com/verify. 7. The HTTP transport uses the configuration of the Inventory Verification flow to receive the message and pass it to the Inventory Verification component. 8. This component updates the invoice with an ID code of the warehouse that has all the items on the invoice in stock. 9. The outbound endpoint specifies a JMS address, so the JMS transport dispatches the message to the order fulfillment application, which picks up orders on that address.
Policy Enforcement
Policy Enforcement
Mule provides capabilities to add audit, logging, and security enforcement at the ESB layer.
Examples
The following are examples of how to set and enforce policy in a Mule application.
Event Tracking
You can inspect all messages using a Wire Tap pattern. To inspect messages that travel on a point-to-point channel, insert a Recipient List into the channel that publishes each incoming message to the main channel and a secondary channel. The Wire Tap is a fixed Recipient List with two output channels. It consumes messages off the input channel and publishes the unmodified message to both output channels. To insert the Wire Tap into a channel, create an additional channel and change the destination receiver to consume from the second channel. Because the analysis logic is located inside a second component, a generic Wire Tap can fit into any channel without any danger of modifying the primary channel behavior. This improves reuse and reduces the risk of instrumenting an existing solution.
Logging
Examining the Mule log is a way to understand what is happening as messages move through a Mule application. Mule's logging configuration is stored in ./conf/log4j.properties. Edit this file to change the verbosity of the log output. The following code demonstrates how to log messages:
<flow name="FlowWithLoggers"> <http:inbound-endpoint address="http://localhost:8383/flowlog" /> <log-component /> <base64-encoder-transformer/> <log-component /> <vm:outbound-endpoint path="next.in.line" /> </flow>
For more details, use a scripted logging component like the following:
Security Enforcement
Security is an important part of policy. There are three elements of enforcing security in a Mule application--encryption/decryption transformers, security filters, and Mule's own security manager.
Encryption Transformers
When writing Java code that requires encryption, you use Mule's Java encryption transformers. Mule provides an abstract class called AbstractEncryptionTransformer that will transform an array of bytes or string into an encrypted array of bytes once implemented. There are two concrete classes called DecryptionTransformer and EncryptionTransformer that will transform an encrypted array of bytes or string into an decrypted array of bytes, or will transform an array of bytes or string into an encrypted array of bytes.
Security Filters
Mule incorporates an abstract class for security filters, AbstractEndpointSecurityFilter, that you can implement to increase security of your Mule application. To implement this abstract class, authenticate inbound and outbound events, ensuring no anonymous or null users gain access, then throw the corresponding UnauthorisedException with a message.
Configuring Security
Mule ESB allows you to authenticate requests via endpoints using transport-specific or generic authentication methods. It also allows you to control method-level authorization on your service components. The Security Manager is responsible for authenticating requests based on one or more security providers. All security is pluggable via the Mule security API , so you can easily plug in custom implementations. For information on the elements you can configure for the Security Manager, see Security Manager Configuration Reference. The following sections provide links to information on configuring different types of security managers.
Spring Security
Spring Security is the next version of Acegi and provides a number of authentication and authorization providers such as JAAS, LDAP, CAS (Yale Central Authentication service), and DAO. The following topics will help you get started securing your services using Spring Security: Configuring the Spring Security Manager Component Authorization Using Spring Security Setting up LDAP Provider for Spring Security
Acegi Security (deprecated)
Acegi provides a number of authentication and authorization providers such as JAAS, LDAP, CAS (Yale Central Authentication service), and DAO. The following topics will help you get started securing your services using Acegi: Configuring the Acegi Security Manager Component Authorization Using Acegi Setting up LDAP Provider for Acegi NOTE: Acegi may not be supported in future versions of Mule.
WS-Security
WS-Security is a standard protocol for applying security to Web services. It contains specifications on how integrity and confidentiality in a SOAP message can be enforced via XML signatures and binary security tokens such as X.509 certificates and Kerberos tickets as well as encryption
headers. It ensures end-to-end security by working in the application layer as opposed to the transport layer.
Other Security Technologies
Mule also supports the following security technologies: Encryption Strategies - Secure your messages by encrypting them. PGP Security - Secure your messages by encrypting them with PGP. Jaas Security
Integration Styles
Pattern File Transfer Shared Database Messaging Mapping to a Mule Object File Transport JDBC Transport Mule is all about Messaging
Messaging Systems
Pattern Message Channel Pipes and Filters Message Router Message Translator Message Endpoint Mapping to a Mule Object Mule provides a message channel that connects the message processors in a flow. A Flow implements a pipe and filter architecture Message Routers Message Transformer Inbound & Outbound Endpoints
Messaging Channels
Pattern Point-to-Point Channel Message Bus Mapping to a Mule Object The default channel within a flow. Mule is a message bus.
Message Routing
Pattern Content-Based Router Message Filter Mapping to a Mule Object Choice Filters
Recipient List Collection Splitter, Message Chunk Splitter & Plain Splitter Collection Aggregator, Message Chunk Aggregator & Custom Aggregator Resequencer
Message transformation
Pattern Content Enricher Mapping to a Mule Object Message Enricher
Messaging Endpoints
You can declare endpoints to be transactional as needed. Pattern Idempotent Receiver Mapping to a Mule Object Idempotent Message Filter
System Management
Pattern Wire Tap Mapping to a Mule Object Wire Tap
Related Topics
Configuring Mule with Patterns
An Example of Orchestration
The following example of orchestration uses a flow to accept a book order in an XML file and transform the files contents into a standard format that contains one or more specific orders. Next, the orders are split out to be processed separately, and any non-book orders are filtered out. Now two services are called: one to check whether the book is in our inventory, and another to create a customer order. This is both e-mailed to the customer and stored in a database. If anything in this process fails, the message is placed in a JMS queue of failed orders, where it can be checked, any error fixed, and finally resubmitted.
<flow> <file:inbound-endpoint path="/myDirectory"> <file:filename-filter name="*.xml"/> </file:inbound-endpoint> <xml:xslt-transformer xsl-file="createBbookOrdersTransformation.xsl"/> <splitter expression="xpath://order"/> <!-- The following message processors will be invoked for each order in the xml file --> <expression-filter expression="xpath://order[@type='book']"/> <component class="org.my.BookInventoryChecker"/> <component class="org.my.BookCustomerOrderProcessor"/> <smtp:outbound-endpoint subject="Order Confirmation" to="#{xpath://customer/email]"/> <jdbc:outbound-endpoint queryKey="storeOrder"/> <default-exception-strategy> <jms:outbound-endpoint queue="failedOrders"/> </default-exception-strategy> </flow>
Bridge
The bridge pattern is used to bridge an inbound and outbound endpoint. Here's an example that bridges an http and vm endpoint:
This example illustrates the goal of minimal configuration: nothing needs to be configured except what is absolutely required. To learn more about the capabilities of the bridge pattern, see Bridge Pattern,
Simple Service
The simple service pattern is used to expose a component as a request-response service. Several types of components are supported: POJOs JAX-WS services JAX-RS services JAXB and XPath processing components Here's a simple example that, once again, shows minimal configuration, in this case to expose a POJO as a service:
To learn more about the capabilities of the simple service pattern, see Simple Service Pattern,
Validator Pattern
The job of the Validator pattern is to ensure that a message is well-formed before sending it to be processed. This pattern demonstrates not only minimal configuration but separation of concerns: different configuration objects are responsible for Validating the input Defining the positive and negative status messages returned to the caller Declaring where well-formed messages are sent. Here's a simple example that illustrates all of those:
<pattern:validator name="integer-validator" inboundAddress="vm://validator.in" ackExpression="#[string:GOOD:#[message:payload]@#[context:serviceName]]" nackExpression="#[string:BAD:#[message:payload]@#[context:serviceName]]" outboundAddress= "vm://test-service.in"> <payload-type-filter expectedType="java.lang.Integer"/> </pattern:validator>
The filter validates that the message is an Integer, the ack and nack expressions define the positive and negative status messages, and the address declares where a valid message is sent. To learn more about the capabilities of the validator pattern, see Validator Pattern.
The WSDL which can be fetched from http:/ /localhost:8090/weather-forecast?wsdl will make the service appaer to be at http:/ /localhost:8090/weather-forecast. To learn more about the capabilities of the web service proxy pattern, see Web Service Proxy Pattern
Cloud Connectors
The main purpose of cloud connectors is to provide you with an easy way to connect to the thousands of software-as-a-service (SaaS) platforms out there without having to work with transports or dealing with the different protocols that each API uses. MuleSoft's goal was to facilitate how connectors are created and for that we have developed a web kit. Connectors essentially Java POJOs that our kit works with and that are converted into fully featured components for Mule ESB.
Or you can deploy the JAR produced by our kit into the lib/user folder to share the connector between multiple applications. Once you have deployed the connector JAR, reference the schema inside your Mule app config. The following is an example for the S3 connector:
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:s3="http://www.mulesoft.org/schema/mule/s3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.mulesoft.org/schema/mule/s3 http://www.mulesoft.org/schema/mule/s3/1.0/mule-s3.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd ">
How to use each connector depends on the specific connector. You can find a list of available connectors here and in MuleForge.
Limitations
While development continues, cloud connectors have not yet reached their full potential, although progress is continually being made. The following are some tasks that you cannot accomplish with cloud connectors. Request-Reponse Only: Cloud connectors are designed as request-response message processors. So every operation inside a message processor must have a request to generate a response. You cannot use endpoints with them. Non-Dynamic Instancing: While you can have multiple cloud connectors defined inside your Mule app, and even multiple instances of the same connector, you cannot create new ones inside a flow. Global Configuration: Connectors can be configured globally only, and that configuration applies to all operations supported by the connector. You cannot override configuration inside a flow.
Here we explore in a deeper way what options exist in each of these scenarios and direct you to other documentation sources and examples.
As of the latest version of Mule ESB, the CXF Module is the recommended way to work with with Web services.
As before, based on whether you will use the WSDL or whether you've built your service via "code-first" methodologies, there are two ways to use CXF clients: Use the JAX-WS Client API. Build a Client Proxy.
For more information, read the Creating a WSDL First JAX-WS Service documentation.
For simple use cases, you may consider using the Web Service Proxy Pattern, particularly when you don't need to accomplish much message processing. From Mule, you can use Using Mule Configuration Patterns to configure (with minor XML configuration) a specific integration feature.
References
For more information and complete documentation, please read the following: CXF Module Reference Supported Web Service Standards Web Service Proxy Pattern Examples Echo Example Bookstore Example