Hi,
I think this will depend upon the tool that you are using.
Assuming that you are using Axis (most commonly used ), when we do wsdl2java of the wsdl, the client stub is ALSO generated (org.apache.axis.client.Stub).
This stub has methods like:
setHeader(SOAPHeaderElement),
setHeader(
String,String,Object).
Similarly , there are methods like getHeader(..) etc.
Refer Axis API.
Thanks,
Milan Doshi