Contact Us 1-800-596-4880

Mule Endpoint URIs

Mule Endpoint URIs are any valid URI and describe how to connect to the underlying transport. Most connectors in Mule can be created from an endpoint URI except where not enough connection information can be expressed clearly in a URI, such as JMS connection properties. Endpoint URIs are set on Mule Endpoints, which manage other connection instance information such as filters and transactions.

Mule Endpoint URIs usually appear in one of the following forms, although other provider implementations can introduce their own schemes.

scheme://host[:port]//[address][?params]

The scheme must always be set. The host and port are set for endpoints that use unwrapped socket based communications such as the TCP, UDP, HTTP, or multicast.

udp://localhost:65432

scheme://[username][:password]@host[:port][?params]

The user name and password are used to log in to the remote server specified by the host and port parameters. The POP3 and SMTP connectors use this format or URI.

pop3://ross:secret@pop3.mycompany.com

smtp://ross:secret@smtp.mycompany.com

scheme://address[?params]

Here we only define a protocol and an address. This tells Mule to get a connector that handles the specified scheme, or create one if needed, and to create a new endpoint using the specified address.

vm://my.queue

URI Parameters

There are two types of parameters you can set on the URI:

  1. Known Mule parameters that control the way the endpoint is configured, such as transformers for the endpoint.

  2. Properties to be set on the connector or to be associated with the transport. This allows you to set properties on a connector used by this endpoint. Additionally, all properties will be associated with the transport, so you can mix connector and transport properties. For more information, see Endpoint Configuration Reference.

Known Parameters

Property Description

connector

The name of an existing connector to use for this endpoint URI

transformers

Defines a comma-separated list of transformers to configure on the endpoint

address

Explicitly sets the endpoint address to the specified value and ignores all other info in the URI.

For example:

file:///C:/temp?transformers=FileToString,XmlToDom

jms://jmsEndpoint/topic:my.topic?connector=WMQConnector

Other Parameters

Any other parameters set on the URI will be set on the connector if a connector is created and also set on the endpoint itself as properties.

Endpoint Encoding

When using XML configuration, certain character entities defined in the W3C SGML specification need to be escaped to their SGML code. The most relevant are listed here. Don’t forget to remove the space before the '';''.

For characters such as > < " % #, the notation will be resolved and cause the constructor for the URI to throw an exception. To use one of these characters, you can specify %HEXNUMBER

Text code Numerical code What it looks like Description, extras

%22

#34

"

quotation mark = APL quote, U+0022 ISONEW

&amp ;

#38

&

ampersand, U+0026 ISOnum

%3C

#60

<

less-than sign, U+003C ISOnum

%3E

#62

>

greater-than sign, U+003E ISOnum

%25

#37

%

percentage sign, U+0023 ISOnum

%23

#35

#

hash sign, U+0025 ISOnum

Additionally, for connectors such as Axis, FTP, and the Email connectors, if your login credentials include @, you must escape it using %40. For example, instead of these URIs:

axis:http://wsuser@username:password@localhost/services/services/Version?method=getVersionftp://username:password@ftpserversmtp://'sender@mydomain.com':'123456'@mailserver?address=QA

You must use these:

axis:http://wsuser%40username:password%40localhost/services/services/Version?method=getVersionftp://username:password%40ftpserversmtp://'sender%40mydomain.com':'123456'%40mailserver?address=QA