|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
public class AxisServiceBasedMultiLanguageEmitter
Constructor Summary | |
---|---|
AxisServiceBasedMultiLanguageEmitter()
default constructor - builds |
Method Summary | |
---|---|
protected void |
addAttribute(Document document,
String AttribName,
String attribValue,
Element element)
Utility method to add an attribute to a given element. |
protected Element |
addElement(Document document,
String eltName,
String eltValue,
Element element)
Utility method to add an attribute to a given element. |
protected void |
addEndpoint(Document doc,
Element rootElement)
Adds the endpoint to the document. |
protected void |
addHeaderOperations(List soapHeaderParameterQNameList,
AxisOperation axisOperation,
boolean input)
populate the header parameters |
protected void |
addShortType(Element paramElement,
String type)
Adds the short type name to the given parameter element if the type has no '.' characters in its name the type itself is taken as the shorttype |
protected void |
addSOAPAction(Document doc,
Element rootElement,
AxisOperation axisOperation)
Adds the soap action |
protected void |
addSoapVersion(Document doc,
Element rootElement)
Looks for the SOAPVersion and adds it. |
protected void |
copyToFaultMap()
Utility method to copy the faults to the correct map |
protected Document |
createDocumentForMessageReceiver(String mep,
boolean isServerSideInterface)
Creates the XML model for the message receiver |
protected Document |
createDOMDocumentForAntBuild()
Creates the DOM tree for the Ant build. |
protected Document |
createDOMDocumentForCallbackHandler()
Generates the model for the callbacks. |
protected Document |
createDOMDocumentForException()
Generates the model for the callbacks. |
protected Document |
createDOMDocumentForInterface(boolean writeDatabinders)
Creates the DOM tree for the interface creation. |
protected Document |
createDOMDocumentForInterfaceImplementation()
Creates the DOM tree for implementations. |
protected Document |
createDOMDocumentForServiceXML()
|
protected Document |
createDOMDocumentForSkeleton(boolean isSkeletonInterface)
Creates the XMLModel for the skeleton |
protected Document |
createDOMDocumentForSkeletonInterface()
Creates the XML model for the skeleton interface |
protected Document |
createDOMDocumentForTestCase()
Creates the XML Model for the test case |
protected Element |
createDOMElementforDatabinders(Document doc,
boolean isServerside)
create a dom element for databinders. |
protected void |
debugLogDocument(String description,
Document doc)
debugging method - write the output to the debugger |
void |
emitSkeleton()
Emits the skeleton |
void |
emitStub()
Emits the stubcode with bindings. |
protected void |
fillSyncAttributes(Document doc,
Element rootElement)
|
protected void |
generateAndPopulateFaultNames()
Populate a map of fault class names |
protected Element |
generateParamComponent(Document doc,
String paramName,
String paramType,
QName paramQName)
A convenient method for the generating the parameter element |
protected Element |
generateParamComponent(Document doc,
String paramName,
String paramType,
QName operationName,
QName paramQName)
A convenient method for the generating the parameter element |
protected Element |
generateParamComponent(Document doc,
String paramName,
String paramType,
QName opName,
QName paramQName,
String partName,
boolean isPrimitive,
boolean isArray)
A convenient method for the generating the parameter element |
protected Element |
getBase64Elements(Document doc)
Gets the base64 types. |
protected Document |
getEmptyDocument()
|
protected Element |
getFaultElement(Document doc,
AxisOperation operation)
Get the fault element - No header faults are supported |
protected Element[] |
getFaultParamElements(Document doc,
AxisOperation operation)
|
protected String |
getFullyQualifiedMessageReceiverName()
|
protected String |
getFullyQualifiedSkeletonInterfaceName()
|
protected String |
getFullyQualifiedSkeletonName()
|
protected String |
getFullyQualifiedStubName()
Returns the fully qualified Stub name reused in many methods |
protected Element |
getInputElement(Document doc,
AxisOperation operation,
List headerParameterQNameList)
Get the input element |
protected Element[] |
getInputParamElement(Document doc,
AxisOperation operation)
|
protected Element |
getOpNames(Document doc)
Gets an element representing the operation names |
protected File |
getOutputDirectory(File outputDir,
String dir2)
Gets the output directory for source files. |
protected Element |
getOutputElement(Document doc,
AxisOperation operation,
List headerParameterQNameList)
Finds the output element. |
protected Element |
getOutputParamElement(Document doc,
AxisOperation operation)
|
protected List |
getParameterElementList(Document doc,
List parameters,
String location)
|
protected String |
getParamInitializer(String paramType)
|
protected Element |
getServiceElement(String serviceName,
String className,
Document doc)
A resusable method to return the service element for creating the service xml |
protected Element |
getUniqueListofFaults(Document doc)
A util method that returns a unique list of faults |
protected Element |
getUniqueListofFaultsofMep(Document doc,
String mep)
A util method that returns a unique list of faults for a given mep |
protected boolean |
loadOperations(Document doc,
Element rootElement,
String mep)
Loads the operations |
protected String |
makeJavaClassName(String word)
|
protected void |
processModelObjects(Map objectMappings,
Element root,
Document doc)
|
protected void |
resetFaultNames()
rests the fault name maps |
void |
setCodeGenConfiguration(CodeGenConfiguration configuration)
Sets the relevant codegen configuration |
void |
setMapper(TypeMapper mapper)
Sets the type mapper |
protected void |
updateFaultPackageForStub()
Change the fault classnames to go with the package and stub |
protected void |
updateMapperClassnames(String fullyQulifiedIncludingClassNamePrefix)
we need to modify the mapper's class name list. |
protected void |
updateMapperForMessageReceiver()
Update mapper for message receiver |
protected void |
updateMapperForStub()
Update mapper for the stub |
protected void |
writeAntBuild()
Writes the Ant build. |
protected void |
writeCallBackHandlers()
Writes the callback handlers. |
protected void |
writeClass(Document model,
ClassWriter writer)
A resusable method for the implementation of interface and implementation writing. |
protected void |
writeExceptions()
Writes the exceptions. |
protected void |
writeInterface(boolean writeDatabinders)
Writes the interfaces. |
protected void |
writeInterfaceImplementation()
Writes the implementations. |
protected void |
writeMessageReceiver()
Writes the message receiver |
protected void |
writeServiceXml()
Write the service XML |
protected void |
writeSkeleton()
|
protected void |
writeSkeletonInterface()
Write the skeletonInterface |
protected void |
writeTestClasses()
Write the test classes |
protected void |
writeWSDLFiles()
Write out the WSDL files (and the schemas) writing the WSDL (and schemas) is somewhat special so we cannot follow the usual pattern of using the class writer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String CALL_BACK_HANDLER_SUFFIX
protected static final String STUB_SUFFIX
protected static final String TEST_SUFFIX
protected static final String SKELETON_CLASS_SUFFIX
protected static final String SKELETON_CLASS_SUFFIX_BACK
protected static final String SKELETON_INTERFACE_SUFFIX
protected static final String SKELETON_INTERFACE_SUFFIX_BACK
protected static final String MESSAGE_RECEIVER_SUFFIX
protected static final String FAULT_SUFFIX
protected static final String DATABINDING_SUPPORTER_NAME_SUFFIX
protected static Map mepToClassMap
protected static Map mepToSuffixMap
protected int uniqueFaultNameCounter
protected static HashMap constructorMap
protected static final org.apache.commons.logging.Log log
protected URIResolver resolver
protected Map infoHolder
protected CodeGenConfiguration codeGenConfiguration
protected TypeMapper mapper
protected AxisService axisService
protected Map fullyQualifiedFaultClassNameMap
protected Map faultClassNameMap
protected Map instantiatableMessageClassNames
protected static final String TEST_SRC_DIR_NAME
Constructor Detail |
---|
public AxisServiceBasedMultiLanguageEmitter()
Method Detail |
---|
public void setCodeGenConfiguration(CodeGenConfiguration configuration)
setCodeGenConfiguration
in interface Emitter
configuration
- Emitter.setCodeGenConfiguration(org.apache.axis2.wsdl.codegen.CodeGenConfiguration)
public void setMapper(TypeMapper mapper)
setMapper
in interface Emitter
mapper
- Emitter.setMapper(org.apache.axis2.wsdl.databinding.TypeMapper)
protected void updateMapperForStub()
protected String getFullyQualifiedStubName()
protected void resetFaultNames()
protected void generateAndPopulateFaultNames()
public void emitStub() throws CodeGenerationException
emitStub
in interface Emitter
CodeGenerationException
Emitter.emitStub()
protected void writeAntBuild() throws Exception
Exception
protected Document createDOMDocumentForAntBuild()
protected void writeTestClasses() throws Exception
Exception
protected Document createDOMDocumentForTestCase()
protected void writeInterfaceImplementation() throws Exception
Exception
protected Document createDOMDocumentForInterfaceImplementation() throws Exception
Exception
protected Element getUniqueListofFaults(Document doc)
doc
-
protected Element getUniqueListofFaultsofMep(Document doc, String mep)
doc
-
protected void addEndpoint(Document doc, Element rootElement) throws Exception
doc
- rootElement
-
Exception
protected void addSoapVersion(Document doc, Element rootElement)
doc
- rootElement
- protected void writeExceptions() throws Exception
Exception
protected Document createDOMDocumentForException()
protected void writeCallBackHandlers() throws Exception
Exception
protected Document createDOMDocumentForCallbackHandler()
protected void writeInterface(boolean writeDatabinders) throws Exception
Exception
protected Document createDOMDocumentForInterface(boolean writeDatabinders)
protected void updateMapperForMessageReceiver()
protected String getFullyQualifiedMessageReceiverName()
protected String getFullyQualifiedSkeletonName()
protected String getFullyQualifiedSkeletonInterfaceName()
public void emitSkeleton() throws CodeGenerationException
emitSkeleton
in interface Emitter
CodeGenerationException
protected void writeWSDLFiles()
protected void copyToFaultMap()
protected void updateFaultPackageForStub()
protected void writeMessageReceiver() throws Exception
Exception
protected Document createDocumentForMessageReceiver(String mep, boolean isServerSideInterface)
mep
- isServerSideInterface
-
protected Element createDOMElementforDatabinders(Document doc, boolean isServerside)
doc
- protected void addShortType(Element paramElement, String type)
paramElement
- protected Element getOpNames(Document doc)
doc
-
protected Element getBase64Elements(Document doc)
doc
-
protected void processModelObjects(Map objectMappings, Element root, Document doc)
objectMappings
- root
- doc
- protected void updateMapperClassnames(String fullyQulifiedIncludingClassNamePrefix)
protected void writeServiceXml() throws Exception
Exception
protected Document createDOMDocumentForServiceXML()
protected Element getServiceElement(String serviceName, String className, Document doc)
serviceName
- className
- doc
-
protected void writeSkeleton() throws Exception
Exception
protected void writeSkeletonInterface() throws Exception
Exception
protected Document createDOMDocumentForSkeleton(boolean isSkeletonInterface)
isSkeletonInterface
-
protected Document createDOMDocumentForSkeletonInterface()
protected boolean loadOperations(Document doc, Element rootElement, String mep)
doc
- rootElement
- mep
-
protected Document getEmptyDocument()
protected String makeJavaClassName(String word)
word
-
protected void addAttribute(Document document, String AttribName, String attribValue, Element element)
document
- AttribName
- attribValue
- element
- protected void fillSyncAttributes(Document doc, Element rootElement)
doc
- rootElement
- protected void debugLogDocument(String description, Document doc)
description
- doc
- protected File getOutputDirectory(File outputDir, String dir2)
outputDir
-
protected void writeClass(Document model, ClassWriter writer) throws IOException, Exception
model
- writer
-
IOException
Exception
protected void addSOAPAction(Document doc, Element rootElement, AxisOperation axisOperation)
doc
- rootElement
- axisOperation
- protected void addHeaderOperations(List soapHeaderParameterQNameList, AxisOperation axisOperation, boolean input)
soapHeaderParameterQNameList
- axisOperation
- input
- protected Element getInputElement(Document doc, AxisOperation operation, List headerParameterQNameList)
doc
- operation
- headerParameterQNameList
-
protected Element getFaultElement(Document doc, AxisOperation operation)
doc
- operation
- protected Element getOutputElement(Document doc, AxisOperation operation, List headerParameterQNameList)
doc
- operation
- headerParameterQNameList
- protected Element[] getFaultParamElements(Document doc, AxisOperation operation)
doc
- operation
-
protected Element[] getInputParamElement(Document doc, AxisOperation operation)
doc
- operation
-
protected Element generateParamComponent(Document doc, String paramName, String paramType, QName operationName, QName paramQName)
doc
- paramName
- paramType
-
protected Element generateParamComponent(Document doc, String paramName, String paramType, QName paramQName)
doc
- paramName
- paramType
-
protected Element generateParamComponent(Document doc, String paramName, String paramType, QName opName, QName paramQName, String partName, boolean isPrimitive, boolean isArray)
doc
- paramName
- paramType
- opName
- paramName
- protected Element getOutputParamElement(Document doc, AxisOperation operation)
doc
- operation
-
protected String getParamInitializer(String paramType)
paramType
- protected List getParameterElementList(Document doc, List parameters, String location)
doc
- parameters
- location
- protected Element addElement(Document document, String eltName, String eltValue, Element element)
document
- eltName
- eltValue
- element
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |