src/main/java/js/http/encoder/XmlArgumentsReader.java
@Override
	public Object read(InputStream inputStream, Type type) throws IOException {
		if (Types.isKindOf(type, Document.class)) {
			return documentBuilder.loadXML(inputStream);
		} else if (Types.isKindOf(type, InputStream.class)) {
			threadLocal.set(inputStream);
			return inputStream;
		} else {
			throw new IllegalArgumentException("Unsupported formal parameter type |%s| for XML content type.", type);
		}
	}
@Override
	public Object read(InputStream inputStream, Type type) throws IOException {
		if (Types.isKindOf(type, Document.class)) {
			return documentBuilder.loadXML(inputStream);
		} else if (Types.isKindOf(type, InputStream.class)) {
			threadLocal.set(inputStream);
			return inputStream;
		} else {
			throw new IllegalArgumentException("Unsupported formal parameter type |%s| for XML content type.", type);
		}
	}
Process XML input stream accordingly requested type. Current implementation supports two type: XML {@link Document} and
XML input stream.

@param inputStream XML input stream,
@param type expected Java type.
@return XML stream processing result.
@throws IOException if XML stream reading fails.
@throws IllegalArgumentException if requested Java type is not supported.