org.apache.axis.wsdl.symbolTable
Class SymbolTable

java.lang.Object
  |
  +--org.apache.axis.wsdl.symbolTable.SymbolTable

public class SymbolTable
extends java.lang.Object

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 where key is of type QName and value is of type Vector. The Vector's elements are all of the objects that have the given QName. This is necessary since names aren't unique among the WSDL types. message, portType, binding, service, could all have the same QName and are differentiated merely by type. SymbolTable contains type-specific getters to bypass the Vector layer: public PortTypeEntry getPortTypeEntry(QName name), etc.


Field Summary
static java.lang.String ANON_TOKEN
           
 
Constructor Summary
SymbolTable(BaseTypeMapping btm, boolean addImports, boolean verbose, boolean debug, boolean nowrap)
          Construct a symbol table with the given Namespaces.
 
Method Summary
 void dump(java.io.PrintStream out)
          Dump the contents of the symbol table.
 SymTabEntry get(QName qname, java.lang.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.
 java.util.HashMap getHashMap()
          Get the raw symbol table HashMap.
 MessageEntry getMessageEntry(QName qname)
          Get the MessageEntry with the given QName.
 Parameters getOperationParameters(javax.wsdl.Operation operation, java.lang.String namespace, BindingEntry 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 bindingEntry, boolean outputParts)
          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.
 java.util.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.
 java.util.Vector getTypes()
          Get the list of all the XML schema types in the symbol table.
 java.lang.String getWSDLURI()
          Get the WSDL URI.
 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 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

ANON_TOKEN

public static final java.lang.String ANON_TOKEN
Constructor Detail

SymbolTable

public SymbolTable(BaseTypeMapping btm,
                   boolean addImports,
                   boolean verbose,
                   boolean debug,
                   boolean nowrap)
Construct a symbol table with the given Namespaces.
Method Detail

getHashMap

public java.util.HashMap getHashMap()
Get the raw symbol table HashMap.

getSymbols

public java.util.Vector getSymbols(QName qname)
Get the list of entries with the given QName. Since symbols can share QNames, this list is necessary. This list will not contain any more than one element of any given SymTabEntry.

get

public SymTabEntry get(QName qname,
                       java.lang.Class cls)
Get the entry with the given QName of the given class. If it does not exist, return null.

getTypeEntry

public TypeEntry getTypeEntry(QName qname,
                              boolean wantElementType)
Get the type entry for the given qname.
Parameters:
qname -  
wantElementType - boolean that indicates type or element (for type= or ref=)

getType

public Type getType(QName qname)
Get the Type TypeEntry with the given QName. If it doesn't exist, return null.

getElement

public Element getElement(QName qname)
Get the Element TypeEntry with the given QName. If it doesn't exist, return null.

getMessageEntry

public MessageEntry getMessageEntry(QName qname)
Get the MessageEntry with the given QName. If it doesn't exist, return null.

getPortTypeEntry

public PortTypeEntry getPortTypeEntry(QName qname)
Get the PortTypeEntry with the given QName. If it doesn't exist, return null.

getBindingEntry

public BindingEntry getBindingEntry(QName qname)
Get the BindingEntry with the given QName. If it doesn't exist, return null.

getServiceEntry

public ServiceEntry getServiceEntry(QName qname)
Get the ServiceEntry with the given QName. If it doesn't exist, return null.

getTypes

public java.util.Vector getTypes()
Get the list of all the XML schema types in the symbol table. In other words, all entries that are instances of TypeEntry.

getDefinition

public javax.wsdl.Definition getDefinition()
Get the Definition. The definition is null until populate is called.

getWSDLURI

public java.lang.String getWSDLURI()
Get the WSDL URI. The WSDL URI is null until populate is called, and ONLY if a WSDL URI is provided.

isWrapped

public boolean isWrapped()
Are we wrapping literal soap body elements.

setWrapped

public void setWrapped(boolean wrapped)
Turn on/off element wrapping for literal soap body's.

dump

public void dump(java.io.PrintStream out)
Dump the contents of the symbol table. For debugging purposes only.

populate

public void populate(java.lang.String uri)
              throws java.io.IOException,
                     javax.wsdl.WSDLException
Call this method if you have a uri for the WSDL document
Parameters:
uri - wsdlURI the location of the WSDL file.

populate

public void populate(java.lang.String uri,
                     java.lang.String username,
                     java.lang.String password)
              throws java.io.IOException,
                     javax.wsdl.WSDLException

populate

public void populate(java.lang.String context,
                     org.w3c.dom.Document doc)
              throws java.io.IOException,
                     javax.wsdl.WSDLException
Call this method if your WSDL document has already been parsed as an XML DOM document.
Parameters:
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.

getOperationParameters

public Parameters getOperationParameters(javax.wsdl.Operation operation,
                                         java.lang.String namespace,
                                         BindingEntry bindingEntry)
                                  throws java.io.IOException
For the given operation, this method returns the parameter info conveniently collated. There is a bit of processing that is needed to write the interface, stub, and skeleton. Rather than do that processing 3 times, it is done once, here, and stored in the Parameters object.

getParametersFromParts

public void getParametersFromParts(java.util.Vector v,
                                   java.util.Collection parts,
                                   boolean literal,
                                   java.lang.String opName,
                                   BindingEntry bindingEntry,
                                   boolean outputParts)
                            throws java.io.IOException
This method returns a vector containing Parameters which represent each Part (shouldn't we call these "Parts" or something?)


Copyright © 2002 Apache XML Project. All Rights Reserved.