Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 8.1 API Reference

## weblogic.webservice.client
Class JSSEAdapter

    java.lang.Object
      |
      +--weblogic.webservice.client.JSSEAdapter

public class JSSEAdapter
extends java.lang.Object
implements SSLAdapter

JSSEAdapter for WLS Webservices support of the JSSE bundled with JDK 1.4

Author:
  Copyright © 2004 BEA Systems, Inc. All Rights Reserved.

Field Summary
`static java.lang.String` | `ENFORCE_CONSTRAINTS`
`static java.lang.String` | `STRICT_CHECKING_DEFAULT`
`protected boolean` | `strictCertChecking`
`static java.lang.String` | `TRUSTED_CERTS`
`protected static java.lang.String` | `trustedCertFile`
`protected static boolean` | `verbose`
`static java.lang.String` | `VERBOSE_PROPERTY`

Constructor Summary
`JSSEAdapter()` Returns an instance of the this class.
`JSSEAdapter(boolean strict)`

Method Summary
`java.net.Socket` | `createProxySocket(java.lang.String host, int port)` Deprecated.
`java.net.Socket` | `createSocket(java.lang.String host, int port)` Returns a socket connected to a ServerSocket on the named host, at the given port.
`void` | `disableProxy()`
`void` | `enableProxy(java.lang.String host, java.lang.String port)`
`protected boolean` | `getStrictCheckingDefault()`
`void` | `loadLocalIdentity(java.io.InputStream stream, char[] password)` Creates an instance of the SunJSSE provider's default key manager factory, which provides basic X.509-based authentication keys.
`java.net.URLConnection` | `openConnection(java.net.URL url)` Opens connection to URL
`void` | `setHostnameVerifier(javax.net.ssl.HostnameVerifier verifier)` Sets hostname verifier.
`void` | `setProxy(java.lang.String host, int port)` Deprecated.
`void` | `setProxyAuth(java.lang.String user, java.lang.String password)` Deprecated.
`void` | `setStrictChecking(boolean strict)` Disable strict certificate checking.
`static void` | `setStrictCheckingDefault(boolean strict)` Determines the default setting for Strict Certificate checking of subsequent instances of this adapter class.
`void` | `setTrustManager(javax.net.ssl.TrustManager manager)` Sets the trust policy for all sockets generated by factories of this adapter.
`void` | `setVerbose(boolean verbose)` This method is used to enable or disabled verbose debugging output.
`java.lang.String` | `toString()` Convience method for display purposes.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### STRICT_CHECKING_DEFAULT

    public static final java.lang.String STRICT_CHECKING_DEFAULT

### VERBOSE_PROPERTY

    public static final java.lang.String VERBOSE_PROPERTY

### TRUSTED_CERTS

    public static final java.lang.String TRUSTED_CERTS

### ENFORCE_CONSTRAINTS

    public static final java.lang.String ENFORCE_CONSTRAINTS

### verbose

    protected static boolean verbose

### strictCertChecking

    protected boolean strictCertChecking

### trustedCertFile

    protected static java.lang.String trustedCertFile

Constructor Detail

### JSSEAdapter

    public JSSEAdapter()

  Returns an instance of the this class. If set, the SSLAdapter will load the trusted certificates from the file designated by the following system property:

  `weblogic.webservice.client.ssl.trustedcertfile` To disable strict certificate checking by default, set the following system property to `false`:

  `weblogic.webservice.client.ssl.strictcertchecking` To enable the use of proxy by default, set the following system properties to the appropriate values.

  `weblogic.webservice.transport.https.proxy.host` `weblogic.webservice.transport.https.proxy.port`

### JSSEAdapter

    public JSSEAdapter(boolean strict)

Method Detail

### enableProxy

    public void enableProxy(java.lang.String host,
                            java.lang.String port)

### disableProxy

    public void disableProxy()

### createSocket

    public java.net.Socket createSocket(java.lang.String host,
                                        int port)
                                 throws java.io.IOException

  Returns a socket connected to a ServerSocket on the named host, at the given port. This socket is configured using the socket options established for this SSLAdapter.
  Specified by:
    createSocket in interface SSLAdapter

  Parameters:
    `host` - the server host
    `port` - the server port
  Throws:
    java.io.IOException - if the connection can't be established
    UnknownHostException - if the host is not known

### createProxySocket

    public java.net.Socket createProxySocket(java.lang.String host,
                                             int port)
                                      throws java.io.IOException

  Deprecated.

### openConnection

    public java.net.URLConnection openConnection(java.net.URL url)
                                          throws java.io.IOException

  Opens connection to URL
  Specified by:
    openConnection in interface SSLAdapter

  Parameters:
    `url` - URL we will be connecting to
  Returns:
    URLConnection
  Throws:
    java.io.IOException - if error occurs while accessing Socket

### setStrictCheckingDefault

    public static void setStrictCheckingDefault(boolean strict)

  Determines the default setting for Strict Certificate checking of subsequent instances of this adapter class. A value of `false` means instances will accept flawed certificates from the server but warn. This value can also be set with the following system property:

  `weblogic.webservice.client.ssl.strictcertchecking`

  Parameters:
    `strict` - the default setting for strict certificate checking

### getStrictCheckingDefault

    protected final boolean getStrictCheckingDefault()

### setStrictChecking

    public final void setStrictChecking(boolean strict)

  Disable strict certificate checking. Disabling strict certificate checking will cause all certificates to be accepted with warnings to standard out. When disabled, this adapter will set the TrustManager of all sockets (including those used in URLConnections) and the HostnameVerifier of all URLConnections to to instances that accept all certificates.Setting it to true will revert them to their original values. This cannot value cannot be changed once the Adapter has been used.

  Parameters:
    `strict` - whether or not certificate checking is strictly enforced.

### setHostnameVerifier

    public final void setHostnameVerifier(javax.net.ssl.HostnameVerifier verifier)

  Sets hostname verifier.

  Parameters:
    `verifier` - HostnameVerifier object to be set as a hostname verifier.
  See Also:
    `HostnameVerifier`

### setVerbose

    public void setVerbose(boolean verbose)

  This method is used to enable or disabled verbose debugging output. This value can also be set with the following system property:

  `weblogic.webservice.client.verbose`

  Parameters:
    `verbose` - the default setting for strict certificate checking

### setTrustManager

    public final void setTrustManager(javax.net.ssl.TrustManager manager)

  Sets the trust policy for all sockets generated by factories of this adapter. This allows clients to alter the logic for accepting questionable certificates.

  Parameters:
    `manager` - the trust policy.
  See Also:
    `TrustManager`

### loadLocalIdentity

    public final void loadLocalIdentity(java.io.InputStream stream,
                                        char[] password)
                                 throws java.lang.Exception

  Creates an instance of the SunJSSE provider's default key manager factory, which provides basic X.509-based authentication keys.

  Parameters:
    `KeyStore` - The input stream containing the KeyStore that will be queried by KeyManagerFactory for information on which private key and matching public key certificates should be used for authenticating to a remote socket peer.
    `password` - The password to the PKCS 8 encrypted private key.
  Throws:
    java.lang.Exception - if there is a problem reading the keystore

### setProxy

    public void setProxy(java.lang.String host,
                         int port)

  Deprecated.

### setProxyAuth

    public void setProxyAuth(java.lang.String user,
                             java.lang.String password)

  Deprecated.

### toString

    public java.lang.String toString()

  Convience method for display purposes.

  Overrides:
    toString in class java.lang.Object
  See Also:
    for details.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs81
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD