if (!shouldRunTest("ComplexRestriction3")) {
return;
}
// normal case, maxLength=10 for ComplexRestriction
// && minLength=5 for ComplexRestriction3
ComplexRestriction3 x = new ComplexRestriction3();
x.setValue("str_x");
ComplexRestriction3 yOrig = new ComplexRestriction3();
yOrig.setValue("string_yyy");
Holder<ComplexRestriction3> y = new Holder<ComplexRestriction3>(yOrig);
Holder<ComplexRestriction3> z = new Holder<ComplexRestriction3>();
ComplexRestriction3 ret;
if (testDocLiteral) {
ret = docClient.testComplexRestriction3(x, y, z);
} else if (testXMLBinding) {
ret = xmlClient.testComplexRestriction3(x, y, z);
} else {
ret = rpcClient.testComplexRestriction3(x, y, z);
}
if (!perfTestOnly) {
assertEquals("testComplexRestriction3(): Incorrect value for inout param",
x.getValue(), y.value.getValue());
assertEquals("testComplexRestriction3(): Incorrect value for out param",
yOrig.getValue(), z.value.getValue());
assertEquals("testComplexRestriction3(): Incorrect return value",
x.getValue(), ret.getValue());
}
// abnormal cases
if (testDocLiteral || testXMLBinding) {
try {
x = new ComplexRestriction3();
x.setValue("str");
y = new Holder<ComplexRestriction3>(yOrig);
z = new Holder<ComplexRestriction3>();
ret = testDocLiteral ? docClient.testComplexRestriction3(x, y, z)
: xmlClient.testComplexRestriction3(x, y, z);
fail("maxLength=10 && minLength=5 restriction is violated.");
} catch (Exception ex) {
//ex.printStackTrace();
}
try {
x = new ComplexRestriction3();
x.setValue("string_x");
yOrig = new ComplexRestriction3();
yOrig.setValue("string_yyyyyy");
y = new Holder<ComplexRestriction3>(yOrig);
z = new Holder<ComplexRestriction3>();
ret = testDocLiteral ? docClient.testComplexRestriction3(x, y, z)
: xmlClient.testComplexRestriction3(x, y, z);