|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.axis.wsdl.symbolTable.SymbolTable
public class 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 String |
ANON_TOKEN
Field ANON_TOKEN |
protected HashMap |
derivedTypes
|
protected Map |
node2ExtensionBase
cache of nodes -> base types for complexTypes. |
protected boolean |
quiet
Field quiet |
| Constructor Summary | |
|---|---|
SymbolTable(BaseTypeMapping btm,
boolean addImports,
boolean verbose,
boolean nowrap)
Construct a symbol table with the given Namespaces. |
|
| Method Summary | |
|---|---|
protected void |
add(String context,
javax.wsdl.Definition def,
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. |
protected void |
createTypeFromRef(Node node)
Node may contain a reference (via type=, ref=, or element= attributes) to another type. |
void |
dump(PrintStream out)
Dump the contents of the symbol table. |
protected void |
ensureOperationMessageValid(javax.wsdl.Message message)
ensures that a message in a <input>, <output>,
or <fault> element in an |
protected void |
ensureOperationsOfPortTypeValid(javax.wsdl.PortType portType)
ensures that an an element <portType>
is valid. |
protected void |
ensureOperationValid(javax.wsdl.Operation operation)
ensures that an an element <operation> within
an element <portType> |
protected boolean |
existsPortWithName(QName name)
checks whether there exists a WSDL port with a given name in the current symbol table |
SymTabEntry |
get(QName qname,
Class cls)
Get the entry with the given QName of the given class. |
BindingEntry |
getBindingEntry(QName qname)
Get the BindingEntry with the given QName. |
javax.wsdl.Definition |
getDefinition()
Get the Definition. |
Element |
getElement(QName qname)
Get the Element TypeEntry with the given QName. |
Map |
getElementFormDefaults()
|
Map |
getElementIndex()
Return an unmodifiable map of qnames -> Elements in the symbol table. |
EntityResolver |
getEntityResolver()
Get the entity resolver. |
HashMap |
getHashMap()
Get the raw symbol table HashMap. |
List |
getMessageEntries()
|
MessageEntry |
getMessageEntry(QName qname)
Get the MessageEntry with the given QName. |
Parameters |
getOperationParameters(javax.wsdl.Operation operation,
String namespace,
BindingEntry bindingEntry)
For the given operation, this method returns the parameter info conveniently collated. |
void |
getParametersFromParts(Vector v,
Collection parts,
boolean literal,
String opName,
BindingEntry bindingEntry)
This method returns a vector containing Parameters which represent each Part (shouldn't we call these "Parts" or something?) |
PortTypeEntry |
getPortTypeEntry(QName qname)
Get the PortTypeEntry with the given QName. |
ServiceEntry |
getServiceEntry(QName qname)
Get the ServiceEntry with the given QName. |
Vector |
getSymbols(QName qname)
Get the list of entries with the given QName. |
Type |
getType(QName qname)
Get the Type TypeEntry with the given QName. |
TypeEntry |
getTypeEntry(QName qname,
boolean wantElementType)
Get the type entry for the given qname. |
int |
getTypeEntryCount()
Return the count of TypeEntries in the symbol table. |
Map |
getTypeIndex()
Return an unmodifiable map of qnames -> Elements in the symbol table. |
Vector |
getTypes()
Deprecated. use specialized get{Element,Type}Index() methods instead |
String |
getWSDLURI()
Get the WSDL URI. |
boolean |
isKnownNamespace(String namespace)
Check if this is a known namespace (soap-enc or schema xsd or schema xsi or xml) |
boolean |
isQuiet()
Method isQuiet |
boolean |
isWrapped()
Are we wrapping literal soap body elements. |
void |
populate(String uri)
Call this method if you have a uri for the WSDL document |
void |
populate(String context,
Document doc)
Call this method if your WSDL document has already been parsed as an XML DOM document. |
void |
populate(String uri,
String username,
String password)
Method populate |
void |
populateTypes(URL context,
Document doc)
Populate the symbol table with all of the Types from the Document. |
protected void |
processTypes()
|
void |
setEntityResolver(EntityResolver entityResolver)
Set the entity resolver. |
void |
setQuiet(boolean quiet)
Method setQuiet |
void |
setWrapArrays(boolean wrapArrays)
|
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 HashMap derivedTypes
protected final Map node2ExtensionBase
protected boolean quiet
public static final String ANON_TOKEN
| Constructor Detail |
|---|
public SymbolTable(BaseTypeMapping btm,
boolean addImports,
boolean verbose,
boolean nowrap)
btm - addImports - verbose - nowrap - | Method Detail |
|---|
public boolean isQuiet()
public void setQuiet(boolean quiet)
quiet - public HashMap getHashMap()
public Vector getSymbols(QName qname)
qname -
public SymTabEntry get(QName qname,
Class cls)
qname - cls -
public TypeEntry getTypeEntry(QName qname,
boolean wantElementType)
qname - wantElementType - boolean that indicates type or element (for type= or ref=)
public Type getType(QName qname)
qname -
public Element getElement(QName qname)
qname -
public MessageEntry getMessageEntry(QName qname)
qname -
public PortTypeEntry getPortTypeEntry(QName qname)
qname -
public BindingEntry getBindingEntry(QName qname)
qname -
public ServiceEntry getServiceEntry(QName qname)
qname -
public Vector getTypes()
public Map getElementIndex()
Map valuepublic Map getTypeIndex()
Map valuepublic int getTypeEntryCount()
int valuepublic javax.wsdl.Definition getDefinition()
public String getWSDLURI()
public boolean isWrapped()
public void setWrapped(boolean wrapped)
wrapped - public EntityResolver getEntityResolver()
null if no entity resolver is configuredpublic void setEntityResolver(EntityResolver entityResolver)
Document) and all imported WSDL and schema documents.
entityResolver - the entity resolver, or null to use a default entity resolverpublic void dump(PrintStream out)
out -
public void populate(String uri)
throws IOException,
javax.wsdl.WSDLException,
SAXException,
ParserConfigurationException
uri - wsdlURI the location of the WSDL file.
IOException
javax.wsdl.WSDLException
SAXException
ParserConfigurationException
public void populate(String uri,
String username,
String password)
throws IOException,
javax.wsdl.WSDLException,
SAXException,
ParserConfigurationException
uri - username - password -
IOException
javax.wsdl.WSDLException
SAXException
ParserConfigurationException
public void populate(String context,
Document doc)
throws IOException,
SAXException,
javax.wsdl.WSDLException,
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.
IOException
SAXException
javax.wsdl.WSDLException
ParserConfigurationException
protected void add(String context,
javax.wsdl.Definition def,
Document doc)
throws IOException,
SAXException,
javax.wsdl.WSDLException,
ParserConfigurationException
context - def - doc -
IOException
SAXException
javax.wsdl.WSDLException
ParserConfigurationExceptionpublic boolean isKnownNamespace(String namespace)
namespace -
public void populateTypes(URL context,
Document doc)
throws IOException,
SAXException,
javax.wsdl.WSDLException,
ParserConfigurationException
context - doc -
IOException
SAXException
javax.wsdl.WSDLException
ParserConfigurationException
protected void createTypeFromRef(Node node)
throws IOException
node -
IOException
protected void ensureOperationMessageValid(javax.wsdl.Message message)
throws 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:
IOException - thrown, if the message is not valid
protected void ensureOperationValid(javax.wsdl.Operation operation)
throws 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:
IOException - thrown, if the element is not valid.
IllegalArgumentException - thrown, if operation is null
protected void ensureOperationsOfPortTypeValid(javax.wsdl.PortType portType)
throws 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
IOException - thrown, if the element is not valid.
IllegalArgumentException - thrown, if operation is null
public Parameters getOperationParameters(javax.wsdl.Operation operation,
String namespace,
BindingEntry bindingEntry)
throws IOException
operation - namespace - bindingEntry -
IOException
public void getParametersFromParts(Vector v,
Collection parts,
boolean literal,
String opName,
BindingEntry bindingEntry)
throws IOException
v - The output vector of parametersparts - The parts of the messageliteral - Are we in a literal operation (or fault)?opName - The operation (or fault) namebindingEntry - The binding for this operation - can be NULL if we are looking at a fault
IOException - when encountering an error in the WSDLprotected boolean existsPortWithName(QName 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
protected void processTypes()
public List getMessageEntries()
public void setWrapArrays(boolean wrapArrays)
public Map getElementFormDefaults()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||