Package org.apache.axis.wsdl.toJava
Class JavaGeneratorFactory
java.lang.Object
org.apache.axis.wsdl.toJava.JavaGeneratorFactory
- All Implemented Interfaces:
GeneratorFactory
This is Wsdl2java's implementation of the GeneratorFactory
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JavaGeneratorFactory.WritersReturn Wsdl2java's JavaBindingWriter object.static StringField COMPLEX_TYPE_FAULTprotected EmitterField emitterstatic StringField EXCEPTION_CLASS_NAMEstatic StringField EXCEPTION_DATA_TYPEprotected JavaGeneratorFactory.WritersReturn Wsdl2java's JavaServiceWriter object.protected SymbolTableField symbolTable -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.JavaGeneratorFactory(Emitter emitter) Constructor JavaGeneratorFactory -
Method Summary
Modifier and TypeMethodDescriptionprotected voidMethod addBindingGeneratorsprotected voidMethod addDefinitionGeneratorsvoidaddGenerator(Class wsdlClass, Class generator) Method addGeneratorprotected voidThese addXXXGenerators are called by the constructor.protected voidMethod addPortTypeGeneratorsprotected voidMethod addServiceGeneratorsprotected voidMethod addTypeGeneratorsprotected voidconstructSignatures(SymbolTable symbolTable) Method constructSignaturesprotected voiddetermineIfHoldersNeeded(SymbolTable symbolTable) Find all inout/out parameters and add a flag to the Type of that parameter saying a holder is needed.protected voiddetermineInterfaceNames(SymbolTable symbolTable) Method determineInterfaceNamesvoidgeneratorPass(javax.wsdl.Definition def, SymbolTable symbolTable) Do the Wsdl2java generator pass: - resolve name clashes - construct signaturesMethod getBaseTypeMappingprotected StringgetExceptionJavaNameHook(QName qname) getGenerator(javax.wsdl.Binding binding, SymbolTable symbolTable) Method getGeneratorgetGenerator(javax.wsdl.Definition definition, SymbolTable symbolTable) Method getGeneratorgetGenerator(javax.wsdl.Message message, SymbolTable symbolTable) Method getGeneratorgetGenerator(javax.wsdl.PortType portType, SymbolTable symbolTable) Method getGeneratorgetGenerator(javax.wsdl.Service service, SymbolTable symbolTable) Method getGeneratorgetGenerator(TypeEntry type, SymbolTable symbolTable) Method getGeneratorprotected StringgetOperationJavaNameHook(BindingEntry bEntry, String wsdlOpName) protected StringgetParameterTypeJavaNameHook(BindingEntry bEntry, String wsdlOpName, int pos) protected StringgetPortJavaNameHook(String portName) protected StringgetReturnTypeJavaNameHook(BindingEntry bEntry, String wsdlOpName) protected StringgetServiceEndpointInterfaceJavaNameHook(PortTypeEntry ptEntry, BindingEntry bEntry) protected Stringprotected voidignoreNonSOAPBindings(SymbolTable symbolTable) If a binding's type is not TYPE_SOAP, then we don't use that binding or that binding's portType.protected booleanDetermines whether the QName supplied should be generated by comparing the namespace for the QName against the included and excluded names.protected voidjavifyNames(SymbolTable symbolTable) Fill in the names of each SymTabEntry with the javaified name.protected intjavifyTypeEntryName(SymbolTable symbolTable, TypeEntry entry, HashMap anonQNames, int uniqueNum) Refactored to call recursively for JAX-RPC 1.1 spec 4.2.5.protected voidresolveNameClashes(SymbolTable symbolTable) Messages, PortTypes, Bindings, and Services can share the same name.protected voidThe --all flag is set on the command line (or generateAll(true) is called on WSDL2Java).voidMethod setBaseTypeMappingvoidsetEmitter(Emitter emitter) Method setEmitter
-
Field Details
-
emitter
Field emitter -
symbolTable
Field symbolTable -
COMPLEX_TYPE_FAULT
Field COMPLEX_TYPE_FAULT -
EXCEPTION_CLASS_NAME
Field EXCEPTION_CLASS_NAME -
EXCEPTION_DATA_TYPE
Field EXCEPTION_DATA_TYPE -
bindingWriters
Return Wsdl2java's JavaBindingWriter object. -
serviceWriters
Return Wsdl2java's JavaServiceWriter object.
-
-
Constructor Details
-
JavaGeneratorFactory
public JavaGeneratorFactory()Default constructor. Note that this class is unusable until setEmitter is called. -
JavaGeneratorFactory
Constructor JavaGeneratorFactory- Parameters:
emitter-
-
-
Method Details
-
setEmitter
Method setEmitter- Parameters:
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()Method addPortTypeGenerators -
addBindingGenerators
protected void addBindingGenerators()Method addBindingGenerators -
addServiceGenerators
protected void addServiceGenerators()Method addServiceGenerators -
addTypeGenerators
protected void addTypeGenerators()Method addTypeGenerators -
addDefinitionGenerators
protected void addDefinitionGenerators()Method addDefinitionGenerators -
generatorPass
Do the Wsdl2java generator pass: - resolve name clashes - construct signatures- Specified by:
generatorPassin interfaceGeneratorFactory- Parameters:
def-symbolTable-
-
getGenerator
Method getGenerator- Specified by:
getGeneratorin interfaceGeneratorFactory- Parameters:
message-symbolTable-- Returns:
-
getGenerator
Method getGenerator- Specified by:
getGeneratorin interfaceGeneratorFactory- Parameters:
portType-symbolTable-- Returns:
-
getGenerator
Method getGenerator- Specified by:
getGeneratorin interfaceGeneratorFactory- Parameters:
binding-symbolTable-- Returns:
-
getGenerator
Method getGenerator- Specified by:
getGeneratorin interfaceGeneratorFactory- Parameters:
service-symbolTable-- Returns:
-
getGenerator
Method getGenerator- Specified by:
getGeneratorin interfaceGeneratorFactory- Parameters:
type-symbolTable-- Returns:
-
getGenerator
Method getGenerator- Specified by:
getGeneratorin interfaceGeneratorFactory- Parameters:
definition-symbolTable-- Returns:
-
addGenerator
Method addGenerator- Parameters:
wsdlClass-generator-
-
javifyNames
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.- Parameters:
symbolTable-
-
javifyTypeEntryName
protected int javifyTypeEntryName(SymbolTable symbolTable, TypeEntry entry, HashMap anonQNames, int uniqueNum) Refactored to call recursively for JAX-RPC 1.1 spec 4.2.5. -
getExceptionJavaNameHook
-
determineInterfaceNames
Method determineInterfaceNames- Parameters:
symbolTable-
-
getServiceEndpointInterfaceJavaNameHook
protected String getServiceEndpointInterfaceJavaNameHook(PortTypeEntry ptEntry, BindingEntry bEntry) -
getServiceInterfaceJavaNameHook
-
getPortJavaNameHook
-
resolveNameClashes
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.- Parameters:
symbolTable-
-
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
If a binding's type is not TYPE_SOAP, then we don't use that binding or that binding's portType.- Parameters:
symbolTable-
-
constructSignatures
Method constructSignatures- Parameters:
symbolTable-
-
getOperationJavaNameHook
-
getReturnTypeJavaNameHook
-
getParameterTypeJavaNameHook
-
determineIfHoldersNeeded
Find all inout/out parameters and add a flag to the Type of that parameter saying a holder is needed.- Parameters:
symbolTable-
-
setBaseTypeMapping
Method setBaseTypeMapping- Specified by:
setBaseTypeMappingin interfaceGeneratorFactory- Parameters:
btm-
-
getBaseTypeMapping
Method getBaseTypeMapping- Specified by:
getBaseTypeMappingin interfaceGeneratorFactory- Returns:
-
include
Determines whether the QName supplied should be generated by comparing the namespace for the QName against the included and excluded names.- if both the includes and excludes are both empty, the element is generated
- if the namespace is in the includes, the element is generated
- if the namespace is not in the excludes and the includes are empty, the element will be generated.
- if the namespace is only in the excludes, the element is not generated
- if the namespace is not in the includes and the includes are not empty, the element is not generated
- Parameters:
qName-- Returns:
-