assertEquals(msg, x.getValue(), y.getValue());
assertEquals(msg, x.getID(), y.getID());
}
@Test
public void testDocument() throws Exception {
Document x = new Document();
x.setValue("content-x");
x.setID("Hello There");
Document yOrig = new Document();
yOrig.setID("Cheerio");
yOrig.setValue("content-y");
Holder<Document> y = new Holder<Document>(yOrig);
Holder<Document> z = new Holder<Document>();
Document ret;
if (testDocLiteral) {
ret = docClient.testDocument(x, y, z);
} else if (testXMLBinding) {
ret = xmlClient.testDocument(x, y, z);
} else {
ret = rpcClient.testDocument(x, y, z);
}
if (!perfTestOnly) {
equals("testDocument(): Incorrect value for inout param", x, y.value);
equals("testDocument(): Incorrect value for out param", yOrig, z.value);
equals("testDocument(): Incorrect return value", x, ret);
}
x = new Document();
yOrig = new Document();
x.setValue("content-x");
yOrig.setValue("content-y");
x.setID(null);
yOrig.setID(null);
y = new Holder<Document>(yOrig);
z = new Holder<Document>();
if (testDocLiteral) {
ret = docClient.testDocument(x, y, z);
} else if (testXMLBinding) {
ret = xmlClient.testDocument(x, y, z);
} else {
ret = rpcClient.testDocument(x, y, z);
}
if (!perfTestOnly) {
equals("testDocument(): Incorrect value for inout param", x, y.value);
equals("testDocument(): Incorrect value for out param", yOrig, z.value);
equals("testDocument(): Incorrect return value", x, ret);
assertNull(y.value.getID());
assertNull(ret.getID());
}
}