I’ve just started dealing with an api that is running on https and requires authentication to pull from. I have no issues pulling up the xml in a browser, but is there some way to authenticate in java before I try to pull the data over?
At present I’ve just been using simple sax pulls on http xml files and have never had to authenticate.
Thanks!
You could grab the XML file before parsing it using a connection and
http://docs.oracle.com/javase/6/docs/api/java/net/Authenticator.html
Some examples etc from oracle:
http://docs.oracle.com/javase/6/docs/technotes/guides/net/http-auth.html