I'm not clear on what the message context and the binding provider have to do with setting headers. Have you gotten the SAAJ client to run which I pointed you to before? Its source code shows how to set SOAP headers. (Are you even still using SAAJ? Or maybe JAX-WS?)
Either way, provide us with more detail about what you're doing, and where you're stuck making progress.
Thanks for your reply... what is the use of java classes that are genereated from wsdl file and using these classes how can i build soap body..?
Joined: Mar 22, 2005
This question has nothing to do with the first question about adding SOAP headers, right? Just want to make sure I'm not missing some connection.
You can those Java classes to build a client for the WS described by the WSDL. They have all he code needed for creating the SOAP, sending it across the network, receiving the response and extracting the data form that.
using these classes how can i build soap body..?
As I mentioned in the previous paragraph, it is the code in those classes that create and read the SOAP - you (or rather, any code you write) would not be doing that. If you want to create SOAP directly (why?), then the SOAP client code I pointed you to repeatedly would be a starting point.
Your questions are a bit all over the place, so I'm having a hard time discerning what exactly it is you're trying to do. Are you following some introduction or tutorial? Do you have any client or server WS code so far?