Library Link To Toggle Frames Print Feedback

Defining a Basic Route

A basic route consists the following parts:

Defining the inbound endpoint

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:

  1. Add an inbound-router child element to the mule-descriptor element that contains your route definition.

  2. Add an endpoint child element to the inbound-router element.

    1. 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.

    2. Set the value of the synchronous attribute to true.

  3. Add a properties child element to the endpoint element.

  4. Add a property child element to the properties element.

    1. Set the value of the name attribute to service.

    2. 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] Note

    You can also specify the value service property in the endpoint element's address attribute. See Specifying the address of a Celtix Enterprise endpoint.

  5. Add a second property child element to the properties element.

    1. Set the value of the name attribute to port.

    2. 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] Note

    You can also specify the value port property in the endpoint element's address attribute. See Specifying the address of a Celtix Enterprise endpoint.

  6. Add a third property child element to the properties element.

    1. Set the value of the name attribute to dataFormat.

    2. Set the value of the value attribute to one of the values listed in Table 6.1, “Settings for the dataFormat Property”.

      Table 6.1. Settings for the dataFormat Property

      Setting Description
      message Specifies that the endpoint uses the message data mode.
      payload Specifies that the endpoint uses the payload data mode.
      POJO Specifies that the endpoint uses the POJO data mode.

      [Note] Note

      If your inbound endpoint and your outbound endpoint have different wsdl:binding elements, you cannot use the message data mode.

      For more information of data modes see Chapter 4, Understanding the Router's Data Modes.

  7. If you are using the POJO data mode, add one more property child element to the properties element.

    1. Set the value of the name attribute to serviceClass.

    2. Set the value of the value to the fully specified name of the SEI for the service the endpoint is to interact.

Defining the UMO

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.

Defining the router

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.

Defining the outbound endpoint

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:

  1. Add an outbound-router child element to the mule-descriptor element that contains your route definition.

  2. Add a router child element to the outbound-router element.

    See Defining the router for information on the router element.

  3. Add an endpoint child element to the outbound-router element.

    1. 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.

    2. Set the value of the synchronous attribute to true.

  4. Add a properties child element to the endpoint element.

  5. Add a property child element to the properties element.

    1. Set the value of the name attribute to service.

    2. 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] Note

    You can also specify the value service property in the endpoint element's address attribute. See Specifying the address of a Celtix Enterprise endpoint.

  6. Add a second property child element to the properties element.

    1. Set the value of the name attribute to port.

    2. 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] Note

    You can also specify the value port property in the endpoint element's address attribute. See Specifying the address of a Celtix Enterprise endpoint.

  7. Add a third property child element to the properties element.

    1. Set the value of the name attribute to dataFormat.

    2. 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] Note

      If your inbound endpoint and your outbound endpoint have different wsdl:binding elements, you cannot use the message data mode.

  8. If you are using the POJO data mode, add one more property child element to the properties element.

    1. Set the value of the name attribute to serviceClass.

    2. Set the value of the value to the fully specified name of the SEI for the service the endpoint is to interact.