src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java

changeset 78
860b95cc8d1d
parent 50
42dfec6871f6
     1.1 --- a/src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Thu Jul 30 23:39:33 2009 -0700
     1.2 +++ b/src/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java	Fri Aug 07 11:27:00 2009 -0700
     1.3 @@ -22,11 +22,6 @@
     1.4   * CA 95054 USA or visit www.sun.com if you need additional information or
     1.5   * have any questions.
     1.6   */
     1.7 -/*
     1.8 - * $Id: HttpSOAPConnection.java,v 1.41 2006/01/27 12:49:17 vj135062 Exp $
     1.9 - * $Revision: 1.41 $
    1.10 - * $Date: 2006/01/27 12:49:17 $
    1.11 - */
    1.12  
    1.13  
    1.14  package com.sun.xml.internal.messaging.saaj.client.p2p;
    1.15 @@ -66,8 +61,8 @@
    1.16          Logger.getLogger(LogDomainConstants.HTTP_CONN_DOMAIN,
    1.17                           "com.sun.xml.internal.messaging.saaj.client.p2p.LocalStrings");
    1.18  
    1.19 -    public static final String defaultProxyHost = null;
    1.20 -    public static  final int defaultProxyPort = -1;
    1.21 +    private static final String defaultProxyHost = null;
    1.22 +    private static final int defaultProxyPort = -1;
    1.23  
    1.24      MessageFactory messageFactory = null;
    1.25  
    1.26 @@ -80,8 +75,8 @@
    1.27          try {
    1.28              messageFactory = MessageFactory.newInstance(SOAPConstants.DYNAMIC_SOAP_PROTOCOL);
    1.29          } catch (NoSuchMethodError ex) {
    1.30 -                    //fallback to default SOAP 1.1 in this case for backward compatibility
    1.31 -                    messageFactory = MessageFactory.newInstance();
    1.32 +            //fallback to default SOAP 1.1 in this case for backward compatibility
    1.33 +            messageFactory = MessageFactory.newInstance();
    1.34          } catch (Exception ex) {
    1.35              log.log(Level.SEVERE, "SAAJ0001.p2p.cannot.create.msg.factory", ex);
    1.36              throw new SOAPExceptionImpl("Unable to create message factory", ex);
    1.37 @@ -107,17 +102,16 @@
    1.38  
    1.39          Class urlEndpointClass = null;
    1.40          ClassLoader loader = Thread.currentThread().getContextClassLoader();
    1.41 -
    1.42          try {
    1.43 -                if (loader != null) {
    1.44 -                        urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT);
    1.45 -                } else {
    1.46 -                        urlEndpointClass = Class.forName(JAXM_URLENDPOINT);
    1.47 -                    }
    1.48 -                } catch (ClassNotFoundException ex) {
    1.49 -                    //Do nothing. URLEndpoint is available only when JAXM is there.
    1.50 -                    log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM");
    1.51 -                }
    1.52 +            if (loader != null) {
    1.53 +                urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT);
    1.54 +            } else {
    1.55 +                urlEndpointClass = Class.forName(JAXM_URLENDPOINT);
    1.56 +            }
    1.57 +        } catch (ClassNotFoundException ex) {
    1.58 +            //Do nothing. URLEndpoint is available only when JAXM is there.
    1.59 +            log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM");
    1.60 +        }
    1.61  
    1.62          if (urlEndpointClass != null) {
    1.63              if (urlEndpointClass.isInstance(endPoint)) {
    1.64 @@ -654,23 +648,24 @@
    1.65  
    1.66          return ret;
    1.67      }
    1.68 +
    1.69      //private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
    1.70      //private static String SSL_PROVIDER =
    1.71 -              //  "com.sun.net.ssl.internal.ssl.Provider";
    1.72 +      //  "com.sun.net.ssl.internal.ssl.Provider";
    1.73      private static final String SSL_PKG;
    1.74 -    private static  final String SSL_PROVIDER;
    1.75 -
    1.76 +    private static final String SSL_PROVIDER;
    1.77  
    1.78      static {
    1.79 -                if (isIBMVM) {
    1.80 -                    SSL_PKG ="com.ibm.net.ssl.internal.www.protocol";
    1.81 -                    SSL_PROVIDER ="com.ibm.net.ssl.internal.ssl.Provider";
    1.82 -                } else {
    1.83 -                    //if not IBM VM default to Sun.
    1.84 -                    SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
    1.85 -                    SSL_PROVIDER ="com.sun.net.ssl.internal.ssl.Provider";
    1.86 -                }
    1.87 -            }
    1.88 +        if (isIBMVM) {
    1.89 +            SSL_PKG ="com.ibm.net.ssl.internal.www.protocol";
    1.90 +            SSL_PROVIDER ="com.ibm.net.ssl.internal.ssl.Provider";
    1.91 +        } else {
    1.92 +            //if not IBM VM default to Sun.
    1.93 +            SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
    1.94 +            SSL_PROVIDER ="com.sun.net.ssl.internal.ssl.Provider";
    1.95 +        }
    1.96 +    }
    1.97 +
    1.98      private void initHttps() {
    1.99          //if(!setHttps) {
   1.100          String pkgs = System.getProperty("java.protocol.handler.pkgs");

mercurial