LibraryToggle FramesPrintFeedback

The cxf:bean: URI is used to bind an Apache CXF endpoint to a route and has the following general syntax:

cxf:bean:CxfEndpointID[?Options]

Where CxfEndpointID is the ID of a bean created using the cxf:cxfEndpoint element, which configures the details of the WS endpoint. You can append options to this URI (where the options are described in detail in Options in Component Reference). If you do not specify any additional options, the endpoint uses the POJO data format by default.

For example, to start a route with a Apache CXF endpoint that is configured by the bean with ID, customer-ws, define the route as follows:

<route>
    <from uri="cxf:bean:customer-ws"/>
    ...
</route>
[Note]Note

There is an alternative URI syntax, cxf://WsAddress[?Options], which enables you to specify all of the WS endpoint details in the URI (so there is no need to reference a bean instance). This typically results in a long and cumbersome URI, but is useful in some cases. For details, see CXF in Component Reference.

Apache CXF deploys the WS endpoint into a Jetty servlet container instance and the address attribute of cxf:cxfEndpoint is therefore used to configure the addressing information for the endpoint in the Jetty container.

Specify a complete HTTP URL, including the host and IP port (the value of the IP port effectively identifies the target Jetty container). Typically, for a Jetty container, you specify the host as 0.0.0.0, which is interpreted as a wildcard that matches every IP network interface on the local machine (that is, if deployed on a multi-homed host, Jetty opens a listening port on every network card). For example, to deploy the endpoint to the custom Jetty container listening on IP port, 9191:

address="http://0.0.0.0:9191/Customers"
[Note]Note

If you want to configure a secure endpoint (secured by SSL), you would specify the https: scheme in the address.

Comments powered by Disqus