Spring Framework AbstractXmlHttpMessageConverter - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework AbstractXmlHttpMessageConverter class.

This code example shows how to use the following methods:
 
	private final Class<E> externalClass;
	 
	private final JAXBContext context;
 
	public AbstractJaxbMessageConverter(Class<I> internalClass, Class<E> externalClass) {
		this.internalClass = internalClass;
		this.externalClass = externalClass;
		try { 
			context = JAXBContext.newInstance(this.internalClass);
		} 
		catch (JAXBException e) {
			throw new RuntimeException(e);
		} 
	} 
 
	@Override 
	protected final E readFromSource(Class<? extends E> clazz, HttpHeaders headers, Source source) throws IOException {
		try { 
			JAXBElement<? extends I> jaxbElement = createUnmarshaller().unmarshal(source, internalClass);
5
CodeRank
This code example shows how to use the following methods:
    private JAXBContext defaultJaxbContext = null;
    private final ConcurrentMap<Class<?>, JAXBContext> jaxbContexts = new ConcurrentHashMap<Class<?>, JAXBContext>();
 
    public JaxbHttpMessageConverter() 
    { 
        super(); 
    } 
 
    /** 
     * Create a JAXB message converter, specifying the Java packages it should use to find JAXB classes 
     * @param packagesToInclude A colon-separated list of package names. 
     * @see JAXBContext#newInstance(String)  
     */ 
    public JaxbHttpMessageConverter(String packagesToInclude)
    { 
        super(); 
        try 
        { 
            defaultJaxbContext = JAXBContext.newInstance(packagesToInclude);
        } 
4
CodeRank