Invoke the web service to obtain stock information.
To add the getQuote activity to WhileLoop, follow these steps:
- In the process editor, click
on the palette and then
, which is the Invoke icon.
- Click the WhileLoop activity. The Invoke activity
was added.
- Rename Invoke to getQuote by
typing over the highlighted text.
- With the Invoke activity in place, we now
need to select the operation and its variable parameters we wish to call in
order to invoke the web service. To specify the call and its arguments, follow
these steps:
- In the Properties view, click Details.
- Click Browse. The Select a
Partner window opens.
- Click net.xmethods.services.stockquote.StockQuotePortTypePartner.
- In the Partner Name (? = any character, * = any String) field,
type net.xmethods.services.stockquote.StockQuotePortType and
click OK.
- From the Operation list, select getQuote.
- Check the Use Data Type Variables checkbox.
- Click the first
button. The Select Variable for symbol window
opens.
- From the list, select getQuoteInput and
click OK.
- Click the second
button. The Select Variable for Result window
opens.
- From the list, select getQuoteOutput and
click OK. You should now be left with the following
definition:

Now with the invocation of the web service complete, next we need
to define how we add the resulting stock quote's value to the stock portfolio.