Package org.springframework.http.converter

Examples of org.springframework.http.converter.HttpMessageNotWritableException


                writer.getFactory().createGenerator(outputMessage.getBody(), encoding);
        try {
            writer.writeValue(jsonGenerator, view.getData());
        }
        catch (IOException ex) {
            throw new HttpMessageNotWritableException("Could not write JSON: " + ex.getMessage(), ex);
        }
    }
View Full Code Here


  protected void writeInternal(BlitlinePostback t, HttpOutputMessage outputMessage) throws IOException,
    HttpMessageNotWritableException {
    try {
      holder.getMapper().writeValue(outputMessage.getBody(), t);
    } catch (JsonProcessingException e) {
      throw new HttpMessageNotWritableException("error writing JSON", e);
    }
  }
View Full Code Here

    Assert.notNull(this.marshaller, "Property 'marshaller' is required");
    try {
      this.marshaller.marshal(o, result);
    }
    catch (MarshallingFailureException ex) {
      throw new HttpMessageNotWritableException("Could not write [" + o + "]", ex);
    }
  }
View Full Code Here

    try {
      Writer writer = new OutputStreamWriter(outputMessage.getBody(), wireFeedEncoding);
      feedOutput.output(wireFeed, writer);
    }
    catch (FeedException ex) {
      throw new HttpMessageNotWritableException("Could not write WiredFeed: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

  protected void writeInternal(BlitlinePostback t, HttpOutputMessage outputMessage) throws IOException,
    HttpMessageNotWritableException {
    try {
      blitlineObjectMapper.writeValue(outputMessage.getBody(), t);
    } catch (JsonProcessingException e) {
      throw new HttpMessageNotWritableException("error writing JSON", e);
    }
  }
View Full Code Here

            if (isPrettyPrint()) {
                jsonGenerator.useDefaultPrettyPrinter();
            }
            getObjectMapper().writeValue(jsonGenerator, o);
        } catch (JsonGenerationException ex) {
            throw new HttpMessageNotWritableException("Could not write JSON: " + ex.getMessage(), ex);
        }
    }
View Full Code Here

TOP

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

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.