public abstract class ExchangeCredentials extends Object
| Constructor and Description |
|---|
ExchangeCredentials() |
| Modifier and Type | Method and Description |
|---|---|
URI |
adjustUrl(URI url)
Adjusts the URL endpoint based on the credential.
|
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
|
protected static String |
getUriWithoutWSSecurity(URI url)
Return the url without ws-security address.
|
boolean |
isNeedSignature()
Gets the flag indicating whether any sign action need taken.
|
void |
preAuthenticate()
This method is called to pre-authenticate credential before a service
request is made.
|
void |
prepareWebRequest(HttpWebRequest client)
This method is called to apply credential to a service request before
the request is made.
|
void |
serializeExtraSoapHeaders(XMLStreamWriter writer,
String webMethodName)
Serialize any extra necessary SOAP headers.
|
void |
serializeWSSecurityHeaders(XMLStreamWriter writer)
Serialize SOAP headers used for authentication schemes that rely on WS-Security.
|
void |
sign(ByteArrayOutputStream memoryStream)
Add the signature element to the memory stream.
|
public ExchangeCredentials()
public static ExchangeCredentials getExchangeCredentialsFromNetworkCredential(String userName, String password, String domain)
userName - Account user name.password - Account password.domain - Account domain.protected static String getUriWithoutWSSecurity(URI url)
url - The urlpublic void preAuthenticate()
public void prepareWebRequest(HttpWebRequest client) throws URISyntaxException
client - The request.URISyntaxException - the uRI syntax exceptionpublic void emitExtraSoapHeaderNamespaceAliases(XMLStreamWriter writer) throws XMLStreamException
writer - the writerXMLStreamException - the XML stream exceptionpublic void serializeExtraSoapHeaders(XMLStreamWriter writer, String webMethodName) throws XMLStreamException
writer - the writerwebMethodName - the Web method being calledXMLStreamException - the XML stream exceptionpublic URI adjustUrl(URI url) throws URISyntaxException
url - The URL.URISyntaxExceptionpublic boolean isNeedSignature()
public void sign(ByteArrayOutputStream memoryStream) throws Exception
memoryStream - The memory stream.Exceptionpublic void serializeWSSecurityHeaders(XMLStreamWriter writer) throws XMLStreamException
writer - the writerXMLStreamException - the XML stream exceptionCopyright © 2012–2015 Microsoft. All rights reserved.