hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjeev Kumar Neemkar" <sanjeevkumar.neem...@gmail.com>
Subject How to over come the deprication API problem?
Date Sat, 25 Feb 2006 02:41:43 GMT
 Hi,
How to over come the deprication API problem?
*Protocol*<file:///C:/Sanjeev/commons-httpclient-3.0-rc4/docs/apidocs/org/apache/commons/httpclient/protocol/Protocol.html#Protocol(java.lang.String,
org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory, int)>(
String <http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html> scheme,
SecureProtocolSocketFactory<file:///C:/Sanjeev/commons-httpclient-3.0-rc4/docs/apidocs/org/apache/commons/httpclient/protocol/SecureProtocolSocketFactory.html>
factory,
int defaultPort) is depricated.
AuthSSLProtocolSocketFactory is sub-class of
SecureProtocolSocketFactory<file:///C:/Sanjeev/commons-httpclient-3.0-rc4/docs/apidocs/org/apache/commons/httpclient/protocol/SecureProtocolSocketFactory.html>.


*used **AuthSSLProtocolSocketFactory located
at*http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/ssl/AuthSSLProtocolSocketFactory.java?view=markup<http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/ssl/AuthSSLProtocolSocketFactory.java?view=markup>

Simirarly HttpRecoverableException is also depricated. What is the
alternative for it when used eith AuthSSLProtocolSocketFactory ?

 -Sanjeev

Code snnipet below...
// java code used
public ABCCLiGet() {
  try {
   authhttps = new Protocol("https",
     new AuthSSLProtocolSocketFactory(new URL("file:"
       + strClientKeyStore), strClientKeyStorePassword,
       new URL("file:" + strServerTrustStore),
       strServerTrustStorePassword), 443);
   Protocol.registerProtocol("https", authhttps);
  } catch (Exception ex) {
   ourLogger.error("Error while registering Protocol", ex);
   ex.printStackTrace();
  }
 }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message