You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Boby boby <bo...@hotmail.com> on 2003/06/12 19:50:50 UTC

Client Authentication

Hi,
      I was going through the mailing list but couldn’t find the solution 
for my problem so thought of sending a message to the list.

I am using ‘wsdl2java’ tool to generate java client for invoking 
web-services. Web-services requires basic HTTP authentication to 
authenticate clients. If I put these two lines of code before invoke, it 
works fine.

call.setUsername("username");
call.setPassword("password");

I don’t want to edit the auto-generated code from tool ‘wsdl2java’. So is 
there any way to set the authentication parameter somewhere else instead of 
putting in the auto-generated code.

Any help will be highly appreciated.

Thanks,
Mudit

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


Re: Client Authentication

Posted by Davanum Srinivas <di...@yahoo.com>.
org.apache.axis.client.Stub has setUsername and setPassword that you can use. you will need to
typecast the interface that you get from the locator to org.apache.axis.client.Stub .

-- dims

--- Boby boby <bo...@hotmail.com> wrote:
> Hi,
>       I was going through the mailing list but couldn�t find the solution 
> for my problem so thought of sending a message to the list.
> 
> I am using �wsdl2java� tool to generate java client for invoking 
> web-services. Web-services requires basic HTTP authentication to 
> authenticate clients. If I put these two lines of code before invoke, it 
> works fine.
> 
> call.setUsername("username");
> call.setPassword("password");
> 
> I don�t want to edit the auto-generated code from tool �wsdl2java�. So is 
> there any way to set the authentication parameter somewhere else instead of 
> putting in the auto-generated code.
> 
> Any help will be highly appreciated.
> 
> Thanks,
> Mudit
> 
> _________________________________________________________________
> The new MSN 8: advanced junk mail protection and 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
> 


=====
Davanum Srinivas - http://webservices.apache.org/~dims/

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com