|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.ws.api.server.SDDocumentSource
com.sun.xml.ws.util.xml.MetadataDocument
public class MetadataDocument
SDDocument
implmentation.
This extends from SDDocumentSource
so that
JAX-WS server runtime code can use SDDocument
as SDDocumentSource
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.sun.xml.ws.api.server.SDDocument |
---|
SDDocument.Schema, SDDocument.WSDL |
Constructor Summary | |
---|---|
protected |
MetadataDocument(QName rootName,
URL url,
SDDocumentSource source)
|
protected |
MetadataDocument(QName rootName,
URL url,
SDDocumentSource source,
Set<String> imports)
|
Method Summary | |
---|---|
static SDDocument |
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. |
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 . |
Methods inherited from class com.sun.xml.ws.api.server.SDDocumentSource |
---|
create, create |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MetadataDocument(QName rootName, URL url, SDDocumentSource source)
protected MetadataDocument(QName rootName, URL url, SDDocumentSource source, Set<String> imports)
Method Detail |
---|
public static SDDocument 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.
public QName getRootName()
SDDocument
This can be used to identify a kind of document quickly (such as schema, WSDL, ...)
getRootName
in interface SDDocument
public boolean isWSDL()
SDDocument
isWSDL
in interface SDDocument
public boolean isSchema()
SDDocument
isSchema
in interface SDDocument
public URL getURL()
SDDocument
getURL
in interface SDDocument
public javax.xml.stream.XMLStreamReader read(javax.xml.stream.XMLInputFactory xif) throws IOException, javax.xml.stream.XMLStreamException
SDDocumentSource
XMLStreamReader
that reads the document.
This method maybe invoked multiple times concurrently.
read
in class SDDocumentSource
xif
- 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
SDDocumentSource
XMLStreamReader
that reads the document.
This method maybe invoked multiple times concurrently.
read
in class SDDocumentSource
IOException
- if something goes wrong trying to read the document.
javax.xml.stream.XMLStreamException
- if something goes wrong while creating a parser.public URL getSystemId()
SDDocumentSource
getSystemId
in class SDDocumentSource
public Set<String> getImports()
SDDocument
getImports
in interface SDDocument
public void writeTo(PortAddressResolver portAddressResolver, DocumentAddressResolver resolver, OutputStream os) throws IOException
SDDocument
OutputStream
.
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 SDDocument
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
- 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
SDDocument
XMLStreamWriter
.
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 SDDocument
javax.xml.stream.XMLStreamException
- if the XMLStreamWriter
reports an error.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |