} else {
if (result.getClass().equals(staxResultClass)) {
try {
Object xmlStreamWriter = PrivilegedAccessHelper.invokeMethod(staxResultGetStreamWriterMethod, result);
if (xmlStreamWriter != null) {
MarshalRecord record = (MarshalRecord)PrivilegedAccessHelper.invokeConstructor(xmlStreamWriterRecordConstructor, new Object[]{xmlStreamWriter});
record.setMarshaller(this);
marshal(object, record, session, xmlDescriptor, isXMLRoot);
return;
} else {
Object xmlEventWriter = PrivilegedAccessHelper.invokeMethod(staxResultGetEventWriterMethod, result);
if(xmlEventWriter != null) {
MarshalRecord record = (MarshalRecord)PrivilegedAccessHelper.invokeConstructor(xmlEventWriterRecordConstructor, new Object[]{xmlEventWriter});
record.setMarshaller(this);
marshal(object, record, session, xmlDescriptor, isXMLRoot);
return;
}
}
} catch (Exception e) {