cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kdesin <kartheekdesine...@gmail.com>
Subject Re: XML/HTTP without SOAP in CXF
Date Fri, 29 Jun 2012 04:39:01 GMT
Hi All/Sergey,

To explain a bit more:

 WebClient client =WebClient.create("myURL");
         client.type("text/html");
         client.accept("text/html");
         HTTPClientPolicy hcp=new HTTPClientPolicy();
         hcp.setConnectionTimeout(6000);
         hcp.setCookie("hello");        
         Map<String, String> headers = new HashMap<String, String>();
         WebClient.getConfig(client).getHttpConduit().setClient(hcp);        
        
System.out.println("Cookies:"+WebClient.getConfig(client).getHttpConduit().getCookies());
         System.out.println("headers:"+client.getHeaders());
         resp= client.get();

*Output:*

Cookies:{}
headers:{Content-Type=[text/html], Accept=[text/html]}

I want to understand how I can print the entire request header before
sending the request to the remote service as I am unable to see any cookies
being printed which I have set.I even used the requestContext method to set
the headers in a HashMap but with no luck.
Hope I am clear.

-----
Saludos
Kartheek
--
View this message in context: http://cxf.547215.n5.nabble.com/XML-HTTP-without-SOAP-in-CXF-tp5710174p5710453.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message