01: package org.objectweb.celtix.systest.schema_validation;
02:
03: import java.io.Serializable;
04: import java.util.List;
05:
06: import javax.jws.WebService;
07:
08: import org.objectweb.schema_validation.SchemaValidation;
09: import org.objectweb.schema_validation.types.ComplexStruct;
10: import org.objectweb.schema_validation.types.OccuringStruct;
11:
12: @WebService(serviceName="SchemaValidationService",portName="SoapPort",endpointInterface="org.objectweb.schema_validation.SchemaValidation",targetNamespace="http://objectweb.org/schema_validation")
13: public class SchemaValidationImpl implements SchemaValidation {
14:
15: public boolean setComplexStruct(ComplexStruct in) {
16: return true;
17: }
18:
19: public boolean setOccuringStruct(OccuringStruct in) {
20: return true;
21: }
22:
23: public ComplexStruct getComplexStruct(String in) {
24: ComplexStruct complexStruct = new ComplexStruct();
25: complexStruct.setElem1(in + "-one");
26: // Don't initialize a member of the structure. Validation should throw
27: // an exception.
28: // complexStruct.setElem2(in + "-two");
29: complexStruct.setElem3(in.length());
30: return complexStruct;
31: }
32:
33: public OccuringStruct getOccuringStruct(String in) {
34: OccuringStruct occuringStruct = new OccuringStruct();
35: // Populate the list in the wrong order. Validation should throw
36: // an exception.
37: List<Serializable> floatIntStringList = occuringStruct
38: .getVarFloatAndVarIntAndVarString();
39: floatIntStringList.add(in + "-two");
40: floatIntStringList.add(new Integer(2));
41: floatIntStringList.add(new Float(2.5f));
42: return occuringStruct;
43: }
44:
45: }
|