Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Component or Bean ID

Description

rss

This component polls RSS feeds for changes and is implemented by RssPollingComponent class. The property urlStrings defines the RSS feeds to be monitored. When one of the RSS feeds being monitored is updated, this component will convert the content of the RSS feed into a normalized message and send it to a trace component via Normalized Message Router (NMR).

StreamWriterComponent

This component accepts a normalized message and display its content to the console.

Useful Code Hints

This section describes the start-up sequence and how the ServiceMix container interacts with the HTTP Binding application. The Java class files are located in the servicemix-2.0.2.jar file in the ServiceMix installation directory. To review the Java source code, unjar and decompile the .class files or download the source code.

...

  1. setId - takes the spring:id=jbi and sets the id of the container to "jbi"
  2. setcomponentName - sets componentName to httpReceiver on first invocation and "stockQuote" in the next
  3. setEndpoint - sets the endpoint properties from the servicemix.xml file
  4. setService - sets the service properties from xml file
  5. setDestinationService - sets the destinationService for each component

HttpConnector Details

  1. The ServiceMix container reads the servicemix.xml file and to determine that it needs to instantiate a HttpConnector.
  2. The container calls the init() method of HttpConnector. The init() method sets the listener's host and port property for which the HttpConnector will listen.
  3. The container calls the start() method of HttpConnector. The start() method will:
    A. Add a listener object to the server property of HttpConnector.
    B. Create a new HttpContext that contains a ServletHandler class. The ServletHandler maps requests to servlets that implement the javax.servlet.http.HttpServlet API. In this case, the ServletHandler maps the request to the BindingServlet class.
    C. The server property of HttpConnector is started.

stockQuote Details

  1. HttpConnector sends messages to this component as specified on its destinationService property. When this component receives a message, its onMessageExchange() method is called by the container. The onMessageExchange() method will:
    A. Create a SOAPConnection to be used in sending the message to URLEndpoint. B. Marshall an inbound JBI inbound into a SOAPMessage, before sending it to the URLEndpoint, as specified in the soapEndpoint property of stockQuote. A response is also requested from the URLEndpoint.
    C. The response, which is a SOAPMessage, is marshalled into a Normalized Message and is eventually sent to HttpConnector.

Related Documentation

For more information on the following topics please see:

For a brief explanation of the XML tags on servicemi.xml, please see:

...