Package org.springframework.http.converter

Examples of org.springframework.http.converter.HttpMessageNotReadableException


    }

    @Override
    public Object read(Class<?> clazz, HttpInputMessage inputMessage)
        throws IOException, HttpMessageNotReadableException {
      throw new HttpMessageNotReadableException("Could not read");
    }
View Full Code Here


    }

    @Override
    public Object read(Class clazz, HttpInputMessage inputMessage)
        throws IOException, HttpMessageNotReadableException {
      throw new HttpMessageNotReadableException("Could not read");
    }
View Full Code Here

        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 + "]",
          ex);
    }
  }
View Full Code Here

        JAXBElement jaxbElement = unmarshaller.unmarshal(source, clazz);
        return jaxbElement.getValue();
      }
    }
    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

    Assert.notNull(this.unmarshaller, "Property 'unmarshaller' is required");
    try {
      return this.unmarshaller.unmarshal(source);
    }
    catch (UnmarshallingFailureException ex) {
      throw new HttpMessageNotReadableException("Could not read [" + clazz + "]", ex);
    }
  }
View Full Code Here

  protected BlitlinePostback readInternal(Class<? extends BlitlinePostback> clazz, HttpInputMessage inputMessage)
    throws IOException, HttpMessageNotReadableException {
    try {
      return holder.getMapper().readValue(inputMessage.getBody(), clazz);
    } catch (JsonProcessingException e) {
      throw new HttpMessageNotReadableException("error reading JSON", e);
    }
  }
View Full Code Here

        throw new TypeMismatchException(result, clazz);
      }
      return result;
    }
    catch (UnmarshallingFailureException ex) {
      throw new HttpMessageNotReadableException("Could not read [" + clazz + "]", ex);
    }
  }
View Full Code Here

    try {
      Reader reader = new InputStreamReader(inputMessage.getBody(), charset);
      return (T) feedInput.build(reader);
    }
    catch (FeedException ex) {
      throw new HttpMessageNotReadableException("Could not read WireFeed: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

  protected BlitlinePostback readInternal(Class<? extends BlitlinePostback> clazz, HttpInputMessage inputMessage)
    throws IOException, HttpMessageNotReadableException {
    try {
      return blitlineObjectMapper.readValue(inputMessage.getBody(), clazz);
    } catch (JsonProcessingException e) {
      throw new HttpMessageNotReadableException("error reading JSON", e);
    }
  }
View Full Code Here

      } else {
        obj = mapper.readValue(nonFormattedString.getBytes(), Map.class);
      }
      return mapper.writeValueAsString(obj);
    } catch(IOException e) {
      throw new HttpMessageNotReadableException(e.getMessage(), e);
    }
  }
View Full Code Here

TOP

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

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.