Hi Lahiru,

Can I know what kind of error you are getting when using AXIOM client and
passing credentials in the above way?

Best Regards,
V.Rajeevan
Software Engineer,
WSO2 Inc. :http://wso2.com

Mobile : +94 773090875
Email : [email protected]

On Tue, Sep 9, 2014 at 5:45 PM, Lahiru Cooray <[email protected]> wrote:

> Hi,
>
> I have created a non secured web service and secured it using ESB.
> When I invoke the service using an ADB client it worked properly.
> I used the below code to pass the credentials
>
>
>
> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> HttpTransportProperties.Authenticator authenticator = new
> HttpTransportProperties.Authenticator();
> authenticator.setUsername("admin");
> authenticator.setPassword("admin");
>
> stub._getServiceClient().getOptions()
> .setProperty(HTTPConstants.AUTHENTICATE, authenticator);
> stub
> ._getServiceClient()
> .getOptions()
> .setProperty(Constants.Configuration.ENABLE_REST,
> Constants.VALUE_TRUE);
>
>
> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
>
> *And I'm facing a problem when I try to do the same using an AXIOM client.
> I need to know how to pass credentials when using an AXIOM client?*
>
>
> --
> *Lahiru Cooray*
> Software Engineer
> WSO2, Inc.;http://wso2.com/
> lean.enterprise.middleware
>
> Mobile: +94 715 654154
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to