public class WSSAccessorDeegree extends Object implements WSSAccessor
// Creating new accessor instance WSSAccessorDeegree accessor = new WSSAccessorDeegree("http://myservices.com/wss");
// Choosing a authentication method
PasswordAuthenticationMethod authMethod = new PasswordAuthenticationMethod("user","pass");
// Use the auth. method with the accessor
accessor.setAuthenticationMethod(authMethod);
// Perform a doService Operation on the WSS, in this case with a GetCapabilities
// operation on a secured WMS
Payload response = accessor.doService("HTTP_GET", "SERVICE=WMS&REQUEST=GetCapabilities",
"http://localhost:8080/facadeURL");
DCP_HTTP_GET, DCP_HTTP_POST| Constructor and Description |
|---|
WSSAccessorDeegree()
Creates a new instance of the WSSAccessorDeegree.
|
WSSAccessorDeegree(String wssURL)
Creates a new instance of the WSSAccessorDeegree.
|
WSSAccessorDeegree(String wssURL,
String proxyURL,
int port)
Creates a new instance of the WSSAccessorDeegree.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeSession()
Closes the WSS session.
|
void |
closeSession(SessionInformation si)
Closes the WSS session.
|
Payload |
doService(String dcp_type,
String serviceRequest,
org.apache.commons.httpclient.NameValuePair[] requestParams,
String facadeURL)
Performs a doService request on the selected WSS.
|
Payload |
doService(String dcp_type,
String serviceRequest,
String facadeURL)
Performs a doService request on the selected WSS.
|
String |
getSecuredServiceType()
DOCUMENT ME!
|
SessionInformation |
getSession()
Establishes a session between the WSSAccessor and the remote WSS service.
|
SessionInformation |
getSession(AuthenticationMethod authnMethod)
Establishes a session between the WSSAccessor and the remote WSS service.
|
List<String> |
getSupportedAuthenticationMethods()
Retrieves the capabilities document of a WSS, parses it and returns the supported auhtentication methods.
|
String |
getWSS()
Returns the URL to the used WSS.
|
org.dom4j.Document |
getWSSCapabilities()
Tries to retrieve the capabillities document from the specific WSS.
|
URL |
getWSSURL()
DOCUMENT ME!
|
boolean |
isSessionAvailable()
DOCUMENT ME!
|
void |
setAuthenticationMethod(AuthenticationMethod authnMethod)
Sets the authentication method for WSS interaction.
|
void |
setCredentialProvider(org.apache.commons.httpclient.auth.CredentialsProvider credentialProvider)
DOCUMENT ME!
|
void |
setProxy(String proxy_url,
int port)
Sets a proxy for indirect HTTP communication.
|
void |
setWSS(String wssUrl)
Sets the URL of WSS to use.
|
public WSSAccessorDeegree()
public WSSAccessorDeegree(String wssURL)
wssURL - URL to a WSSpublic Payload doService(String dcp_type, String serviceRequest, org.apache.commons.httpclient.NameValuePair[] requestParams, String facadeURL) throws ServiceException
doService in interface WSSAccessordcp_type - Must be
HTTP GET or
HTTP POSTserviceRequest - Request to a secured servicerequestParams - An array with request parameters, i.e. HTTP_Header / Mime-Type: text/xmlfacadeURL - String with an URL to facadeServiceException - Thrown in case of an error.NullPointerException - DOCUMENT ME!public Payload doService(String dcp_type, String serviceRequest, String facadeURL) throws ServiceException
doService in interface WSSAccessordcp_type - Must be
HTTP GET or
HTTP POSTserviceRequest - Request to a secured servicefacadeURL - String with an URL to facadeServiceException - Thrown in case of an error.public SessionInformation getSession(AuthenticationMethod authnMethod) throws AuthenticationFailedException
getSession in interface WSSAccessorauthnMethod - The authentication method which should be usedAuthenticationFailedException - Is thrown, when the authentication failsNullPointerException - DOCUMENT ME!public SessionInformation getSession() throws AuthenticationFailedException
AuthenticationFailedException - Is thrown, when the authentication failsNullPointerException - DOCUMENT ME!public void closeSession()
throws ServiceException
closeSession in interface WSSAccessorServiceException - Is thrown, when closeSession() fails on the WSSNullPointerException - DOCUMENT ME!public void closeSession(SessionInformation si) throws ServiceException
si - DOCUMENT ME!ServiceException - Is thrown, when closeSession() fails on the WSSNullPointerException - DOCUMENT ME!public String getWSS()
getWSS in interface WSSAccessorpublic URL getWSSURL()
public void setProxy(String proxy_url, int port)
setProxy in interface WSSAccessorproxy_url - URL of the proxy to use.port - The port of the proxy server.public void setCredentialProvider(org.apache.commons.httpclient.auth.CredentialsProvider credentialProvider)
WSSAccessorsetCredentialProvider in interface WSSAccessorcredentialProvider - DOCUMENT ME!public void setWSS(String wssUrl)
setWSS in interface WSSAccessorwssUrl - URL of an WSSpublic void setAuthenticationMethod(AuthenticationMethod authnMethod)
setAuthenticationMethod in interface WSSAccessorauthnMethod - The authentication method that shall be used.public List<String> getSupportedAuthenticationMethods()
getSupportedAuthenticationMethods in interface WSSAccessorNullPointerException - DOCUMENT ME!public org.dom4j.Document getWSSCapabilities()
getWSSCapabilities in interface WSSAccessornullNullPointerException - DOCUMENT ME!public String getSecuredServiceType()
public boolean isSessionAvailable()
Copyright © 2012–2025 cismet GmbH. All rights reserved.