Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.portal.wac
Class WAClient

    java.lang.Object
      org.deegree.portal.wac.WAClient

    public class WAClient

extends Object

The class offers methods to enable a using program/class to act as a client to a Web Security Service (WSS) as specified in GDI-NRW. This implementation just supports authentication through sessionIDs and user/password. If other authentication mechanisms are needed this class should be extended by defining additional `performDoService` methods.

Version:
  $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
  Andreas Poth , last edited by: $Author: mschneider $

Constructor Summary
`WAClient(String host, String path)` The constructor assumes that the the certificate to be used is set by starting the java VM using -Djavax.net.ssl.trustStore parameter.
`WAClient(String host, String path, int port)` The constructor assumes that the the certificate to be used is set by starting the java VM using -Djavax.net.ssl.trustStore parameter.
`WAClient(String host, String path, int port, String trustStore)`

Method Summary
`String` | `getContentType()` returns the name of the content type of the result to the last performed request
`Document` | `performCloseSession(String sessionID)` closes a Session by sending a CloseSession request against the WSS that is assigned to a client.
`InputStream` | `performDoService(String request, String sessionID)` performs a DoService request against the WSS that is assigned to a client.
`InputStream` | `performDoService(String request, String user, String password)` performs a DoService request against the WSS that is assigned to a client.
`Document` | `performGetCapabilities()` performs a GetCapabilities request against the WSS that is assigned to a client
`String` | `performGetSession(String user, String password)` performs a GetSession request against the WSS that is assigned to a client.

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

Constructor Detail

### WAClient

    public WAClient(String host,
                    String path)

  The constructor assumes that the the certificate to be used is set by starting the java VM using -Djavax.net.ssl.trustStore parameter. The port to be used is set to SSL standard 443

  Parameters:
    `host` -
    `path` -

### WAClient

    public WAClient(String host,
                    String path,
                    int port)

  The constructor assumes that the the certificate to be used is set by starting the java VM using -Djavax.net.ssl.trustStore parameter.

  Parameters:
    `host` -
    `path` -
    `port` -

### WAClient

    public WAClient(String host,
                    String path,
                    int port,
                    String trustStore)

Parameters:
  `host` -
  `path` -
  `port` -
  `trustStore` -

Method Detail

### getContentType

    public String getContentType()

  returns the name of the content type of the result to the last performed request

  Returns:
    name of the content type

### performGetCapabilities

    public Document performGetCapabilities()
                                    throws WACException

  performs a GetCapabilities request against the WSS that is assigned to a client

  Returns:
    Capabilities document if request was successful otherwise an exception document will be returned
  Throws:
    `WACException`

### performGetSession

    public String performGetSession(String user,
                                    String password)
                             throws WACException

  performs a GetSession request against the WSS that is assigned to a client. The method assumed that user/password (urn:x-gdi-nrw:authnMethod:1.0:password) is used for authentication

  Parameters:
    `user` - name of the user who like to get a session
    `password` - password of the user
  Returns:
    GetSession result string if request was successful, otherwise ?
  Throws:
    `WACException`

### performCloseSession

    public Document performCloseSession(String sessionID)
                                 throws WACException

  closes a Session by sending a CloseSession request against the WSS that is assigned to a client. If the passed sessionID is not valid an WSS exception document will be returned instead of the success message/answer.

  Parameters:
    `sessionID` -
  Returns:
    document that indicates that session has been closed otherwise an exception document will be returned
  Throws:
    `WACException`

### performDoService

    public InputStream performDoService(String request,
                                        String user,
                                        String password)
                                 throws WACException

  performs a DoService request against the WSS that is assigned to a client. According to the WSS specification the request will be send using HTTP POST.
  The method uses a user/password authentification

  Parameters:
    `request` - request to perform
    `user` - name of the user who like to get a session
    `password` - password of the user
  Returns:
    result of the passed request. the type depends on target service and request
  Throws:
    `WACException`
  See Also:
    `performDoService(String, String)`

### performDoService

    public InputStream performDoService(String request,
                                        String sessionID)
                                 throws WACException

  performs a DoService request against the WSS that is assigned to a client. According to the WSS specification the request will be send using HTTP POST.
  The method uses an authentification through a sessionID

  Parameters:
    `request` - request to perform
    `sessionID` - id to authentificate a user
  Returns:
    result of the passed request. the type depends on target service and request
  Throws:
    `WACException`
  See Also:
    `performDoService(String, String, String)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org