public void testComplexRestriction5() throws Exception {
if (!shouldRunTest("ComplexRestriction5")) {
return;
}
// normal case, maxLength=50 && minLength=5 for ComplexRestriction5
ComplexRestriction5 x = new ComplexRestriction5();
x.setValue("http://www.iona.com");
ComplexRestriction5 yOrig = new ComplexRestriction5();
yOrig.setValue("http://www.iona.com/info/services/oss/");
Holder<ComplexRestriction5> y = new Holder<ComplexRestriction5>(yOrig);
Holder<ComplexRestriction5> z = new Holder<ComplexRestriction5>();
ComplexRestriction5 ret;
if (testDocLiteral) {
ret = docClient.testComplexRestriction5(x, y, z);
} else if (testXMLBinding) {
ret = xmlClient.testComplexRestriction5(x, y, z);
} else {
ret = rpcClient.testComplexRestriction5(x, y, z);
}
if (!perfTestOnly) {
assertEquals("testComplexRestriction5(): Incorrect value for inout param",
x.getValue(), y.value.getValue());
assertEquals("testComplexRestriction5(): Incorrect value for out param",
yOrig.getValue(), z.value.getValue());
assertEquals("testComplexRestriction5(): Incorrect return value",
x.getValue(), ret.getValue());
}
// abnormal cases
if (testDocLiteral || testXMLBinding) {
try {
x = new ComplexRestriction5();
x.setValue("uri");
y = new Holder<ComplexRestriction5>(yOrig);
z = new Holder<ComplexRestriction5>();
ret = docClient.testComplexRestriction5(x, y, z);
fail("maxLength=50 && minLength=5 restriction is violated.");
} catch (Exception ex) {
//ex.printStackTrace();
}
try {
x = new ComplexRestriction5();
x.setValue("http://www.iona.com");
yOrig = new ComplexRestriction5();
yOrig.setValue("http://www.iona.com/info/services/oss/info_services_oss_train.html");
y = new Holder<ComplexRestriction5>(yOrig);
z = new Holder<ComplexRestriction5>();
ret = testDocLiteral ? docClient.testComplexRestriction5(x, y, z)
: xmlClient.testComplexRestriction5(x, y, z);