|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvnet.wom.api.parser.WOMParser
public final class WOMParser
Parses a WSDL and provides a model - WSDLSet. The interfaces provided by WOMParser are largely based
on XSOM.
| Constructor Summary | |
|---|---|
WOMParser()
Creates a new WOMParser using SAX parser from the default implementation of XMLParser |
|
WOMParser(javax.xml.parsers.SAXParserFactory factory)
Creates a new WOMParser, the underlying XMLParser will use the factory to create SAX parser. |
|
WOMParser(com.sun.xml.xsom.parser.XMLParser parser)
Creates a new WOMParser that will use the given XMLParser to parse the WSDL. |
|
| Method Summary | |
|---|---|
void |
addWSDLExtensionHandler(WSDLExtensionHandler extension)
|
com.sun.xml.xsom.parser.XMLParser |
getDefaultXMLParserInstance()
Gives the default XMLParser instance. |
org.xml.sax.EntityResolver |
getEntityResolver()
|
org.xml.sax.ErrorHandler |
getErrorHandler()
|
org.xml.sax.ContentHandler |
getParserHandler()
Gets the parser implemented as a ContentHandler. |
WSDLSet |
getResult()
Gets the parsed wsdl as WSDLSet. |
WSDLSet |
parse(java.io.File wsdl)
Parses a WSDL document from the given File. |
WSDLSet |
parse(org.xml.sax.InputSource wsdl)
Parses a new XML Schema document. |
WSDLSet |
parse(java.io.InputStream wsdl)
Parses a WSDL document from the given InputStream. |
WSDLSet |
parse(java.io.Reader reader)
Parses a WSDL document from the given Reader. |
WSDLSet |
parse(java.lang.String systemId)
Parses a WSDL document from the given systemId |
WSDLSet |
parse(java.net.URL wsdl)
Parses a WSDL document from the given URL. |
void |
setEntityResolver(org.xml.sax.EntityResolver entityResolver)
Set EntityResolver to resolve <wsdl:import |
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
ErrorHandler to receive any error/warning that happens during parsing. |
void |
setSchemaContentHandler(org.xml.sax.ContentHandler handler)
WOM will fire events for the schema under <wsdl:types section to this ContentHandler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WOMParser()
WOMParser using SAX parser from the default implementation of XMLParser
public WOMParser(javax.xml.parsers.SAXParserFactory factory)
WOMParser, the underlying XMLParser will use the factory to create SAX parser.
factory - Must be non-null. The factory must be configured correctly, such as
SAXParserFactory.setNamespaceAware(true) must be called to create a namespace aware SAX parser.public WOMParser(com.sun.xml.xsom.parser.XMLParser parser)
XMLParser will
send SAX events to the WOM ContentHandler.
parser - non null.| Method Detail |
|---|
public WSDLSet parse(org.xml.sax.InputSource wsdl)
throws java.io.IOException,
org.xml.sax.SAXException
InputSource does not have a system ID,
WOM will fail to resolve them.
WSDLSet, null if there was any error.
java.io.IOException
org.xml.sax.SAXException
public WSDLSet parse(java.io.File wsdl)
throws java.io.IOException,
org.xml.sax.SAXException
File.
wsdl - non-null
WSDLSet, null if there was any error.
java.io.IOException
org.xml.sax.SAXException
public WSDLSet parse(java.io.InputStream wsdl)
throws org.xml.sax.SAXException
InputStream.
When using this method, WOM does not know the system ID of
this document, therefore, when this stream contains relative
references to other schemas, WOM will fail to resolve them.
To specify an system ID with a stream, use InputSource
WSDLSet, null if there was any error.
org.xml.sax.SAXException
public WSDLSet parse(java.net.URL wsdl)
throws org.xml.sax.SAXException
URL.
wsdl - non-null
WSDLSet, null if there was any error.
org.xml.sax.SAXException
public WSDLSet parse(java.lang.String systemId)
throws org.xml.sax.SAXException
systemId - non-null
WSDLSet, null if there was any error.
org.xml.sax.SAXException
public WSDLSet parse(java.io.Reader reader)
throws org.xml.sax.SAXException
Reader.
When using this method, WOM does not know the system ID of
this document, therefore, when this reader contains relative
references to other schemas, WOM will fail to resolve them.
To specify an system ID with a reader, use InputSource
WSDLSet, null if there was any error.
org.xml.sax.SAXException
public WSDLSet getResult()
throws org.xml.sax.SAXException
WSDLSet. Call this method only after the parsing is done.
org.xml.sax.SAXExceptionpublic org.xml.sax.EntityResolver getEntityResolver()
public org.xml.sax.ErrorHandler getErrorHandler()
public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
EntityResolver to resolve <wsdl:import
public void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
ErrorHandler to receive any error/warning that happens during parsing.
public void setSchemaContentHandler(org.xml.sax.ContentHandler handler)
handler - always non-nullpublic void addWSDLExtensionHandler(WSDLExtensionHandler extension)
public com.sun.xml.xsom.parser.XMLParser getDefaultXMLParserInstance()
public org.xml.sax.ContentHandler getParserHandler()
If you don't send a complete event sequence from a startDocument event to an endDocument event, the state of WOMParser can become unstable. This sometimes happen when you encounter an error while generating SAX events. Don't call the getResult method in that case.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||