Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.axis.wsdl.gen.Parser
org.apache.axis.wsdl.toJava.Emitter
public class Emitter
extends Parser
Field Summary | |
static String |
|
protected String |
|
protected BaseTypeMapping |
|
protected HashMap |
|
protected Namespaces |
|
protected List |
|
protected List |
|
protected List |
|
protected String |
|
Fields inherited from class org.apache.axis.wsdl.gen.Parser | |
debug , imports , nowrap , password , quiet , username , verbose , wrapArrays |
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
protected boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
boolean |
|
TypeMapping |
|
boolean |
|
boolean |
|
List |
|
GeneratedFileInfo |
|
List |
|
boolean |
|
String |
|
String |
|
protected String |
|
String |
|
protected String |
|
List |
|
List |
|
HashMap |
|
Namespaces |
|
String |
|
String |
|
String |
|
String |
|
List |
|
HashMap |
|
Scope |
|
ServiceDesc |
|
String |
|
boolean |
|
GeneratorFactory |
|
boolean |
|
boolean | |
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
void |
|
void |
|
protected void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.apache.axis.wsdl.gen.Parser | |
getCurrentDefinition , getFactory , getPassword , getSymbolTable , getTimeout , getUsername , getWSDLURI , isDebug , isImports , isNowrap , isQuiet , isVerbose , run , run , sanityCheck , setDebug , setFactory , setImports , setNowrap , setPassword , setQuiet , setTimeout , setUsername , setVerbose |
public static final String DEFAULT_NSTOPKG_FILE
Field DEFAULT_NSTOPKG_FILE
protected String NStoPkgFilename
Field NStoPkgFilename
protected HashMap namespaceMap
Field namespaceMap
protected List nsExcludes
Field nsIncludes - defines a list of namespaces to specifically exclude from generated source code. Any entry in this list that is in conflict with the includes list should be ignored and generated.
protected List nsIncludes
Field nsIncludes - defines a list of namespaces to specifically include in the generated source code. If non-empty, anything not in this list should be excluded. If empty, everything in this and not specifically excluded should be generated.
protected List properties
Field properties - defines a set of general purpose properties that can be used by custom JavaGeneratorFactories.
protected String typeMappingVersion
Field typeMappingVersion
public void debug(boolean value)
Deprecated. Use setDebug(value)
Turn on/off debug messages.
- Parameters:
value
-
public void deploySkeleton(boolean value)
Deprecated. Use setSkeletonWanted(value)
Turn on/off server skeleton deploy
- Parameters:
value
-
protected boolean doesExist(String className)
Check if the className exists.
- Parameters:
className
- className to check
- Returns:
- true if exists, false if not
public void emit(String uri) throws Exception
Deprecated. Call run(uri) instead.
Call this method if you have a uri for the WSDL document
- Parameters:
uri
- wsdlURI the location of the WSDL file.
public void emit(String context, Document doc) throws IOException, SAXException, WSDLException, ParserConfigurationException
Deprecated. Call run(context, doc) instead.
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.
public void generateAll(boolean all)
Deprecated. Use setAllWanted(all)
- Parameters:
all
-
public void generateImports(boolean generateImports)
Deprecated. Use setImports(generateImports)
Turn on/off generation of elements from imported files.
- Parameters:
generateImports
-
public void generateServerSide(boolean value)
Deprecated. Use setServerSide(value)
Turn on/off server-side binding generation
- Parameters:
value
-
public void generateTestCase(boolean value)
Deprecated. Use setTestCaseWanted()
Turn on/off test case creation
- Parameters:
value
-
public boolean getDebug()
Deprecated. Use isDebug()
Return the status of the debug switch.
- Returns:
public TypeMapping getDefaultTypeMapping()
Returns the defaultTypeMapping
used by the service
- Returns:
- the default
TypeMapping
used by the service
public boolean getDeploySkeleton()
Deprecated. Use isSkeletonWanted()
Indicate if we should be deploying skeleton or implementation
- Returns:
public boolean getGenerateServerSide()
Deprecated. Use isServerSide()
Indicate if we should be emitting server side code and deploy/undeploy
- Returns:
public List getGeneratedClassNames()
This method returns a list of all generated class names.
- Returns:
public GeneratedFileInfo getGeneratedFileInfo()
Returns an object which contains of information on all generated files including the class name, filename and a type string.
- Returns:
- An org.apache.axis.wsdl.toJava.GeneratedFileInfo object
- See Also:
GeneratedFileInfo
public List getGeneratedFileNames()
This method returns a list of all generated file names.
- Returns:
public boolean getHelperGeneration()
Deprecated. Use isHelperWanted()
Indicate if we should be generating Helper classes
- Returns:
public String getImplementationClassName()
Get an implementation classname to use instead of the default.
- Returns:
public String getJavaName(QName qName)
Convert the specified QName into a full Java Name.
- Parameters:
qName
-
- Returns:
public String getJavaVariableName(QName typeQName, QName xmlName, boolean isElement)
- Parameters:
typeQName
- QName for containing xml typexmlName
- QName for element
- Returns:
protected String getJavaVariableNameHook(QName typeQName, QName xmlName, boolean isElement)
public List getNamespaceExcludes()
Returns the list of excludes to specifically exclude from the generated source.
public List getNamespaceIncludes()
Returns the list of namespaces specifically excluded from the generated code.
public HashMap getNamespaceMap()
Get the map of namespace -> Java package names
- Returns:
public String getOutputDir()
Get the output directory to use for emitted source files
- Returns:
public String getPackage(String namespace)
Get the Package name for the specified namespace
- Parameters:
namespace
-
- Returns:
public String getPackage(QName qName)
Get the Package name for the specified QName
- Parameters:
qName
-
- Returns:
public String getPackageName()
Get global package name to use instead of mapping namespaces
- Returns:
public List getProperties()
Gets the list of extension properties for custom JavaGeneratorFactories.
public HashMap getQName2ClassMap()
Get the type qname to java class map
- Returns:
- the type qname to java class map
public String getTypeMappingVersion()
Get the typemapping version
public boolean getVerbose()
Deprecated. Use isVerbose()
Return the status of the verbose switch
- Returns:
public GeneratorFactory getWriterFactory()
Deprecated. Call getFactory instead. This doesn't return a WriterFactory, it returns a GeneratorFactory.
Get the GeneratorFactory.
- Returns:
public boolean isAllWanted()
Method isAllWanted
- Returns:
public boolean isAllowInvalidURL()
- Returns:
- Returns the allowInvalidURL.
public boolean isBuildFileWanted()
get the build file genaeration state
- Returns:
public boolean isDeploy()
Returns the deploy mode flag
- Returns:
public boolean isHelperWanted()
Indicate if we should be generating Helper classes
- Returns:
public boolean isServerSide()
Indicate if we should be emitting server side code and deploy/undeploy
- Returns:
public boolean isSkeletonWanted()
Indicate if we should be deploying skeleton or implementation
- Returns:
public boolean isTestCaseWanted()
Method isTestCaseWanted
- Returns:
public boolean isTypeCollisionProtection()
Get the type collision protection setting
- Returns:
public void run(String wsdlURL) throws Exception
Emit appropriate Java files for a WSDL at a given URL. This method will time out after the number of milliseconds specified by our timeoutms member.
- Overrides:
- run in interface Parser
- Parameters:
wsdlURL
-
public void run(String context, Document doc) throws IOException, SAXException, WSDLException, ParserConfigurationException
Call this method if your WSDL document has already been parsed as an XML DOM document.
- Overrides:
- run in interface Parser
- 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.
protected void sanityCheck(SymbolTable symbolTable)
Method sanityCheck
- Overrides:
- sanityCheck in interface Parser
- Parameters:
symbolTable
-
public void setAllWanted(boolean all)
By default, code is generated only for referenced elements. Call bGenerateAll(true) and WSDL2Java will generate code for all elements in the scope regardless of whether they are referenced. Scope means: by default, all WSDL files; if generateImports(false), then only the immediate WSDL file.
- Parameters:
all
-
public void setAllowInvalidURL(boolean allowInvalidURL)
- Parameters:
allowInvalidURL
- The allowInvalidURL to set.
public void setBuildFileWanted(boolean value)
turn the build file genaration ON
- Parameters:
value
-
public void setDefaultTypeMapping(TypeMapping defaultTM)
Sets the defaultTypeMapping
used by the service
- Parameters:
defaultTM
- the defaultTypeMapping
used by the service
public void setDeploy(boolean isDeploy)
Sets the deploy mode flag
- Parameters:
isDeploy
- deploy mode flag
public void setFactory(String factory)
Sets theWriterFactory Class
to use
- Parameters:
factory
- the name of the factoryClass
public void setHelperGeneration(boolean value)
Deprecated. Use setHelperWanted(value)
Turn on/off Helper class generation
- Parameters:
value
-
public void setHelperWanted(boolean value)
Turn on/off Helper class generation
- Parameters:
value
-
public void setImplementationClassName(String implementationClassName)
Set an implementation classname to use instead of the default.
- Parameters:
implementationClassName
-
public void setNStoPkg(String NStoPkgFilename)
Set the NStoPkg mappings filename.
- Parameters:
NStoPkgFilename
-
public void setNamespaceExcludes(List nsExcludes)
Sets the list of namespaces to specifically exclude from the generated source.
public void setNamespaceIncludes(List nsIncludes)
Sets the list of namespaces to specifically include in the generated code.
public void setNamespaceMap(HashMap map)
Set a map of namespace -> Java package names
- Parameters:
map
-
public void setOutputDir(String outputDir)
Set the output directory to use in emitted source files
- Parameters:
outputDir
-
public void setPackageName(String packageName)
Set a global package name to use instead of mapping namespaces
- Parameters:
packageName
-
public void setProperties(List properties)
Sets the list of extension properties for custom JavaGeneratorFactories.
public void setQName2ClassMap(HashMap map)
Set the type qname to java class map
- Parameters:
map
- a type qname to javaclass map (from Java2Wsdl emitter)
public void setScope(Scope scope)
Set the scope for the deploy.xml file.
- Parameters:
scope
- One of 'null', Scope.APPLICATION, Scope.REQUEST, Scope.SESSION. Anything else is equivalent to 'null' null and no explicit scope tag will appear in deploy.xml.
public void setServerSide(boolean value)
Turn on/off server skeleton creation
- Parameters:
value
-
public void setServiceDesc(ServiceDesc serviceDesc)
Sets the ServicdDesc object
- Parameters:
serviceDesc
- ServiceDesc to set
public void setSkeletonWanted(boolean value)
Turn on/off server skeleton deploy
- Parameters:
value
-
public void setTestCaseWanted(boolean value)
Turn on/off test case creation
- Parameters:
value
-
public void setTypeCollisionProtection(boolean value)
Enable/disable type collision protection
- Parameters:
value
-
public void setTypeMappingVersion(String typeMappingVersion)
Method setTypeMappingVersion
- Parameters:
typeMappingVersion
-
public void setWrapArrays(boolean wrapArrays)
public void verbose(boolean value)
Deprecated. Use setVerbose(value)
Turn on/off verbose messages
- Parameters:
value
-