Package org.springframework.oxm

Examples of org.springframework.oxm.UnmarshallingFailureException


      xmlReader.setContentHandler(contentHandler);
      xmlReader.parse(inputSource);
      return unmarshalHandler.getObject();
    }
    catch (SAXException ex) {
      throw new UnmarshallingFailureException("SAX reader exception", ex);
    }
  }
View Full Code Here


    else if (ex instanceof MarshalException) {
      if (marshalling) {
        return new MarshallingFailureException("Castor marshalling exception", ex);
      }
      else {
        return new UnmarshallingFailureException("Castor unmarshalling exception", ex);
      }
    }
    else {
      // fallback
      return new UncategorizedMappingException("Unknown Castor exception", ex);
View Full Code Here

        }
        DocumentBuilder documentBuilder = createDocumentBuilder(this.documentBuilderFactory);
        domResult.setNode(documentBuilder.newDocument());
      }
      catch (ParserConfigurationException ex) {
        throw new UnmarshallingFailureException(
            "Could not create document placeholder for DOMResult: " + ex.getMessage(), ex);
      }
    }
    marshalDomNode(graph, domResult.getNode());
  }
View Full Code Here

        }
        DocumentBuilder documentBuilder = createDocumentBuilder(this.documentBuilderFactory);
        domSource.setNode(documentBuilder.newDocument());
      }
      catch (ParserConfigurationException ex) {
        throw new UnmarshallingFailureException(
            "Could not create document placeholder for DOMSource: " + ex.getMessage(), ex);
      }
    }
    return unmarshalDomNode(domSource.getNode());
  }
View Full Code Here

    if (saxSource.getXMLReader() == null) {
      try {
        saxSource.setXMLReader(createXmlReader());
      }
      catch (SAXException ex) {
        throw new UnmarshallingFailureException("Could not create XMLReader for SAXSource", ex);
      }
    }
    if (saxSource.getInputSource() == null) {
      saxSource.setInputSource(new InputSource());
    }
View Full Code Here

    try {
      XMLStreamReader streamReader = StaxUtils.createEventStreamReader(eventReader);
      return unmarshalXmlStreamReader(streamReader);
    }
    catch (XMLStreamException ex) {
      return new UnmarshallingFailureException("JiBX unmarshalling exception", ex);
    }
  }
View Full Code Here

  protected Object unmarshalDomNode(Node node) throws XmlMappingException {
    try {
      return transformAndUnmarshal(new DOMSource(node));
    }
    catch (IOException ex) {
      throw new UnmarshallingFailureException("JiBX unmarshalling exception", ex);
    }
  }
View Full Code Here

    else {
      if (marshalling) {
        return new MarshallingFailureException("JiBX marshalling exception", ex);
      }
      else {
        return new UnmarshallingFailureException("JiBX unmarshalling exception", ex);
      }
    }
  }
View Full Code Here

    }
    else if (ex instanceof MarshalException) {
      return new MarshallingFailureException("JAXB marshalling exception", ex);
    }
    else if (ex instanceof UnmarshalException) {
      return new UnmarshallingFailureException("JAXB unmarshalling exception", ex);
    }
    else {
      // fallback
      return new UncategorizedMappingException("Unknown JAXB exception", ex);
    }
View Full Code Here

      try {
        DataHandler dataHandler = getAttachmentAsDataHandler(cid);
        return FileCopyUtils.copyToByteArray(dataHandler.getInputStream());
      }
      catch (IOException ex) {
        throw new UnmarshallingFailureException("Couldn't read attachment", ex);
      }
    }
View Full Code Here

TOP

Related Classes of org.springframework.oxm.UnmarshallingFailureException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.