<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:servlet="http://www.mulesoft.org/schema/mule/servlet"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.4/mule.xsd
http://www.mulesoft.org/schema/mule/servlet
http://www.mulesoft.org/schema/mule/servlet/3.4/mule-servlet.xsd">
<servlet:connector name="servletConnector" servletUrl="http://localhost:8888" />
...
Servlet Transport Reference
The Servlet transport provides integration with a servlet implementation. The implementing servlet does the work of receiving a request, and the Servlet transport then hands off the request to any receivers registered with it. There is no notion of a dispatcher for this connector, as it is triggered by a request and may or may not return a response. You specify the servlet URL as part of the connector configuration and then specify the endpoints just like any other HTTP endpoints.
Connector
Servlet connector is a channel adapter between Mule and a servlet engine. It allows the MuleReceiverServlet to look up components interested in requests it receives via the servlet container.
Name | Type | Required | Default | Description |
---|---|---|---|---|
servletUrl |
no |
The real URL on which the servlet container is bound. If this is not set, the WSDL may not be generated correctly when using CXF bound to a servlet endpoint. |
||
useCachedHttpServletRequest |
boolean |
no |
false |
Whether to use a cached http servlet request |
Name | Cardinality | Description |
---|
For example:
You can also specify the servlet URL as part of the endpoint:
<servlet:inbound-endpoint path="http://localhost:8888" />
Servlet endpoints accept the same attributes and child elements as HTTP endpoints.
Endpoint
Name | Type | Required | Default | Description |
---|---|---|---|---|
path |
string |
yes |
the servlett path to bind the service to. |
Name | Cardinality | Description |
---|
Servlet Transport
The Servlet transport allows Mule components to listen for events received via a servlet request.
Connector
Servlet connector is a channel adapter between Mule and a servlet engine. It allows the MuleReceiverServlet to look up components interested in requests it receives via the servlet container.
Name | Type | Required | Default | Description |
---|---|---|---|---|
servletUrl |
no |
The real URL on which the servlet container is bound. If this is not set, the WSDL may not be generated correctly when using CXF bound to a servlet endpoint. |
||
useCachedHttpServletRequest |
boolean |
no |
false |
Whether to use a cached http servlet request |
Name | Cardinality | Description |
---|
Inbound endpoint
Name | Type | Required | Default | Description |
---|---|---|---|---|
path |
string |
yes |
the servlett path to bind the service to. |
Name | Cardinality | Description |
---|
Endpoint
Name | Type | Required | Default | Description |
---|---|---|---|---|
path |
string |
yes |
the servlett path to bind the service to. |
Name | Cardinality | Description |
---|
Transformers
These are transformers specific to this transport. Note that these are added automatically to the Mule registry at start up. When doing automatic transformations these will be included when searching for the correct transformers.
Name | Description |
---|---|
http-request-to-parameter-map |
The <http-request-to-parameter-map> transformer returns a simple Map of the parameters sent with the HTTP Request. If the same parameter is given more than once, only the first value for it will be in the Map. |
http-request-to-input-stream |
The <http-request-to-input-stream> transformer converts an HttpServletRequest into an InputStream. |
http-request-to-byte-array |
The <http-request-to-byte-array> transformer converts an HttpServletRequest into an array of bytes by extracting the payload of the request. |