• Post Reply Bookmark Topic Watch Topic
  • New Topic

Communication with https

 
fahad siddiqui
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to communicate with a https server using a core java code.
Please provide some leads or sample codes on how to approach this.

I would need to do some authentication with this server as well.

Please advise.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Jakarta HttpClient library is very handy for building HTTP clients of all kinds. Its user guide has pages on authentication and SSL.

If for some reason (which one?) you don't want to use 3rd party libraries, the standard java.net.URLConnection class also supports HTTPS, and here you'll find a description of how to do basic authentication with it.
 
fahad siddiqui
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DO i need an authenticator to connect to https://verisign.com ?
What are the my proxy host and port? Why do i need to define these?
How do i define this? localhost and any random port?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An authenticator is not generally needed for HTTPS connections. It may be required if the server uses authentication, though. If one is required but not provided you should get an error message to that effect.

Whether or not a proxy is needed depends on your network setup. It, too, is not generally required by HTTP or HTTPS, irrespective of whether or not authentication is used.
 
fahad siddiqui
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the code:


to connect to the boa url. But i get a connection timeout exception.

What am i doing wrong?
Please advise.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!