List of usage examples for org.springframework.oxm MarshallingFailureException MarshallingFailureException
public MarshallingFailureException(String msg)
From source file:org.dataone.proto.trove.mn.rest.exceptions.DataOneExceptionMarshaller.java
@Override public void marshal(Object o, Result result) throws IOException, XmlMappingException { BaseException baseException = (BaseException) o; ByteArrayInputStream is = new ByteArrayInputStream( baseException.serialize(BaseException.FMT_XML).getBytes()); try {/*w ww. j a va2 s . c o m*/ Transformer transformer = transformerFactory.newTransformer(); transformer.transform(new StreamSource(is), result); } catch (TransformerException ex) { throw new MarshallingFailureException("DataOneExceptionMarshaller: " + ex.getMessage()); } }