|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.axis.wsdl.symbolTable.SymbolTable
This class represents a table of all of the top-level symbols from a set of WSDL Definitions and DOM Documents: XML types; WSDL messages, portTypes, bindings, and services.
This symbolTable contains entries of the form
Field Summary | |
static java.lang.String |
ANON_TOKEN
|
protected java.util.Map |
node2ExtensionBase
cache of nodes -> base types for complexTypes. |
Constructor Summary | |
SymbolTable(BaseTypeMapping (src) btm,
boolean addImports,
boolean verbose,
boolean nowrap)
Construct a symbol table with the given Namespaces. |
Method Summary | |
protected void |
add(java.lang.String context,
Definition def,
org.w3c.dom.Document doc)
Add the given Definition and Document information to the symbol table (including imported symbols), populating it with SymTabEntries for each of the top-level symbols. |
void |
dump(java.io.PrintStream out)
Dump the contents of the symbol table. |
protected void |
ensureOperationMessageValid(Message message)
ensures that a message in a <input> , <output> ,
or <fault> element in an |
protected void |
ensureOperationsOfPortTypeValid(PortType portType)
ensures that an an element <portType>
is valid. |
protected void |
ensureOperationValid(Operation operation)
ensures that an an element <operation> within
an element <portType> |
protected boolean |
existsPortWithName(QName (src) name)
checks whether there exists a WSDL port with a given name in the current symbol table |
SymTabEntry (src) |
get(QName (src) qname,
java.lang.Class cls)
Get the entry with the given QName of the given class. |
BindingEntry (src) |
getBindingEntry(QName (src) qname)
Get the BindingEntry with the given QName. |
Definition |
getDefinition()
Get the Definition. |
Element (src) |
getElement(QName (src) qname)
Get the Element TypeEntry with the given QName. |
java.util.Map |
getElementIndex()
Return an unmodifiable map of qnames -> Elements in the symbol table. |
java.util.HashMap |
getHashMap()
Get the raw symbol table HashMap. |
MessageEntry (src) |
getMessageEntry(QName (src) qname)
Get the MessageEntry with the given QName. |
Parameters (src) |
getOperationParameters(Operation operation,
java.lang.String namespace,
BindingEntry (src) bindingEntry)
For the given operation, this method returns the parameter info conveniently collated. |
void |
getParametersFromParts(java.util.Vector v,
java.util.Collection parts,
boolean literal,
java.lang.String opName,
BindingEntry (src) bindingEntry)
This method returns a vector containing Parameters which represent each Part (shouldn't we call these "Parts" or something?) |
PortTypeEntry (src) |
getPortTypeEntry(QName (src) qname)
Get the PortTypeEntry with the given QName. |
ServiceEntry (src) |
getServiceEntry(QName (src) qname)
Get the ServiceEntry with the given QName. |
java.util.Vector |
getSymbols(QName (src) qname)
Get the list of entries with the given QName. |
Type (src) |
getType(QName (src) qname)
Get the Type TypeEntry with the given QName. |
TypeEntry (src) |
getTypeEntry(QName (src) qname,
boolean wantElementType)
Get the type entry for the given qname. |
int |
getTypeEntryCount()
Return the count of TypeEntries in the symbol table. |
java.util.Map |
getTypeIndex()
Return an unmodifiable map of qnames -> Elements in the symbol table. |
java.util.Vector |
getTypes()
Deprecated. use specialized get{Element,Type}Index() methods instead |
java.lang.String |
getWSDLURI()
Get the WSDL URI. |
boolean |
isKnownNamespace(java.lang.String namespace)
Check if this is a known namespace (soap-enc or schema xsd or schema xsi or xml) |
boolean |
isWrapped()
Are we wrapping literal soap body elements. |
void |
populate(java.lang.String uri)
Call this method if you have a uri for the WSDL document |
void |
populate(java.lang.String context,
org.w3c.dom.Document doc)
Call this method if your WSDL document has already been parsed as an XML DOM document. |
void |
populate(java.lang.String uri,
java.lang.String username,
java.lang.String password)
|
void |
populateTypes(java.net.URL context,
org.w3c.dom.Document doc)
Populate the symbol table with all of the Types from the Document. |
void |
setWrapped(boolean wrapped)
Turn on/off element wrapping for literal soap body's. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final java.util.Map node2ExtensionBase
public static final java.lang.String ANON_TOKEN
Constructor Detail |
public SymbolTable(BaseTypeMapping (src) btm, boolean addImports, boolean verbose, boolean nowrap)
Method Detail |
public java.util.HashMap getHashMap()
public java.util.Vector getSymbols(QName (src) qname)
public SymTabEntry (src) get(QName (src) qname, java.lang.Class cls)
public TypeEntry (src) getTypeEntry(QName (src) qname, boolean wantElementType)
qname
- wantElementType
- boolean that indicates type or element (for type= or ref=)public Type (src) getType(QName (src) qname)
public Element (src) getElement(QName (src) qname)
public MessageEntry (src) getMessageEntry(QName (src) qname)
public PortTypeEntry (src) getPortTypeEntry(QName (src) qname)
public BindingEntry (src) getBindingEntry(QName (src) qname)
public ServiceEntry (src) getServiceEntry(QName (src) qname)
public java.util.Vector getTypes()
public java.util.Map getElementIndex()
Map
valuepublic java.util.Map getTypeIndex()
Map
valuepublic int getTypeEntryCount()
int
valuepublic Definition getDefinition()
public java.lang.String getWSDLURI()
public boolean isWrapped()
public void setWrapped(boolean wrapped)
public void dump(java.io.PrintStream out)
public void populate(java.lang.String uri) throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
uri
- wsdlURI the location of the WSDL file.
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public void populate(java.lang.String uri, java.lang.String username, java.lang.String password) throws java.io.IOException, WSDLException, org.xml.sax.SAXException, javax.xml.parsers.ParserConfigurationException
java.io.IOException
WSDLException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public void populate(java.lang.String context, org.w3c.dom.Document doc) throws java.io.IOException, org.xml.sax.SAXException, WSDLException, javax.xml.parsers.ParserConfigurationException
context
- context This is directory context for the Document. If the Document were from file "/x/y/z.wsdl" then the context could be "/x/y" (even "/x/y/z.wsdl" would work). If context is null, then the context becomes the current directory.doc
- doc This is the XML Document containing the WSDL.
java.io.IOException
org.xml.sax.SAXException
WSDLException
javax.xml.parsers.ParserConfigurationException
protected void add(java.lang.String context, Definition def, org.w3c.dom.Document doc) throws java.io.IOException, org.xml.sax.SAXException, WSDLException, javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
WSDLException
javax.xml.parsers.ParserConfigurationException
public boolean isKnownNamespace(java.lang.String namespace)
namespace
-
public void populateTypes(java.net.URL context, org.w3c.dom.Document doc) throws java.io.IOException, org.xml.sax.SAXException, WSDLException, javax.xml.parsers.ParserConfigurationException
java.io.IOException
org.xml.sax.SAXException
WSDLException
javax.xml.parsers.ParserConfigurationException
protected void ensureOperationMessageValid(Message message) throws java.io.IOException
<input>
, <output>
,
or <fault> element in an <operation>
element is valid. In particular, ensures that
- an attribute
message
is present (according to the
XML Schema for WSDL 1.1 message
is required
- the value of attribute
message
(a QName) refers to
an already defined message
Note: this method should throw a javax.wsdl.WSDLException
rather than
a java.io.IOException
- Parameters:
message
- the message object
- Throws:
java.io.IOException
- thrown, if the message is not valid
protected void ensureOperationValid(Operation operation) throws java.io.IOException
<operation>
within
an element <portType> is valid. Throws an exception
if the operation is not valid.
Note: this method should throw a javax.wsdl.WSDLException
rather than a java.io.IOException
- Parameters:
operation
- the operation element
- Throws:
java.io.IOException
- thrown, if the element is not valid.
java.lang.IllegalArgumentException
- thrown, if operation is null
protected void ensureOperationsOfPortTypeValid(PortType portType) throws java.io.IOException
<portType>
is valid. Throws an exception if the portType is not valid.
Note: this method should throw a javax.wsdl.WSDLException
rather than a java.io.IOException
portType
- the portType element
java.io.IOException
- thrown, if the element is not valid.
java.lang.IllegalArgumentException
- thrown, if operation is nullpublic Parameters (src) getOperationParameters(Operation operation, java.lang.String namespace, BindingEntry (src) bindingEntry) throws java.io.IOException
java.io.IOException
public void getParametersFromParts(java.util.Vector v, java.util.Collection parts, boolean literal, java.lang.String opName, BindingEntry (src) bindingEntry) throws java.io.IOException
java.io.IOException
protected boolean existsPortWithName(QName (src) name)
name
- the QName of the port. Note: only the local part of the qname is relevant,
since port names are not qualified with a namespace. They are of type nmtoken in WSDL 1.1
and of type ncname in WSDL 1.2
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |