src/main/java/js/http/encoder/XmlArgumentsReader.java
@Override
	public Object[] read(HttpServletRequest httpRequest, Type[] formalParameters) throws IOException, IllegalArgumentException {
		if (formalParameters.length != 1) {
			throw new IllegalArgumentException("Bad parameters count. Should be exactly one but is |%d|.", formalParameters.length);
		}
		if (formalParameters[0] instanceof ParameterizedType) {
			throw new IllegalArgumentException("Parameterized type |%s| is not supported.", formalParameters[0]);
		}
		return new Object[] { read(httpRequest.getInputStream(), formalParameters[0]) };
	}
@Override
	public Object[] read(HttpServletRequest httpRequest, Type[] formalParameters) throws IOException, IllegalArgumentException {
		if (formalParameters.length != 1) {
			throw new IllegalArgumentException("Bad parameters count. Should be exactly one but is |%d|.", formalParameters.length);
		}
		if (formalParameters[0] instanceof ParameterizedType) {
			throw new IllegalArgumentException("Parameterized type |%s| is not supported.", formalParameters[0]);
		}
		return new Object[] { read(httpRequest.getInputStream(), formalParameters[0]) };
	}
Handle XML input stream from HTTP request. This method expects a single formal parameter, current implementation
supporting {@link Document} and {@link InputStream}.

@param httpRequest HTTP request,
@param formalParameters formal parameter types.
@return arguments array.
@throws IOException if reading from HTTP request input stream fails.
@throws IllegalArgumentException if formal parameters does not contain exactly one type.
@throws IllegalArgumentException if formal parameter type is parameterized.
@throws IllegalArgumentException if formal parameter type is not supported by this method.