QuoteClient.jws Sample
This topic inludes the source code for the QuoteClient.jws Sample.
Sample Location
This sample is located in the following directory in your WebLogic Workshop installation:
BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebServices/service/
Sample Source Code
01 package service;
02
03
04 /**
05 * <p>Demonstrates modification of a Service control's JCX file to change
06 * the way a web service looks to its clients. This web service is merely
07 * a test harness for QuoteServiceControl.jcx, where the technique of
08 * modifying a JCX file is demonstrated. See the comments in
09 * QuoteServiceControl.jcx for an explanation of this sample.</p>
10 *
11 * @common:target-namespace namespace="http://workshop.bea.com/QuoteClient"
12 */
13 public class QuoteClient implements com.bea.jws.WebService
14 {
15 /**
16 * @common:control
17 */
18 private service.QuoteServiceControl quoteServiceControl;
19
20 public Callback callback;
21
22 public interface Callback
23 {
24 /**
25 * @jws:conversation phase="finish"
26 */
27 public void onReply(double quote);
28 }
29
30
31 /**
32 * @common:operation
33 * @jws:conversation phase="start"
34 */
35 public void getQuote(String tickerSymbol)
36 {
37 quoteServiceControl.getQuote(tickerSymbol);
38 }
39
40 private void quoteServiceControl_onQuoteReady(java.lang.String tickerSymbol, double dQuote)
41 {
42 callback.onReply(dQuote);
43 }
44 }
|