type = getWriteType(context, value, type);
MessageWriter mw = new ElementWriter(writer);
if (type.isNillable() && type.isWriteOuter() && value == null)
{
mw.writeXsiNil();
return;
}
context.setProperty(CURRENT_MESSAGE_PART, p);
type.writeObject(value, mw, context);