Package org.springframework.http.converter

Examples of org.springframework.http.converter.HttpMessageConversionException


      else if (StreamSource.class.equals(clazz) || Source.class.equals(clazz)) {
        ByteArrayInputStream bis = transformToByteArrayInputStream(source);
        return (T) new StreamSource(bis);
      }
      else {
        throw new HttpMessageConversionException("Could not read class [" + clazz +
            "]. Only DOMSource, SAXSource, and StreamSource are supported.");
      }
    }
    catch (TransformerException ex) {
      throw new HttpMessageNotReadableException("Could not transform from [" + source + "] to [" + clazz + "]",
View Full Code Here


    catch (UnmarshalException ex) {
      throw new HttpMessageNotReadableException("Could not unmarshal to [" + clazz + "]: " + ex.getMessage(), ex);

    }
    catch (JAXBException ex) {
      throw new HttpMessageConversionException("Could not instantiate JAXBContext: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

    }
    catch (MarshalException ex) {
      throw new HttpMessageNotWritableException("Could not marshal [" + o + "]: " + ex.getMessage(), ex);
    }
    catch (JAXBException ex) {
      throw new HttpMessageConversionException("Could not instantiate JAXBContext: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

    if (jaxbContext == null) {
      try {
        jaxbContext = JAXBContext.newInstance(clazz, CollectionWrapper.class);
        jaxbContexts.putIfAbsent(clazz, jaxbContext);
      } catch (JAXBException ex) {
        throw new HttpMessageConversionException("Could not instantiate JAXBContext for class [" + clazz
            + "]: " + ex.getMessage(), ex);
      }
    }
    return jaxbContext;
  }
View Full Code Here

TOP

Related Classes of org.springframework.http.converter.HttpMessageConversionException

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.