com.collabnet.core.ws.dispatcher
Interface XMLRequest

All Known Implementing Classes:
DomXMLRequest

public interface XMLRequest

Encapsulates a request coming from the DocumentAPIDispatcher.

Provides capability to process incoming documents as DOM object or as InputStreams. In addition, attachments sent as part of the SOAP message can also be retrieved.

It also provides a capability to validate an incoming document against a schema.

Author:
sszego

Method Summary
 java.util.List getAttachments()
          Returns the list of attachments that are part of this request.
 org.w3c.dom.Document getDocument()
          The DOM Document containing the XML request.
 DocumentType getDocumentType()
          Returns the DocumentType of the incoming XML document.
 java.io.InputStream getInputStream()
          The stream to read the document from.
 void validateWithSchema(java.util.List schemas)
          Validates the request document with the XSD schemas defined in schemas.
 

Method Detail

getDocumentType

DocumentType getDocumentType()
Returns the DocumentType of the incoming XML document.

Returns:
the document type

getDocument

org.w3c.dom.Document getDocument()
The DOM Document containing the XML request. Note: Only use this method if the document you are about handle is not likely to be very big. If you want to deal with large documents, use the getInputStream method (and use SAX model to process the document).

Returns:
the document.

getInputStream

java.io.InputStream getInputStream()
The stream to read the document from. New stream is returned for every call of this method.

Returns:
the inputstream to read the XML data from

validateWithSchema

void validateWithSchema(java.util.List schemas)
Validates the request document with the XSD schemas defined in schemas.

Parameters:
schemas - the array of SchemaRefernces.

getAttachments

java.util.List getAttachments()
Returns the list of attachments that are part of this request. Note, the returned list cannot be modified.

Returns:
the List of AttachmentPart object that were part of this request. (You can cast each item in the list to javax.xml.soap.AttachmentPart.)
See Also:
AttachmentPart