org.jboss.axis.wsdl.toJava
Class JavaGeneratorFactory

java.lang.Object
  extended byorg.jboss.axis.wsdl.toJava.JavaGeneratorFactory
All Implemented Interfaces:
GeneratorFactory (src)

public class JavaGeneratorFactory
extends java.lang.Object
implements GeneratorFactory (src)

This is Wsdl2java's implementation of the GeneratorFactory


Nested Class Summary
protected  class JavaGeneratorFactory.Writers (src)
           
 
Field Summary
protected  JavaGeneratorFactory.Writers (src) bindingWriters
          Return Wsdl2java's JavaBindingWriter object.
static java.lang.String COMPLEX_TYPE_FAULT
           
protected  Emitter (src) emitter
           
static java.lang.String EXCEPTION_CLASS_NAME
           
static java.lang.String EXCEPTION_DATA_TYPE
           
protected  JavaGeneratorFactory.Writers (src) serviceWriters
          Return Wsdl2java's JavaServiceWriter object.
protected  SymbolTable (src) symbolTable
           
 
Constructor Summary
JavaGeneratorFactory()
          Default constructor.
JavaGeneratorFactory(Emitter (src)  emitter)
           
 
Method Summary
protected  void addBindingGenerators()
           
protected  void addDefinitionGenerators()
           
 void addGenerator(java.lang.Class wsdlClass, java.lang.Class generator)
           
protected  void addMessageGenerators()
          These addXXXGenerators are called by the constructor.
protected  void addPortTypeGenerators()
           
protected  void addServiceGenerators()
           
protected  void addTypeGenerators()
           
protected  void constructSignatures(SymbolTable (src)  symbolTable)
           
protected  void determineIfHoldersNeeded(SymbolTable (src)  symbolTable)
          Find all inout/out parameters and add a flag to the Type of that parameter saying a holder is needed.
protected  void determineInterfaceNames(SymbolTable (src)  symbolTable)
           
 void generatorPass(Definition def, SymbolTable (src)  symbolTable)
          Do the Wsdl2java generator pass: - resolve name clashes - construct signatures
 BaseTypeMapping (src) getBaseTypeMapping()
           
 Generator (src) getGenerator(Message message, SymbolTable (src)  symbolTable)
          Get a Generator implementation that will generate bindings for the given Message.
protected  void ignoreNonSOAPBindings(SymbolTable (src)  symbolTable)
          If a binding's type is not TYPE_SOAP, then we don't use that binding or that binding's portType.
protected  void javifyNames(SymbolTable (src)  symbolTable)
          Fill in the names of each SymTabEntry with the javaified name.
protected  void resolveNameClashes(SymbolTable (src)  symbolTable)
          Messages, PortTypes, Bindings, and Services can share the same name.
protected  void setAllReferencesToTrue()
          The --all flag is set on the command line (or generateAll(true) is called on WSDL2Java).
 void setBaseTypeMapping(BaseTypeMapping (src)  btm)
          Get TypeMapping to use for translating QNames to base types
 void setEmitter(Emitter (src)  emitter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

emitter

protected Emitter (src)  emitter

symbolTable

protected SymbolTable (src)  symbolTable

COMPLEX_TYPE_FAULT

public static java.lang.String COMPLEX_TYPE_FAULT

EXCEPTION_CLASS_NAME

public static java.lang.String EXCEPTION_CLASS_NAME

EXCEPTION_DATA_TYPE

public static java.lang.String EXCEPTION_DATA_TYPE

bindingWriters

protected JavaGeneratorFactory.Writers (src)  bindingWriters
Return Wsdl2java's JavaBindingWriter object.


serviceWriters

protected JavaGeneratorFactory.Writers (src)  serviceWriters
Return Wsdl2java's JavaServiceWriter object.

Constructor Detail

JavaGeneratorFactory

public JavaGeneratorFactory()
Default constructor. Note that this class is unusable until setEmitter is called.


JavaGeneratorFactory

public JavaGeneratorFactory(Emitter (src)  emitter)
Method Detail

setEmitter

public void setEmitter(Emitter (src)  emitter)

addMessageGenerators

protected void addMessageGenerators()
These addXXXGenerators are called by the constructor. If an extender of this factory wants to CHANGE the set of generators that are called per WSDL construct, they should override these addXXXGenerators methods. If all an extender wants to do is ADD a generator, then the extension should simply call addGenerator. (NOTE: It doesn't quite work this way, yet. Only the Definition generators fit this model at this point in time.)


addPortTypeGenerators

protected void addPortTypeGenerators()

addBindingGenerators

protected void addBindingGenerators()

addServiceGenerators

protected void addServiceGenerators()

addTypeGenerators

protected void addTypeGenerators()

addDefinitionGenerators

protected void addDefinitionGenerators()

generatorPass

public void generatorPass(Definition def,
                          SymbolTable (src)  symbolTable)
Do the Wsdl2java generator pass: - resolve name clashes - construct signatures

Specified by:
generatorPass in interface GeneratorFactory (src)

getGenerator

public Generator (src)  getGenerator(Message message,
                              SymbolTable (src)  symbolTable)
Description copied from interface: GeneratorFactory (src)
Get a Generator implementation that will generate bindings for the given Message.

Specified by:
getGenerator in interface GeneratorFactory (src)

addGenerator

public void addGenerator(java.lang.Class wsdlClass,
                         java.lang.Class generator)

javifyNames

protected void javifyNames(SymbolTable (src)  symbolTable)
Fill in the names of each SymTabEntry with the javaified name. Note: This method also ensures that anonymous types are given unique java type names.


determineInterfaceNames

protected void determineInterfaceNames(SymbolTable (src)  symbolTable)

resolveNameClashes

protected void resolveNameClashes(SymbolTable (src)  symbolTable)
Messages, PortTypes, Bindings, and Services can share the same name. If they do in this Definition, force their names to be suffixed with _PortType and _Service, respectively.


setAllReferencesToTrue

protected void setAllReferencesToTrue()
The --all flag is set on the command line (or generateAll(true) is called on WSDL2Java). Set all symbols as referenced (except nonSOAP bindings which we don't know how to deal with).


ignoreNonSOAPBindings

protected void ignoreNonSOAPBindings(SymbolTable (src)  symbolTable)
If a binding's type is not TYPE_SOAP, then we don't use that binding or that binding's portType.


constructSignatures

protected void constructSignatures(SymbolTable (src)  symbolTable)

determineIfHoldersNeeded

protected void determineIfHoldersNeeded(SymbolTable (src)  symbolTable)
Find all inout/out parameters and add a flag to the Type of that parameter saying a holder is needed.


setBaseTypeMapping

public void setBaseTypeMapping(BaseTypeMapping (src)  btm)
Description copied from interface: GeneratorFactory (src)
Get TypeMapping to use for translating QNames to base types

Specified by:
setBaseTypeMapping in interface GeneratorFactory (src)

getBaseTypeMapping

public BaseTypeMapping (src)  getBaseTypeMapping()
Specified by:
getBaseTypeMapping in interface GeneratorFactory (src)