[Ws Wiki] Update of "FrontPage/Axis/AxisClientSetHTTPHead ers" by FlorianKirchhoff
Apache Wiki <[email protected]>
| Newsgroups | gmane.comp.apache.webservices.general |
|---|---|
| Message-ID | <[email protected]> |
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);
}
}