MessageContext context = new MessageContext(new AxisServer());
StringWriter writer = new StringWriter();
SerializationContextImpl ser = new SerializationContextImpl(writer);
ser.registerPrefixForURI("", NS1);
ser.startElement(new QName(NS1, "e1"), null);
String foo = ser.attributeQName2String(new QName(NS1, "attr"));
AttributesImpl attrs = new AttributesImpl();
attrs.addAttribute("a", "a", "a", "CDATA", foo);
ser.startElement(new QName(NS1, "e2"), attrs);
ser.endElement();
foo = ser.attributeQName2String(new QName(NS1, "attr"));