ServerCheckTest.jws Sample
This topic inludes the source code for the ServerCheckTest.jws Sample.
Sample Location
This sample is located in the following directory in your WebLogic Workshop installation:
BEA_HOME/weblogic81/samples/workshop/ExtensionDevKit/ControlDevKit/ControlTest/featuresTests/
Sample Source Code
01 package featuresTests;
02
03 import com.bea.control.JwsContext;
04
05 /*
06 * This web service provides a way to test the ServerCheck control.
07 * ServerCheck simply returns the domain name of the server specified
08 * by its property attributes. In the case of this instance, that
09 * server is the one used by WebLogic Workshop samples.
10 *
11 * The ServerCheck control illustrates how to connect a custom
12 * control insert dialog box. To see that dialog in action, add a
13 * new instance of the control to this web service.
14 *
15 * To test the control, run it, then click the getDomainName
16 * button. Test View will refresh to display the domain name as a
17 * response.
18 */
19 public class ServerCheckTest implements com.bea.jws.WebService
20 {
21 /**
22 * @common:control
23 * @jc:server-data password="weblogic" user-name="weblogic" url="http://localhost:7001" server-name="cgServer"
24 */
25 private insertWizard.ServerCheck thisServerCheck;
26
27 /**
28 * @common:operation
29 */
30 public String getDomainName()
31 {
32 return thisServerCheck.getDomainName();
33 }
34 }
|