microsoft.exchange.webservices.data
Class ExchangeCredentials

java.lang.Object
  extended by microsoft.exchange.webservices.data.ExchangeCredentials
Direct Known Subclasses:
ClientCertificateCredentials, WebCredentials, WSSecurityBasedCredentials

public abstract class ExchangeCredentials
extends Object

Base class of Exchange credential types.


Constructor Summary
ExchangeCredentials()
           
 
Method Summary
protected  URI adjustUrl(URI url)
          * Adjusts the URL endpoint based on the credentials.
protected  void emitExtraSoapHeaderNamespaceAliases(XMLStreamWriter writer)
          * Emit any extra necessary namespace aliases for the SOAP:header block.
static ExchangeCredentials getExchangeCredentialsFromNetworkCredential(String userName, String password, String domain)
          Performs an implicit conversion from to .
protected  void preAuthenticate()
          This method is called to pre-authenticate credentials before a service request is made.
protected  void prepareWebRequest(microsoft.exchange.webservices.data.HttpWebRequest client)
          * This method is called to apply credentials to a service request before the request is made.
protected  void serializeExtraSoapHeaders(XMLStreamWriter writer, String webMethodName)
          * Serialize any extra necessary SOAP headers.
protected  void serializeWSSecurityHeaders(XMLStreamWriter writer)
          * Serialize SOAP headers used for authentication schemes that rely on WS-Security.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExchangeCredentials

public ExchangeCredentials()
Method Detail

getExchangeCredentialsFromNetworkCredential

public static ExchangeCredentials getExchangeCredentialsFromNetworkCredential(String userName,
                                                                              String password,
                                                                              String domain)
Performs an implicit conversion from to . This allows a NetworkCredential object to be implictly converted to an ExchangeCredential which is useful when setting credentials on an ExchangeService.

Parameters:
userName - Account user name.
password - Account password.
domain - Account domain.
Returns:
The result of the conversion.

preAuthenticate

protected void preAuthenticate()
This method is called to pre-authenticate credentials before a service request is made.


prepareWebRequest

protected void prepareWebRequest(microsoft.exchange.webservices.data.HttpWebRequest client)
                          throws URISyntaxException
* This method is called to apply credentials to a service request before the request is made.

Parameters:
client - The request.
Throws:
URISyntaxException - the uRI syntax exception

emitExtraSoapHeaderNamespaceAliases

protected void emitExtraSoapHeaderNamespaceAliases(XMLStreamWriter writer)
                                            throws XMLStreamException
* Emit any extra necessary namespace aliases for the SOAP:header block.

Parameters:
writer - The writer.
Throws:
XMLStreamException - the xML stream exception

serializeExtraSoapHeaders

protected void serializeExtraSoapHeaders(XMLStreamWriter writer,
                                         String webMethodName)
                                  throws XMLStreamException
* Serialize any extra necessary SOAP headers. This is used for authentication schemes that rely on WS-Security, or for endpoints requiring WS-Addressing.

Parameters:
writer - The writer.
webMethodName - The Web method being called.
Throws:
XMLStreamException - the xML stream exception

serializeWSSecurityHeaders

protected void serializeWSSecurityHeaders(XMLStreamWriter writer)
                                   throws XMLStreamException
* Serialize SOAP headers used for authentication schemes that rely on WS-Security.

Parameters:
writer - The writer.
Throws:
XMLStreamException - the xML stream exception

adjustUrl

protected URI adjustUrl(URI url)
                 throws URISyntaxException
* Adjusts the URL endpoint based on the credentials.

Parameters:
url - The URL.
Returns:
Adjust URL.
Throws:
URISyntaxException - the uRI syntax exception


Copyright © 2012. All Rights Reserved.