ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Ws Wiki] Update of "FrontPage/Axis/AxisClientSetHTTPHeaders" by FlorianKirchhoff
Date Thu, 16 Sep 2010 00:56:59 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.

The "FrontPage/Axis/AxisClientSetHTTPHeaders" page has been changed by FlorianKirchhoff.
http://wiki.apache.org/ws/FrontPage/Axis/AxisClientSetHTTPHeaders?action=diff&rev1=3&rev2=4

--------------------------------------------------

- Q: How do I setup HTTP headers in Axis clients?
+ '''Q: How do I set HTTP headers in Axis clients? '''
  
- A: Set the appropriate Hashtable entry in the MessageContext in a Handler:
+ '''A: Set the appropriate Hashtable entry in the''' '''[[FrontPage/Axis/MessageContext|MessageContext]]'''
'''using a Handler:'''
  
  {{{
  package yourpackage;
@@ -18, +18 @@

      if(ht == null) {
        ht = new Hashtable();
      }
+     // This will add an HTTP header with name "testheader" and a value of "this is a test"
-     ht.put("test", "test");
+     ht.put("testheader", "this is a test");
      ctx.setProperty(HTTPConstants.REQUEST_HEADERS, ht);
    }
  }

Mime
View raw message