PDA

View Full Version : URL Resource with Basic Authentication



KieranN
03-03-2008, 02:42 PM
Using an xaction, I am attempting to query XML data supplied from a webservice using an XQueryLookupRule. The catch is that the webservice is secured with BASIC authentication and I have been unable to pass in a username and password.

I've tried supplying my credentials in the URL for the service: http://username:password@server/service?arg1&arg2
And have tried using Kettle to download the XML into a file, but keep getting a 401 responce.

Anyone know the best way of doing this?

mlowery
03-07-2008, 11:50 AM
Basic authentication uses HTTP headers to send the username and password. (You can't put the username and password on the URL.) Here's an example of Basic authentication (using Java and the HttpClient library): http://kickjava.com/src/BasicAuthenticationExample.java.htm.