facebook

Using Basic Authentication with Web Services Client

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #265619 Reply

    sdunlop
    Member

    I’m testing out the webservices client generator, but getting the following error when testing an execution of the webservice.

    Feb 5, 2007 11:43:49 AM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
    INFO: basic authentication scheme selected
    Feb 5, 2007 11:43:49 AM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge
    INFO: No credentials available for BASIC ‘XXX Dealer Lookup WebService’@xxx.xxx.xxx.com:8081

    How do I send the HTTP authentication credentials in this test?

    #265636 Reply

    Brian Fernandes
    Moderator

    Hi,

    Client client = Client.getInstance(port);
    client.setProperty(Channel.USERNAME, "username");
    client.setProperty(Channel.PASSWORD, "pass");
    

    More details here: http://docs.codehaus.org/display/XFIRE/HTTP+Transport

    Let us know if you still require assistance.

    #265762 Reply

    sdunlop
    Member

    I saw this code snippet, but not sure where to put this in the code that is generated by the MyEclipse Webservices Client code.

    Any idea on where the Apache Jakarta HttpClient class is contained within the generated client code and where that property should be added?

    #266719 Reply

    tomeksz
    Member

    Take a look here : http://xfire.codehaus.org/Client+and+Server+Stub+Generation+from+WSDL
    There is a sample with generated client.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Using Basic Authentication with Web Services Client

You must be logged in to post in the forum log in