|
|||||||||
| Home >> All >> org >> apache >> axis >> wsdl >> [ toJava overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.axis.wsdl.toJava
Class JavaGeneratorFactory

java.lang.Objectorg.apache.axis.wsdl.toJava.JavaGeneratorFactory
- All Implemented Interfaces:
- org.apache.axis.wsdl.gen.GeneratorFactory
- public class JavaGeneratorFactory
- extends java.lang.Object
- implements org.apache.axis.wsdl.gen.GeneratorFactory
- extends java.lang.Object
This is Wsdl2java's implementation of the GeneratorFactory
| Nested Class Summary | |
protected class |
JavaGeneratorFactory.Writers
Class Writers |
| Field Summary | |
private static java.lang.String |
BINDING_SUFFIX
|
protected JavaGeneratorFactory.Writers |
bindingWriters
Return Wsdl2java's JavaBindingWriter object. |
(package private) org.apache.axis.wsdl.symbolTable.BaseTypeMapping |
btm
Get TypeMapping to use for translating QNames to java base types |
static java.lang.String |
COMPLEX_TYPE_FAULT
Field COMPLEX_TYPE_FAULT |
private JavaGeneratorFactory.Writers |
defWriters
Return Wsdl2java's JavaDefinitionWriter object. |
private static java.lang.String |
ELEMENT_SUFFIX
|
protected Emitter |
emitter
Field emitter |
static java.lang.String |
EXCEPTION_CLASS_NAME
Field EXCEPTION_CLASS_NAME |
static java.lang.String |
EXCEPTION_DATA_TYPE
Field EXCEPTION_DATA_TYPE |
private static java.lang.String |
EXCEPTION_SUFFIX
|
private static org.apache.commons.logging.Log |
log_
|
private JavaGeneratorFactory.Writers |
messageWriters
Since Wsdl2java doesn't emit anything for Messages, return the No-op generator. |
private static java.lang.String |
PORT_TYPE_SUFFIX
|
private JavaGeneratorFactory.Writers |
portTypeWriters
Return Wsdl2java's JavaPortTypeWriter object. |
private static java.lang.String |
SERVICE_SUFFIX
|
protected JavaGeneratorFactory.Writers |
serviceWriters
Return Wsdl2java's JavaServiceWriter object. |
protected org.apache.axis.wsdl.symbolTable.SymbolTable |
symbolTable
Field symbolTable |
private static java.lang.String |
TYPE_SUFFIX
|
private JavaGeneratorFactory.Writers |
typeWriters
Return Wsdl2java's JavaTypeWriter object. |
| Constructor Summary | |
JavaGeneratorFactory()
Default constructor. |
|
JavaGeneratorFactory(Emitter emitter)
Constructor JavaGeneratorFactory |
|
| Method Summary | |
protected void |
addBindingGenerators()
Method addBindingGenerators |
protected void |
addDefinitionGenerators()
Method addDefinitionGenerators |
void |
addGenerator(java.lang.Class wsdlClass,
java.lang.Class generator)
Method addGenerator |
private void |
addGenerators()
Method addGenerators |
protected void |
addMessageGenerators()
These addXXXGenerators are called by the constructor. |
protected void |
addPortTypeGenerators()
Method addPortTypeGenerators |
protected void |
addServiceGenerators()
Method addServiceGenerators |
protected void |
addTypeGenerators()
Method addTypeGenerators |
private java.lang.String |
constructSignature(org.apache.axis.wsdl.symbolTable.Parameters parms,
java.lang.String opName)
Construct the signature, which is used by both the interface and the stub. |
protected void |
constructSignatures(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
Method constructSignatures |
protected void |
determineIfHoldersNeeded(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
Find all inout/out parameters and add a flag to the Type of that parameter saying a holder is needed. |
protected void |
determineInterfaceNames(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
Method determineInterfaceNames |
void |
generatorPass(Definition def,
org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
Do the Wsdl2java generator pass: - resolve name clashes - construct signatures |
org.apache.axis.wsdl.symbolTable.BaseTypeMapping |
getBaseTypeMapping()
Method getBaseTypeMapping |
protected java.lang.String |
getExceptionJavaNameHook(javax.xml.namespace.QName qname)
|
org.apache.axis.wsdl.gen.Generator |
getGenerator(Message message,
org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
Method getGenerator |
private static java.lang.String |
getJavaClassName(java.lang.Class clazz)
Gets class name from Java class. |
protected java.lang.String |
getOperationJavaNameHook(org.apache.axis.wsdl.symbolTable.BindingEntry bEntry,
java.lang.String wsdlOpName)
|
protected java.lang.String |
getParameterTypeJavaNameHook(org.apache.axis.wsdl.symbolTable.BindingEntry bEntry,
java.lang.String wsdlOpName,
int pos)
|
protected java.lang.String |
getPortJavaNameHook(java.lang.String portName)
|
protected java.lang.String |
getReturnTypeJavaNameHook(org.apache.axis.wsdl.symbolTable.BindingEntry bEntry,
java.lang.String wsdlOpName)
|
protected java.lang.String |
getServiceEndpointInterfaceJavaNameHook(org.apache.axis.wsdl.symbolTable.PortTypeEntry ptEntry,
org.apache.axis.wsdl.symbolTable.BindingEntry bEntry)
|
protected java.lang.String |
getServiceInterfaceJavaNameHook(org.apache.axis.wsdl.symbolTable.ServiceEntry sEntry)
|
protected void |
ignoreNonSOAPBindings(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
If a binding's type is not TYPE_SOAP, then we don't use that binding or that binding's portType. |
protected boolean |
include(javax.xml.namespace.QName qName)
Determines whether the QName supplied should be generated by comparing the namespace for the QName against the included and excluded names. |
protected void |
javifyNames(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
Fill in the names of each SymTabEntry with the javaified name. |
protected int |
javifyTypeEntryName(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable,
org.apache.axis.wsdl.symbolTable.TypeEntry entry,
java.util.HashMap anonQNames,
int uniqueNum)
Refactored to call recursively for JAX-RPC 1.1 spec 4.2.5. |
private java.lang.String |
mangleName(java.lang.String name,
java.lang.String mangle)
Change the indicated type name into a mangled form using the mangle string. |
protected void |
resolveNameClashes(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
Messages, PortTypes, Bindings, and Services can share the same name. |
private boolean |
sameJavaClass(java.lang.String one,
java.lang.String two)
Returns true if same java class, ignore [] |
protected void |
setAllReferencesToTrue()
The --all flag is set on the command line (or generateAll(true) is called on WSDL2Java). |
void |
setBaseTypeMapping(org.apache.axis.wsdl.symbolTable.BaseTypeMapping btm)
Method setBaseTypeMapping |
void |
setEmitter(Emitter emitter)
Method setEmitter |
private void |
setFaultContext(org.apache.axis.wsdl.symbolTable.FaultInfo fault,
org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
setFaultContext: Helper routine for the setFaultContext method above. |
private void |
setFaultContext(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
setFaultContext: Processes the symbol table and sets the COMPLEX_TYPE_FAULT on each TypeEntry that is a complexType and is referenced in a fault message. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
log_
private static final org.apache.commons.logging.Log log_
emitter
protected Emitter emitter
- Field emitter
symbolTable
protected org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable
- Field symbolTable
COMPLEX_TYPE_FAULT
public static java.lang.String COMPLEX_TYPE_FAULT
- Field COMPLEX_TYPE_FAULT
EXCEPTION_CLASS_NAME
public static java.lang.String EXCEPTION_CLASS_NAME
- Field EXCEPTION_CLASS_NAME
EXCEPTION_DATA_TYPE
public static java.lang.String EXCEPTION_DATA_TYPE
- Field EXCEPTION_DATA_TYPE
SERVICE_SUFFIX
private static final java.lang.String SERVICE_SUFFIX
- See Also:
- Constant Field Values
PORT_TYPE_SUFFIX
private static final java.lang.String PORT_TYPE_SUFFIX
- See Also:
- Constant Field Values
TYPE_SUFFIX
private static final java.lang.String TYPE_SUFFIX
- See Also:
- Constant Field Values
ELEMENT_SUFFIX
private static final java.lang.String ELEMENT_SUFFIX
- See Also:
- Constant Field Values
EXCEPTION_SUFFIX
private static final java.lang.String EXCEPTION_SUFFIX
- See Also:
- Constant Field Values
BINDING_SUFFIX
private static final java.lang.String BINDING_SUFFIX
- See Also:
- Constant Field Values
messageWriters
private JavaGeneratorFactory.Writers messageWriters
- Since Wsdl2java doesn't emit anything for Messages, return the No-op generator.
portTypeWriters
private JavaGeneratorFactory.Writers portTypeWriters
- Return Wsdl2java's JavaPortTypeWriter object.
bindingWriters
protected JavaGeneratorFactory.Writers bindingWriters
- Return Wsdl2java's JavaBindingWriter object.
serviceWriters
protected JavaGeneratorFactory.Writers serviceWriters
- Return Wsdl2java's JavaServiceWriter object.
typeWriters
private JavaGeneratorFactory.Writers typeWriters
- Return Wsdl2java's JavaTypeWriter object.
defWriters
private JavaGeneratorFactory.Writers defWriters
- Return Wsdl2java's JavaDefinitionWriter object.
btm
org.apache.axis.wsdl.symbolTable.BaseTypeMapping btm
- Get TypeMapping to use for translating
QNames to java base types
| Constructor Detail |
JavaGeneratorFactory
public JavaGeneratorFactory()
- Default constructor. Note that this class is unusable until setEmitter
is called.
JavaGeneratorFactory
public JavaGeneratorFactory(Emitter emitter)
- Constructor JavaGeneratorFactory
| Method Detail |
setEmitter
public void setEmitter(Emitter emitter)
- Method setEmitter
addGenerators
private void addGenerators()
- Method addGenerators
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
public void generatorPass(Definition def,
org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
- Do the Wsdl2java generator pass:
- resolve name clashes
- construct signatures
- Specified by:
generatorPassin interfaceorg.apache.axis.wsdl.gen.GeneratorFactory
getGenerator
public org.apache.axis.wsdl.gen.Generator getGenerator(Message message, org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
- Method getGenerator
- Specified by:
getGeneratorin interfaceorg.apache.axis.wsdl.gen.GeneratorFactory
addGenerator
public void addGenerator(java.lang.Class wsdlClass, java.lang.Class generator)
- Method addGenerator
javifyNames
protected void javifyNames(org.apache.axis.wsdl.symbolTable.SymbolTable 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.
javifyTypeEntryName
protected int javifyTypeEntryName(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable, org.apache.axis.wsdl.symbolTable.TypeEntry entry, java.util.HashMap anonQNames, int uniqueNum)
- Refactored to call recursively for JAX-RPC 1.1 spec 4.2.5.
getJavaClassName
private static java.lang.String getJavaClassName(java.lang.Class clazz)
- Gets class name from Java class.
If the class is an array, get its component type's name
setFaultContext
private void setFaultContext(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
- setFaultContext:
Processes the symbol table and sets the COMPLEX_TYPE_FAULT
on each TypeEntry that is a complexType and is referenced in
a fault message. TypeEntries that are the base or derived
from such a TypeEntry are also marked with COMPLEX_TYPE_FAULT.
The containing MessageEntry is marked with cOMPLEX_TYPE_FAULT, and
all MessageEntries for faults are tagged with the
EXCEPTION_CLASS_NAME variable, which indicates the java exception
class name.
setFaultContext
private void setFaultContext(org.apache.axis.wsdl.symbolTable.FaultInfo fault, org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
- setFaultContext:
Helper routine for the setFaultContext method above.
Examines the indicated fault and sets COMPLEX_TYPE_FAULT
EXCEPTION_DATA_TYPE and EXCEPTION_CLASS_NAME as appropriate.
getExceptionJavaNameHook
protected java.lang.String getExceptionJavaNameHook(javax.xml.namespace.QName qname)
determineInterfaceNames
protected void determineInterfaceNames(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
- Method determineInterfaceNames
getServiceEndpointInterfaceJavaNameHook
protected java.lang.String getServiceEndpointInterfaceJavaNameHook(org.apache.axis.wsdl.symbolTable.PortTypeEntry ptEntry, org.apache.axis.wsdl.symbolTable.BindingEntry bEntry)
getServiceInterfaceJavaNameHook
protected java.lang.String getServiceInterfaceJavaNameHook(org.apache.axis.wsdl.symbolTable.ServiceEntry sEntry)
getPortJavaNameHook
protected java.lang.String getPortJavaNameHook(java.lang.String portName)
resolveNameClashes
protected void resolveNameClashes(org.apache.axis.wsdl.symbolTable.SymbolTable 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.
mangleName
private java.lang.String mangleName(java.lang.String name, java.lang.String mangle)
- Change the indicated type name into a mangled form using the mangle string.
sameJavaClass
private boolean sameJavaClass(java.lang.String one, java.lang.String two)
- Returns true if same java class, ignore []
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(org.apache.axis.wsdl.symbolTable.SymbolTable 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(org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
- Method constructSignatures
getOperationJavaNameHook
protected java.lang.String getOperationJavaNameHook(org.apache.axis.wsdl.symbolTable.BindingEntry bEntry, java.lang.String wsdlOpName)
getReturnTypeJavaNameHook
protected java.lang.String getReturnTypeJavaNameHook(org.apache.axis.wsdl.symbolTable.BindingEntry bEntry, java.lang.String wsdlOpName)
getParameterTypeJavaNameHook
protected java.lang.String getParameterTypeJavaNameHook(org.apache.axis.wsdl.symbolTable.BindingEntry bEntry, java.lang.String wsdlOpName, int pos)
constructSignature
private java.lang.String constructSignature(org.apache.axis.wsdl.symbolTable.Parameters parms, java.lang.String opName)
- Construct the signature, which is used by both the interface and the stub.
determineIfHoldersNeeded
protected void determineIfHoldersNeeded(org.apache.axis.wsdl.symbolTable.SymbolTable 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(org.apache.axis.wsdl.symbolTable.BaseTypeMapping btm)
- Method setBaseTypeMapping
- Specified by:
setBaseTypeMappingin interfaceorg.apache.axis.wsdl.gen.GeneratorFactory
getBaseTypeMapping
public org.apache.axis.wsdl.symbolTable.BaseTypeMapping getBaseTypeMapping()
- Method getBaseTypeMapping
- Specified by:
getBaseTypeMappingin interfaceorg.apache.axis.wsdl.gen.GeneratorFactory
include
protected boolean include(javax.xml.namespace.QName qName)
- 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
|
|||||||||
| Home >> All >> org >> apache >> axis >> wsdl >> [ toJava overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.axis.wsdl.toJava.JavaGeneratorFactory