Versions Compared

Key

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

...

  1. From a command shell, go to the HTTP Binding example directory:
    Code Block
    cd [servicemix_install_dir]\examples\http-binding
    
    where servicemix_install_dir is the directory in which ServiceMix was installed.
  2. Then type:
    Code Block
    [servicemix_install_dir]\bin\servicemix servicemix.xml
    
  3. To start sending and receiving of messages from the HTTP server, send an initial message. To do this, compile and run a simple HTTP client. The client is built and run from source code using Ant. Execute Ant from the HTTP Binding directory: servicemix_install_dir\examples\http-binding. To run the HTTP client type:
    Code Block
    ant
    

    Ant will compile and run the simple HTTP client, HttpClient, which performs a simple post on the HTTP Server into the ServiceMix container before returning the results to the console.

...


Messages flow through the components as follows:

  1. HttpClient, a java standalone stand-alone program connects to http://localhost:8912 through the URLConnection class. It then HttpClient sends the file "request.xml" to this port.
  2. httpReceiver, an http HTTP server, being a listenser listener on http://localhost:8912 receives the message.
  3. It then httpReceiver sends the message to stockQuote as specified in its destinationService property, via NMR.
  4. stockQuote sends in into another service, soapEndpoint for processing.
  5. soapEndpoint sends the response to stockQuote.
  6. stockQuote send sends the response to httpReceiver via NMR.
  7. httpReceiver sends the response to http://localhost:8912.
  8. HttpClient reads the response.
  9. The response is printed on the console.

...