Emitter (Axis API)
Keywords: org.apache.axis.wsdl.toJava.Emitter,Emitter class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.axis.wsdl.toJava
Class Emitter

    java.lang.Object
      |
      +--org.apache.axis.wsdl.gen.Parser
            |
            +--org.apache.axis.wsdl.toJava.Emitter

public class Emitter
extends Parser

This class produces java files for stubs, skeletons, and types from a WSDL document.

Author:
  Russell Butek (butek@us.ibm.com), Tom Jordahl (tjordahl@macromedia.com), Rich Scheuerle (scheu@us.ibm.com), Steve Graham (sggraham@us.ibm.com)

Field Summary
`protected BaseTypeMapping` | `baseTypeMapping`
`static java.lang.String` | `DEFAULT_NSTOPKG_FILE`
`protected java.util.HashMap` | `namespaceMap`
`protected Namespaces` | `namespaces`
`protected java.lang.String` | `NStoPkgFilename`
`protected java.lang.String` | `typeMappingVersion`

Fields inherited from class org.apache.axis.wsdl.gen.Parser
`debug, imports, nowrap, password, username, verbose`

Constructor Summary
`Emitter()` Default constructor.

Method Summary
`void` | `debug(boolean value)` Deprecated. Use setDebug(value)
`void` | `deploySkeleton(boolean value)` Deprecated. Use setSkeletonWanted(value)
`void` | `emit(java.lang.String uri)` Deprecated. Call run(uri) instead.
`void` | `emit(java.lang.String context, org.w3c.dom.Document doc)` Deprecated. Call run(context, doc) instead.
`void` | `generateAll(boolean all)` Deprecated. Use setAllWanted(all)
`void` | `generateImports(boolean generateImports)` Deprecated. Use setImports(generateImports)
`void` | `generateServerSide(boolean value)` Deprecated. Use setServerSide(value)
`void` | `generateTestCase(boolean value)` Deprecated. Use setTestCaseWanted()
`boolean` | `getDebug()` Deprecated. Use isDebug()
`boolean` | `getDeploySkeleton()` Deprecated. Use isSkeletonWanted()
`java.util.List` | `getGeneratedClassNames()` This method returns a list of all generated class names.
`GeneratedFileInfo` | `getGeneratedFileInfo()` Returns an object which contains of information on all generated files including the class name, filename and a type string.
`java.util.List` | `getGeneratedFileNames()` This method returns a list of all generated file names.
`boolean` | `getGenerateServerSide()` Deprecated. Use isServerSide()
`boolean` | `getHelperGeneration()` Deprecated. Use isHelperWanted()
`java.lang.String` | `getJavaName(QName qName)` Convert the specified QName into a full Java Name.
`java.util.HashMap` | `getNamespaceMap()` Get the map of namespace -> Java package names
`Namespaces` | `getNamespaces()`
`java.lang.String` | `getOutputDir()` Get the output directory to use for emitted source files
`java.lang.String` | `getPackage(QName qName)` Get the Package name for the specified QName
`java.lang.String` | `getPackage(java.lang.String namespace)` Get the Package name for the specified namespace
`java.lang.String` | `getPackageName()` Get global package name to use instead of mapping namespaces
`Scope` | `getScope()` Get the scope for the deploy.xml file.
`boolean` | `getVerbose()` Deprecated. Use isVerbose()
`GeneratorFactory` | `getWriterFactory()` Deprecated. Call getFactory instead. This doesn't return a WriterFactory, it returns a GeneratorFactory.
`boolean` | `isAllWanted()`
`boolean` | `isHelperWanted()` Indicate if we should be generating Helper classes
`boolean` | `isServerSide()` Indicate if we should be emitting server side code and deploy/undeploy
`boolean` | `isSkeletonWanted()` Indicate if we should be deploying skeleton or implementation
`boolean` | `isTestCaseWanted()`
`void` | `run(java.lang.String wsdlURL)` Emit appropriate Java files for a WSDL at a given URL.
`void` | `run(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.
`protected void` | `sanityCheck(SymbolTable symbolTable)`
`void` | `setAllWanted(boolean all)` By default, code is generated only for referenced elements.
`void` | `setFactory(java.lang.String factory)` Sets the `WriterFactory Class` to use
`void` | `setHelperGeneration(boolean value)` Deprecated. Use setHelperWanted(value)
`void` | `setHelperWanted(boolean value)` Turn on/off Helper class generation
`void` | `setNamespaceMap(java.util.HashMap map)` Set a map of namespace -> Java package names
`void` | `setNStoPkg(java.lang.String NStoPkgFilename)` Set the NStoPkg mappings filename.
`void` | `setOutputDir(java.lang.String outputDir)` Set the output directory to use in emitted source files
`void` | `setPackageName(java.lang.String packageName)` Set a global package name to use instead of mapping namespaces
`void` | `setScope(Scope scope)` Set the scope for the deploy.xml file.
`void` | `setServerSide(boolean value)` Turn on/off server skeleton creation
`void` | `setSkeletonWanted(boolean value)` Turn on/off server skeleton deploy
`void` | `setTestCaseWanted(boolean value)` Turn on/off test case creation
`void` | `setTypeMappingVersion(java.lang.String typeMappingVersion)`
`void` | `verbose(boolean value)` Deprecated. Use setVerbose(value)

Methods inherited from class org.apache.axis.wsdl.gen.Parser
`getCurrentDefinition, getFactory, getPassword, getSymbolTable, getTimeout, getUsername, getWSDLURI, isDebug, isImports, isNowrap, isVerbose, setDebug, setFactory, setImports, setNowrap, setPassword, setTimeout, setUsername, setVerbose`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_NSTOPKG_FILE

    public static final java.lang.String DEFAULT_NSTOPKG_FILE

See Also:
  Constant Field Values

### namespaceMap

    protected java.util.HashMap namespaceMap

### typeMappingVersion

    protected java.lang.String typeMappingVersion

### baseTypeMapping

    protected BaseTypeMapping baseTypeMapping

### namespaces

    protected Namespaces namespaces

### NStoPkgFilename

    protected java.lang.String NStoPkgFilename

Constructor Detail

### Emitter

    public Emitter()

  Default constructor.

Method Detail

### setServerSide

    public void setServerSide(boolean value)

  Turn on/off server skeleton creation

  Parameters:
    `value` -

### isServerSide

    public boolean isServerSide()

  Indicate if we should be emitting server side code and deploy/undeploy

### setSkeletonWanted

    public void setSkeletonWanted(boolean value)

  Turn on/off server skeleton deploy

  Parameters:
    `value` -

### isSkeletonWanted

    public boolean isSkeletonWanted()

  Indicate if we should be deploying skeleton or implementation

### setHelperWanted

    public void setHelperWanted(boolean value)

  Turn on/off Helper class generation

  Parameters:
    `value` -

### isHelperWanted

    public boolean isHelperWanted()

  Indicate if we should be generating Helper classes

### setTestCaseWanted

    public void setTestCaseWanted(boolean value)

  Turn on/off test case creation

  Parameters:
    `value` -

### isTestCaseWanted

    public boolean isTestCaseWanted()

### setAllWanted

    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.

### isAllWanted

    public boolean isAllWanted()

### getNamespaces

    public Namespaces getNamespaces()

### setOutputDir

    public void setOutputDir(java.lang.String outputDir)

  Set the output directory to use in emitted source files

### getOutputDir

    public java.lang.String getOutputDir()

  Get the output directory to use for emitted source files

### getPackageName

    public java.lang.String getPackageName()

  Get global package name to use instead of mapping namespaces

### setPackageName

    public void setPackageName(java.lang.String packageName)

  Set a global package name to use instead of mapping namespaces

### setScope

    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.

### getScope

    public Scope getScope()

  Get the scope for the deploy.xml file.

### setNStoPkg

    public void setNStoPkg(java.lang.String NStoPkgFilename)

  Set the NStoPkg mappings filename.

### setNamespaceMap

    public void setNamespaceMap(java.util.HashMap map)

  Set a map of namespace -> Java package names

### getNamespaceMap

    public java.util.HashMap getNamespaceMap()

  Get the map of namespace -> Java package names

### setFactory

    public void setFactory(java.lang.String factory)

  Sets the `WriterFactory Class` to use

  Parameters:
    `factory` - the name of the factory `Class`

### getGeneratedFileInfo

    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`

### getGeneratedClassNames

    public java.util.List getGeneratedClassNames()

  This method returns a list of all generated class names.

### getGeneratedFileNames

    public java.util.List getGeneratedFileNames()

  This method returns a list of all generated file names.

### getPackage

    public java.lang.String getPackage(java.lang.String namespace)

  Get the Package name for the specified namespace

### getPackage

    public java.lang.String getPackage(QName qName)

  Get the Package name for the specified QName

### getJavaName

    public java.lang.String getJavaName(QName qName)

  Convert the specified QName into a full Java Name.

### run

    public void run(java.lang.String wsdlURL)
             throws java.lang.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 class `Parser`
    `java.lang.Exception`

### run

    public void run(java.lang.String context,
                    org.w3c.dom.Document doc)
             throws java.io.IOException,
                    org.xml.sax.SAXException,
                    javax.wsdl.WSDLException,
                    javax.xml.parsers.ParserConfigurationException

  Call this method if your WSDL document has already been parsed as an XML DOM document.

  Overrides:
    `run` in class `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.
    `java.io.IOException`
    `org.xml.sax.SAXException`
    `javax.wsdl.WSDLException`
    `javax.xml.parsers.ParserConfigurationException`

### sanityCheck

    protected void sanityCheck(SymbolTable symbolTable)

  Overrides:
    `sanityCheck` in class `Parser`

### setTypeMappingVersion

    public void setTypeMappingVersion(java.lang.String typeMappingVersion)

### getWriterFactory

    public GeneratorFactory getWriterFactory()

  Deprecated. Call getFactory instead. This doesn't return a WriterFactory, it returns a GeneratorFactory.

  Get the GeneratorFactory.

### emit

    public void emit(java.lang.String uri)
              throws java.lang.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.
    `java.lang.Exception`

### emit

    public void emit(java.lang.String context,
                     org.w3c.dom.Document doc)
              throws java.io.IOException,
                     org.xml.sax.SAXException,
                     javax.wsdl.WSDLException,
                     javax.xml.parsers.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.
    `java.io.IOException`
    `org.xml.sax.SAXException`
    `javax.wsdl.WSDLException`
    `javax.xml.parsers.ParserConfigurationException`

### generateServerSide

    public void generateServerSide(boolean value)

  Deprecated. Use setServerSide(value)

  Turn on/off server-side binding generation

  Parameters:
    `value` -

### getGenerateServerSide

    public boolean getGenerateServerSide()

  Deprecated. Use isServerSide()

  Indicate if we should be emitting server side code and deploy/undeploy

### deploySkeleton

    public void deploySkeleton(boolean value)

  Deprecated. Use setSkeletonWanted(value)

  Turn on/off server skeleton deploy

  Parameters:
    `value` -

### getDeploySkeleton

    public boolean getDeploySkeleton()

  Deprecated. Use isSkeletonWanted()

  Indicate if we should be deploying skeleton or implementation

### setHelperGeneration

    public void setHelperGeneration(boolean value)

  Deprecated. Use setHelperWanted(value)

  Turn on/off Helper class generation

  Parameters:
    `value` -

### getHelperGeneration

    public boolean getHelperGeneration()

  Deprecated. Use isHelperWanted()

  Indicate if we should be generating Helper classes

### generateImports

    public void generateImports(boolean generateImports)

  Deprecated. Use setImports(generateImports)

  Turn on/off generation of elements from imported files.

  Parameters:
    `generateImports` -

### debug

    public void debug(boolean value)

  Deprecated. Use setDebug(value)

  Turn on/off debug messages.

  Parameters:
    `value` -

### getDebug

    public boolean getDebug()

  Deprecated. Use isDebug()

  Return the status of the debug switch.

### verbose

    public void verbose(boolean value)

  Deprecated. Use setVerbose(value)

  Turn on/off verbose messages

  Parameters:
    `value` -

### getVerbose

    public boolean getVerbose()

  Deprecated. Use isVerbose()

  Return the status of the verbose switch

### generateTestCase

    public void generateTestCase(boolean value)

  Deprecated. Use setTestCaseWanted()

  Turn on/off test case creation

  Parameters:
    `value` -

### generateAll

    public void generateAll(boolean all)

  Deprecated. Use setAllWanted(all)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 Apache Web Services Project. All Rights Reserved.