Generally, we define operation to authenticate. If no method/operation is defined in the stub/wsdl you may try referring to the following link.
Check the authentication constants in - http://wso2.org/library/230 On Fri, Jul 1, 2011 at 7:17 AM, Prasad Maddela <prasadrao.madd...@gmail.com>wrote: > Hi, > > I have developed static stubs from wsdl using apache axis2-1.5 & > jibx-1.2.3. > > I need to pass the user credentials(username & password) as part of the > soap request as the webservice authenticates all the incoming requests. > > I have written a java client using static stub , retrieved the > ServiceClient & added soap headers for the security to add usernametoken > element and set the username and password, > > but still i am getting the anauthroized exception. > > Kind request to let me know how to pass the user credentials in the soap > request in case of static stubs. > > Thanks, > M.Prasad >