package com.struts2.demo;
import com.struts2.demo.utils.AvailableSettings;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.Consts;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.fluent.Request;
import org.apache.http.entity.ContentType;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;
import java.io.IOException;
/**
* Handler that encapsulates the process of generating a response object from a HttpResponse.
* Created by Frank on 2014/6/9.
*/
public class FluentResponseHandling {
private static final Log logger = LogFactory.getLog(AvailableSettings.LOGNAME_TEST);
public static void main(String[] args) {
try {
Document document = Request.Get(&#