You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Prasad Maddela <pr...@gmail.com> on 2011/07/01 03:47:35 UTC

How to pass Authentication credentials in apache Axis2 1.5

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

Re: How to pass Authentication credentials in apache Axis2 1.5

Posted by fire fox <fy...@gmail.com>.
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
<pr...@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
>