Hello,

> The following constructor is depricated. 
> 
> Do we have an alternative for this? Please let me know if there is any..
> 
> 
> Protocol trustHttps = new Protocol("https", f, 443); 

The Protocol class has "overlapping" polymorphic constructors
which were not remove for the sake of compatibility. You will
find the replacement documented in the JavaDocs:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/protocol/Protocol.html#Protocol(java.lang.String,%20org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory,%20int)

You can either ignore the warning, or cast the factory to the
non-secure interface:

Protocol trustHttps = new Protocol("https", (ProtocolSocketFactory) f, 
443); 

cheers,
  Roland

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to