assertEquals("User", readRequest.getMetaclass().getName());
}
public void testEvent() throws Exception
{
Metadata metadata = new XMLMetadata(null, null, null, null, null);
Metaclass metaclass = new Metaclass("Test");
Attribute attr = new Attribute("attr");
Argument untyped = new Argument("untyped");
Argument anytyped = new Argument("anytyped");
Argument inttyped = new Argument("inttyped");
Argument listtyped = new Argument("listtyped");
Event protectedEv = new Event("protected");
Event publicEv = new Event("public");
Event staticEv = new Event("static");
MockServer server = new MockServer(new Object[]{null});
Timestamp ts =
SOAPUtil.parseDateTime("1234-05-06T07:08:09", true, true, TimeZone.getDefault());
attr.setType(Primitive.ANY);
anytyped.setType(Primitive.ANY);
inttyped.setType(Primitive.INTEGER);
listtyped.setType(Primitive.STRING);
listtyped.setCollection(true);
protectedEv.setVisibility(Metaclass.PROTECTED);
publicEv.addArgument(untyped);
publicEv.addArgument(anytyped);
publicEv.addArgument(inttyped);
publicEv.addArgument(listtyped);
staticEv.addArgument(untyped);
staticEv.addArgument(anytyped);
staticEv.addArgument(inttyped);
staticEv.addArgument(listtyped);
staticEv.setStatic(true);
staticEv.setVarArg(true);
metaclass.addAttribute(attr);
metaclass.addEvent(protectedEv);
metaclass.addEvent(publicEv);
metaclass.addEvent(staticEv);
metadata.addMetaclass(metaclass);
// test protected event
XMLUnmarshaller unmarshaller = new XMLUnmarshaller(new InvocationContext(metadata));
String sElement = XSDGenerator.computeElementName(protectedEv);
StringReader reader = new StringReader(