Examples of UnmarshallingFailureException


Examples of org.springframework.oxm.UnmarshallingFailureException

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

Examples of org.springframework.oxm.UnmarshallingFailureException

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

Examples of org.springframework.oxm.UnmarshallingFailureException

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

Examples of org.springframework.oxm.UnmarshallingFailureException

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

Examples of org.springframework.oxm.UnmarshallingFailureException

    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

Examples of org.springframework.oxm.UnmarshallingFailureException

  }

  @Test
  public void readWithMarshallingFailureException() throws Exception {
    MockHttpInputMessage inputMessage = new MockHttpInputMessage(new byte[0]);
    UnmarshallingFailureException ex = new UnmarshallingFailureException("forced");

    Unmarshaller unmarshaller = mock(Unmarshaller.class);
    given(unmarshaller.unmarshal(isA(StreamSource.class))).willThrow(ex);

    MarshallingHttpMessageConverter converter = new MarshallingHttpMessageConverter();
View Full Code Here

Examples of org.springframework.oxm.UnmarshallingFailureException

    public static final String MESSAGE = "Unmarshallers on strike.";

    @Override
    public Object unmarshal(Source source) throws XmlMappingException, IOException {
      throw new UnmarshallingFailureException(MESSAGE);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.