Package com.sun.xml.ws.api.server
Interface SDDocument
-
- All Known Subinterfaces:
SDDocument.Schema,SDDocument.WSDL
- All Known Implementing Classes:
SDDocumentImpl
@ManagedData public interface SDDocumentRepresents an individual document that forms aServiceDefinition.TODO: how does those documents refer to each other?- Author:
- Jitendra Kotamraju
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSDDocument.SchemaSDDocumentthat represents an XML Schema.static interfaceSDDocument.WSDLSDDocumentthat represents a WSDL.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>getImports()returns the referenced documentsQNamegetRootName()Gets the root tag name of this document.URLgetURL()Gets the system ID of the document where it's taken from.booleanisSchema()Returns true if this document is schema.booleanisWSDL()Returns true if this document is WSDL.voidwriteTo(PortAddressResolver portAddressResolver, DocumentAddressResolver resolver, OutputStream os)Writes the document to the givenOutputStream.voidwriteTo(PortAddressResolver portAddressResolver, DocumentAddressResolver resolver, XMLStreamWriter out)Writes the document to the givenXMLStreamWriter.
-
-
-
Method Detail
-
getRootName
@ManagedAttribute QName getRootName()
Gets the root tag name of this document.This can be used to identify a kind of document quickly (such as schema, WSDL, ...)
- Returns:
- always non-null.
-
isWSDL
@ManagedAttribute boolean isWSDL()
Returns true if this document is WSDL.
-
isSchema
@ManagedAttribute boolean isSchema()
Returns true if this document is schema.
-
getURL
@ManagedAttribute URL getURL()
Gets the system ID of the document where it's taken from. Generated documents use a fake URL that can be used to resolve relative URLs. So donot use this URL for reading or writing.
-
writeTo
void writeTo(@Nullable PortAddressResolver portAddressResolver, DocumentAddressResolver resolver, OutputStream os) throws IOExceptionWrites the document to the givenOutputStream.Since
ServiceDefinitiondoesn't know which endpoint addressAdapteris serving to, (and often it serves multiple URLs simultaneously), this method takes the PortAddressResolver as a parameter, so that it can produce the corret address information in the generated WSDL.- Parameters:
portAddressResolver- An endpoint address resolver that gives endpoint address for a WSDL port. Can be null.resolver- Used to resolve relative references among documents.os- TheOutputStreamthat receives the generated document.- Throws:
IOException- if there was a failure reported from theOutputStream.
-
writeTo
void writeTo(PortAddressResolver portAddressResolver, DocumentAddressResolver resolver, XMLStreamWriter out) throws XMLStreamException, IOException
Writes the document to the givenXMLStreamWriter.The same as
writeTo(PortAddressResolver,DocumentAddressResolver,OutputStream)except it writes to anXMLStreamWriter.The implementation must not call
XMLStreamWriter.writeStartDocument()norXMLStreamWriter.writeEndDocument(). Those are the caller's responsibility.- Throws:
XMLStreamException- if theXMLStreamWriterreports an error.IOException
-
-