childNode = childNode.getFirstChild();
assertEquals(Node.TEXT_NODE, childNode.getNodeType());
assertEquals(str, childNode.getNodeValue());
// Now test schema validation during marshaling
StringStruct stringStruct = new StringStruct();
// Don't initialize one of the structure members.
//stringStruct.setArg0("hello");
stringStruct.setArg1("world");
// Marshal without the schema should work.
JAXBEncoderDecoder.marshall(context, null, stringStruct, elName, elNode);
try {
// Marshal with the schema should get an exception.
JAXBEncoderDecoder.marshall(context, schema, stringStruct, elName, elNode);