public class SDDocumentImpl extends SDDocumentSource implements SDDocument
SDDocument implmentation.
This extends from SDDocumentSource so that
JAX-WS server runtime code can use SDDocument
as SDDocumentSource.
SDDocument.Schema, SDDocument.WSDL| Modifier and Type | Field and Description |
|---|---|
(package private) List<SDDocumentFilter> |
filters
Set when
ServiceDefinitionImpl is constructed. |
(package private) SDDocumentResolver |
sddocResolver |
| Modifier | Constructor and Description |
|---|---|
protected |
SDDocumentImpl(QName rootName,
URL url,
SDDocumentSource source) |
protected |
SDDocumentImpl(QName rootName,
URL url,
SDDocumentSource source,
Set<String> imports) |
| Modifier and Type | Method and Description |
|---|---|
static SDDocumentImpl |
create(SDDocumentSource src,
QName serviceName,
QName portTypeName)
Creates
SDDocument from SDDocumentSource. |
Set<String> |
getImports()
returns the referenced documents
|
QName |
getRootName()
Gets the root tag name of this document.
|
URL |
getSystemId()
System ID of this document.
|
URL |
getURL()
Gets the system ID of the document where it's taken from.
|
boolean |
isSchema()
Returns true if this document is schema.
|
boolean |
isWSDL()
Returns true if this document is WSDL.
|
javax.xml.stream.XMLStreamReader |
read()
Returns the
XMLStreamReader that reads the document. |
javax.xml.stream.XMLStreamReader |
read(javax.xml.stream.XMLInputFactory xif)
Returns the
XMLStreamReader that reads the document. |
(package private) void |
setFilters(List<SDDocumentFilter> filters) |
(package private) void |
setResolver(SDDocumentResolver sddocResolver) |
void |
writeTo(OutputStream os) |
void |
writeTo(PortAddressResolver portAddressResolver,
DocumentAddressResolver resolver,
OutputStream os)
Writes the document to the given
OutputStream. |
void |
writeTo(PortAddressResolver portAddressResolver,
DocumentAddressResolver resolver,
javax.xml.stream.XMLStreamWriter out)
Writes the document to the given
XMLStreamWriter. |
create, create@Nullable List<SDDocumentFilter> filters
ServiceDefinitionImpl is constructed.@Nullable SDDocumentResolver sddocResolver
protected SDDocumentImpl(QName rootName, URL url, SDDocumentSource source)
protected SDDocumentImpl(QName rootName, URL url, SDDocumentSource source, Set<String> imports)
public static SDDocumentImpl create(SDDocumentSource src, QName serviceName, QName portTypeName)
SDDocument from SDDocumentSource.src - WSDL document infosetserviceName - wsdl:service nameportTypeName - The information about the port of WSEndpoint to which this document is built for.
These values are used to determine which document is the concrete and abstract WSDLs
for this endpoint.void setFilters(List<SDDocumentFilter> filters)
void setResolver(SDDocumentResolver sddocResolver)
public QName getRootName()
SDDocumentThis can be used to identify a kind of document quickly (such as schema, WSDL, ...)
getRootName in interface SDDocumentpublic boolean isWSDL()
SDDocumentisWSDL in interface SDDocumentpublic boolean isSchema()
SDDocumentisSchema in interface SDDocumentpublic URL getURL()
SDDocumentgetURL in interface SDDocumentpublic javax.xml.stream.XMLStreamReader read(javax.xml.stream.XMLInputFactory xif) throws IOException, javax.xml.stream.XMLStreamException
SDDocumentSourceXMLStreamReader that reads the document.
This method maybe invoked multiple times concurrently.
read in class SDDocumentSourcexif - The implementation may choose to use this object when it wants to
create a new parser (or it can just ignore this parameter completely.)IOException - if something goes wrong trying to read the document.javax.xml.stream.XMLStreamException - if something goes wrong while creating a parser.public javax.xml.stream.XMLStreamReader read() throws IOException, javax.xml.stream.XMLStreamException
SDDocumentSourceXMLStreamReader that reads the document.
This method maybe invoked multiple times concurrently.
read in class SDDocumentSourceIOException - if something goes wrong trying to read the document.javax.xml.stream.XMLStreamException - if something goes wrong while creating a parser.public URL getSystemId()
SDDocumentSourcegetSystemId in class SDDocumentSourcepublic Set<String> getImports()
SDDocumentgetImports in interface SDDocumentpublic void writeTo(OutputStream os) throws IOException
IOExceptionpublic void writeTo(PortAddressResolver portAddressResolver, DocumentAddressResolver resolver, OutputStream os) throws IOException
SDDocumentOutputStream.
Since ServiceDefinition doesn't know which endpoint address
Adapter is 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.
writeTo in interface SDDocumentportAddressResolver - An endpoint address resolver that gives endpoint address for a WSDL
port. Can be null.resolver - Used to resolve relative references among documents.os - The OutputStream that receives the generated document.IOException - if there was a failure reported from the OutputStream.public void writeTo(PortAddressResolver portAddressResolver, DocumentAddressResolver resolver, javax.xml.stream.XMLStreamWriter out) throws javax.xml.stream.XMLStreamException, IOException
SDDocumentXMLStreamWriter.
The same as SDDocument.writeTo(PortAddressResolver,DocumentAddressResolver,OutputStream) except
it writes to an XMLStreamWriter.
The implementation must not call XMLStreamWriter.writeStartDocument()
nor XMLStreamWriter.writeEndDocument(). Those are the caller's
responsibility.
writeTo in interface SDDocumentjavax.xml.stream.XMLStreamException - if the XMLStreamWriter reports an error.IOExceptionCopyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.