Хорошо, я думаю, что решает проблему ниже, это рабочий код
//
package xmlhttp;
import org.jdesktop.http.Response;
import org.jdesktop.http.Session;
import org.jdesktop.http.State;
public class GetXmlHttp{
public static void main(String[] args) {
getResponse();
}
public static void getResponse()
{
final Session session = new Session();
try {
String url="http://192.172.2.23:8080/geoserver/wfs?request=GetFeature&version=1.1.0&outputFormat=GML2&typeName=topp:networkcoverage,topp:tehsil&bbox=73.07846689124875,33.67929015631999,73.07946689124876,33.68029015632,EPSG:4326";
final Response res=session.get(url);
boolean notDone=true;
do
{
System.out.print(session.getState().toString());
if(session.getState()==State.DONE)
{
String xml=res.toString();
System.out.println(xml);
notDone=false;
}
}while(notDone);
} catch (Exception e1) {
e1.printStackTrace();
}
}
}