# ThresholdService.jws Sample

This topic inludes the source code for the ThresholdService.jws Sample.

## Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebServices/xmlBeans/schema/

## Sample Source Code

`01 package xmlBeans.schema; 02 03 import java.util.HashMap; 04 05 /** 06 * A web service to use as a test client for the 07 * ThresholdEnums Java control. That control illustrates 08 * how to use the schema type system to retrieve information 09 * about compiled XML schemas. 10 * 11 * @common:target-namespace namespace="http://workshop.bea.com/ThresholdService" 12 */ 13 public class ThresholdService implements com.bea.jws.WebService 14 { 15 /** 16 * @common:control 17 */ 18 private xmlBeans.schema.ThresholdEnums thresholdEnums; 19 20 /** 21 * Tests the ThresholdEnums control getThresholdValues method. 22 * To test this method, simply click the getValues button in 23 * Test View. Test View will refresh to display a list of the 24 * enumeration values available for the threshold attribute 25 * defined in the PriceSummary.xsd schema file. That file is in the 26 * Schemas project of the SamplesApp application. 27 * <br/><br/> 28 * The getValuesSimple method returns the same result, but does 29 * so with less code. 30 * 31 * @common:operation 32 */ 33 public String[] getValues() 34 { 35 return thresholdEnums.getThresholdValues(); 36 } 37 38 /** 39 * Tests the ThresholdEnums control getThresholdValuesSimple 40 * method. To test this method, simply click the getValuesSimple 41 * button in Test View. Test View will refresh to display 42 * a list of the enumeration values available for the threshold 43 * attribute defined in the PriceSummary.xsd schema file. 44 * That file is in the Schemas project of the SamplesApp application. 45 * 46 * @common:operation 47 */ 48 public String[] getValuesSimple() 49 { 50 return thresholdEnums.getThresholdValuesSimple(); 51 } 52 }`