|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmicrosoft.exchange.webservices.data.core.EwsServiceXmlWriter
public class EwsServiceXmlWriter
Stax based XML Writer implementation.
Field Summary | |
---|---|
protected boolean |
requireWSSecurityUtilityNamespace
The requireWSSecurityUtilityNamespace * |
Constructor Summary | |
---|---|
EwsServiceXmlWriter(ExchangeServiceBase service,
OutputStream stream)
Initializes a new instance. |
Method Summary | |
---|---|
static void |
addElement(Element element,
XMLStreamWriter writer)
|
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
void |
flush()
Flushes this instance. |
XMLStreamWriter |
getInternalWriter()
Gets the internal XML writer. |
ExchangeServiceBase |
getService()
Gets the service. |
boolean |
isRequireWSSecurityUtilityNamespace()
Gets a value indicating whether the SOAP message need WSSecurity Utility namespace. |
boolean |
isTimeZoneHeaderEmitted()
Gets a value indicating whether the time zone SOAP header was emitted through this writer. |
void |
setRequireWSSecurityUtilityNamespace(boolean requireWSSecurityUtilityNamespace)
Sets a value indicating whether the SOAP message need WSSecurity Utility namespace. |
void |
setTimeZoneHeaderEmitted(boolean isTimeZoneHeaderEmitted)
Sets a value indicating whether the time zone SOAP header was emitted through this writer. |
protected boolean |
tryConvertObjectToString(Object value,
OutParam<String> str)
Try to convert object to a string. |
protected void |
writeAttributeString(String localName,
String stringValue)
Writes the attribute value. |
protected void |
writeAttributeString(String namespacePrefix,
String localName,
String stringValue)
Writes the attribute value. |
void |
writeAttributeValue(String localName,
boolean alwaysWriteEmptyString,
Object value)
Writes the attribute value. |
void |
writeAttributeValue(String localName,
Object value)
Writes the attribute value. |
void |
writeAttributeValue(String namespacePrefix,
String localName,
Object value)
Writes the attribute value. |
void |
writeBase64ElementValue(byte[] buffer)
Writes the base64-encoded element value. |
void |
writeBase64ElementValue(InputStream stream)
Writes the base64-encoded element value. |
void |
writeElementValue(XmlNamespace xmlNamespace,
String localName,
Object value)
Writes the element value. |
void |
writeElementValue(XmlNamespace xmlNamespace,
String localName,
String displayName,
Object value)
Writes the element value. |
void |
writeEndElement()
Writes the end element. |
void |
writeNode(Node xmlNode)
|
static void |
writeNode(Node xmlNode,
XMLStreamWriter xmlStreamWriter)
|
void |
writeStartDocument()
Write start document. |
void |
writeStartElement(XmlNamespace xmlNamespace,
String localName)
Writes the start element. |
static void |
writeToDocument(Document document,
XMLStreamWriter xmlStreamWriter)
|
void |
writeValue(String value,
String name)
Writes string value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean requireWSSecurityUtilityNamespace
Constructor Detail |
---|
public EwsServiceXmlWriter(ExchangeServiceBase service, OutputStream stream) throws XMLStreamException
service
- the servicestream
- the stream
XMLStreamException
- the XML stream exceptionMethod Detail |
---|
protected boolean tryConvertObjectToString(Object value, OutParam<String> str)
value
- The value.str
- the str
public void dispose()
dispose
in interface IDisposable
public void flush() throws XMLStreamException
XMLStreamException
- the XML stream exceptionpublic void writeStartElement(XmlNamespace xmlNamespace, String localName) throws XMLStreamException
xmlNamespace
- the XML namespacelocalName
- the local name of the element
XMLStreamException
- the XML stream exceptionpublic void writeEndElement() throws XMLStreamException
XMLStreamException
- the XML stream exceptionpublic void writeAttributeValue(String localName, Object value) throws ServiceXmlSerializationException
localName
- the local name of the attributevalue
- the value
ServiceXmlSerializationException
- the service xml serialization exceptionpublic void writeAttributeValue(String localName, boolean alwaysWriteEmptyString, Object value) throws ServiceXmlSerializationException
localName
- the local name of the attribute.alwaysWriteEmptyString
- always emit the empty string as the value.value
- the value
ServiceXmlSerializationException
- the service xml serialization exceptionpublic void writeAttributeValue(String namespacePrefix, String localName, Object value) throws ServiceXmlSerializationException
namespacePrefix
- the namespace prefixlocalName
- the local name of the attributevalue
- the value
ServiceXmlSerializationException
- the service xml serialization exceptionprotected void writeAttributeString(String localName, String stringValue) throws ServiceXmlSerializationException
localName
- The local name of the attribute.stringValue
- The string value.
ServiceXmlSerializationException
- Thrown if string value isn't valid for XMLprotected void writeAttributeString(String namespacePrefix, String localName, String stringValue) throws ServiceXmlSerializationException
namespacePrefix
- The namespace prefix.localName
- The local name of the attribute.stringValue
- The string value.
ServiceXmlSerializationException
- Thrown if string value isn't valid for XML.public void writeValue(String value, String name) throws ServiceXmlSerializationException
value
- The value.name
- Element name (used for error handling)
ServiceXmlSerializationException
- Thrown if string value isn't valid for XML.public void writeElementValue(XmlNamespace xmlNamespace, String localName, String displayName, Object value) throws XMLStreamException, ServiceXmlSerializationException
xmlNamespace
- the XML namespacelocalName
- the local name of the elementdisplayName
- the name that should appear in the exception message when the value can not be serializedvalue
- the value
XMLStreamException
- the XML stream exception
ServiceXmlSerializationException
- the service xml serialization exceptionpublic void writeNode(Node xmlNode) throws XMLStreamException
XMLStreamException
public static void writeNode(Node xmlNode, XMLStreamWriter xmlStreamWriter) throws XMLStreamException
xmlNode
- XML nodexmlStreamWriter
- XML stream writer
XMLStreamException
- the XML stream exceptionpublic static void writeToDocument(Document document, XMLStreamWriter xmlStreamWriter) throws XMLStreamException
document
- XML documentxmlStreamWriter
- XML stream writer
XMLStreamException
- the XML stream exceptionpublic static void addElement(Element element, XMLStreamWriter writer) throws XMLStreamException
element
- DOM elementwriter
- XML stream writer
XMLStreamException
- the XML stream exceptionpublic void writeElementValue(XmlNamespace xmlNamespace, String localName, Object value) throws XMLStreamException, ServiceXmlSerializationException
xmlNamespace
- the XML namespacelocalName
- the local name of the elementvalue
- the value
XMLStreamException
- the XML stream exception
ServiceXmlSerializationException
- the service xml serialization exceptionpublic void writeBase64ElementValue(byte[] buffer) throws XMLStreamException
buffer
- the buffer
XMLStreamException
- the XML stream exceptionpublic void writeBase64ElementValue(InputStream stream) throws IOException, XMLStreamException
stream
- the stream
IOException
- signals that an I/O exception has occurred
XMLStreamException
- the XML stream exceptionpublic XMLStreamWriter getInternalWriter()
public ExchangeServiceBase getService()
public boolean isRequireWSSecurityUtilityNamespace()
public void setRequireWSSecurityUtilityNamespace(boolean requireWSSecurityUtilityNamespace)
public boolean isTimeZoneHeaderEmitted()
public void setTimeZoneHeaderEmitted(boolean isTimeZoneHeaderEmitted)
isTimeZoneHeaderEmitted
- true if the time zone SOAP header was emitted; otherwise
false.public void writeStartDocument() throws XMLStreamException
XMLStreamException
- the XML stream exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |