I am using the Axis API to access Axis HTTP server. The documentation of the API can be found here.
I am using the following code to add handlers to the server.
We are adding custom headers to a SOAP request. However, we have implemented this by injecting the headers into the Axis Stub object for the webservice at runtime. Thus, they dont change for every request, but the headers injected are used for the entire run of our test cases
If you think that's your use case as well, I can find that code and update with what we did.