StockQuote Soap Client

The StockQuote Client is a Soap Client for the StockQuote Service and uses an Invoke Activity to trigger the StockQuote application.

Prerequisites

The sample StockQuote is deployed and running in your Cloud Foundry environment and you have access to the routable URL to access the sample.

Procedure

  1. From the File Explorer navigate to the samples directory, select binding > soap > http > StockQuoteClient and double-click tibco.bwce.sample.binding.soap.http.StockClient. See Accessing Samples for more information.
  2. From the Project Explorer expand the tibco.bwce.sample.binding.soap.http.StockQuoteClient project.
  3. Set the Application Profile to PCF. See Setting the Default Application Profile.
  4. Click Run > Debug Configurations.
  5. From the Debug Configuration wizard, expand BusinessWorks Application and select BWApplication.
  6. Click the Applications tab and then click the Deselect All button if you have multiple applications.
  7. Select the checkbox next to tibco.bwce.sample.binding.soap.http.StockQuoteClient.application.
  8. Click Debug.
    The sample now runs in the debug mode.

Understanding the Configuration

The Process uses an Invoke Activity to call out to the StockQuote application. The process can be configured by dragging the concrete WSDL, in this case StockQuote_gen1.wsdl onto the workspace canvas and selecting the Invoke Operation option

The Reference created is set to type Binding - Reference. Create a SOAP/HTTP reference bindng that uses a HTTP Client Resource.

The default host for the HTTP Client Resource should point to your Cloud Foundry routable URL for the Stock Quote application. For example, stockquote.testqa.com. The Log output will display the current stock quote value for the symbol which in this case is hard coded to GOOG.

Note: The external service that the StockQuote service talks to an external service, it may intermittently go down and in that case the StockQuoteClient may not get the correct response back from the StockQuote Service.