A basic route consists the following parts:
an inbound endpoint that interacts with a service consumer
a UMO that passes messages between the endpoints without touching them
a router that passes messages between the UMO and the outbound endpoint without doing any work
an outbound endpoint that interacts with a service provider
As discussed in Inbound routers, the inbound endpoint is defined as part of the inbound router definition. To define an inbound endpoint that interacts with a Celtix Enterprise service, you need to do the following:
Add an inbound-router child element to the mule-descriptor element that contains your route definition.
Add an endpoint child element to the inbound-router element.
Set the value of the address attribute to the URI of the WSDL document that describes the service with which the endpoint will interact.
If the service is a Celtix Enterprise service, use the URI format described in Specifying the address of a Celtix Enterprise endpoint.
Set the value of the synchronous attribute to true.
Add a properties child element to the endpoint element.
Add a property child element to the properties element.
Set the value of the name attribute to service.
Set the value of the value attribute to the QName of the wsdl:service element that contains the endpoint's definition in the service's WSDL contract.
|
Note |
|---|---|
|
You can also specify the value service property in the |
Add a second property child element to the properties element.
Set the value of the name attribute to port.
Set the value of the value attribute to the QName of the wsdl:port element that defines the desired endpoint in the service's WSDL contract.
|
Note |
|---|---|
|
You can also specify the value port property in the |
Add a third property child element to the properties element.
Set the value of the name attribute to dataFormat.
Set the value of the value attribute to one of the values listed in Table 6.1, “Settings for the dataFormat Property”.
|
Note |
|---|---|
|
If your inbound endpoint and your outbound endpoint have different |
For more information of data modes see Chapter 4, Understanding the Router's Data Modes.
If you are using the POJO data mode, add one more property child element to the properties element.
Set the value of the name attribute to serviceClass.
Set the value of the value to the fully specified name of the SEI for the service the endpoint is to interact.
The UMO is defined by the implementation attribute of the mule-descriptor element that contains the route definition. For basic routes, you want to use a simple pass through UMO The Celtix Enterprise router provides a simple pass through UMO that can be used by setting the value of the implementation attribute to org.mule.components.simple.PassThroughComponent.
The type of router used is defined by the router element in the outbound router definition. For a basic route you will want to use a pass through route. To use the pass through router supplied with the Celtix Enterprise router, set the value of the router element's className attribute to org.mule.routing.outbound.OutboundPassTrhoughRouter.
As discussed in Outbound routers, the outbound endpoint is defined as part of the outbound router definition. To define an outbound endpoint that interacts with a Celtix Enterprise service, you need to do the following:
Add an outbound-router child element to the mule-descriptor element that contains your route definition.
Add a router child element to the outbound-router element.
See Defining the router for information on the router element.
Add an endpoint child element to the outbound-router element.
Set the value of the address attribute to the URI of the WSDL document that describes the service with which the endpoint will interact.
If the service is a Celtix Enterprise service, use the URI format described in Specifying the address of a Celtix Enterprise endpoint.
Set the value of the synchronous attribute to true.
Add a properties child element to the endpoint element.
Add a property child element to the properties element.
Set the value of the name attribute to service.
Set the value of the value attribute to the QName of the wsdl:service element that contains the endpoint's definition in the service's WSDL contract.
|
Note |
|---|---|
|
You can also specify the value service property in the |
Add a second property child element to the properties element.
Set the value of the name attribute to port.
Set the value of the value attribute to the QName of the wsdl:port element that defines the desired endpoint in the service's WSDL contract.
|
Note |
|---|---|
|
You can also specify the value port property in the |
Add a third property child element to the properties element.
Set the value of the name attribute to dataFormat.
Set the value of the value attribute to the same value as the value attribute in the corresponding property element of the inbound endpoint definition.
|
Note |
|---|---|
|
If your inbound endpoint and your outbound endpoint have different |
If you are using the POJO data mode, add one more property child element to the properties element.
Set the value of the name attribute to serviceClass.
Set the value of the value to the fully specified name of the SEI for the service the endpoint is to interact.