Hi Pubudu,

AFAIK above procedure is  correct. Please fine answers inline


On Tue, Feb 17, 2015 at 8:44 AM, Pubudu Dodangoda <[email protected]> wrote:

>
> I am trying to authenticate a valid user (say admin/admin) via a
> webservice which is hosted inside the BAM
> The procedure I followed is as follows
>
> Create an AuthenticationAdminStub
> login using admin/ admin
>
> I have 3 issues
> 1) Will this procedure work?
>

Yes


> 2)What should be the service URL which should be given as a parameter to
> the AuthenticationAdminStub?
>

"https://"; + hostName + ":" + httpsPort + "/" + webContextRoot + "/" + "
services/" + "AuthenticationAdmin";

As an example "https://localhost:9443/services/AuthenticationAdmin";


3)What should be the remote address which should be given to the
> login(userName,password,remoteAddress) method?
>

It should be the hostname of the remote host (String). If you have resolved
it in /etc/hosts your can put that here. I think in your case it should be
"localhost"

Please look at this blog post for sample code [1]

[1]
http://nuwanwimalasekara.blogspot.com/2013/02/invoking-wso2-carbon-admin-services.html

Regards,
Malintha Adikari

> --
> Pubudu Dodangoda
> BSc Engineering(Hon's) Undergraduate
> Department of Computer Science Engineering
> University of Moratuwa
> 0716053681 / 0775192994
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Malintha Adikari*
 Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

Mobile: +94 71 2312958
Blog:    http://malinthas.blogspot.com
Page:   http://about.me/malintha
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to