|
||||||||||
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 |
addFaultMessages(List operationFaultMessages,
Set faultMessagesToMep)
add the qNames of the operation fault message names to faultMessages Mep |
protected void |
addHeaderOperations(List soapHeaderParameterQNameList,
AxisBindingOperation bindingOperation,
boolean input)
populate the header parameters |
protected void |
addHeaderOperationsToFault(List soapHeaderParameterQNameList,
AxisOperation axisOperation)
populate the header parameters to faults |
protected void |
addShortType(Element paramElement,
String xmlName)
set the short type as it is in the data binding |
protected void |
addSOAPAction(Document doc,
Element rootElement,
QName qName)
Adds the soap action |
protected void |
addSoapVersion(Document doc,
Element rootElement)
Looks for the SOAPVersion and adds it. |
void |
copyMap(Map copyFormMap,
Map copyToMap)
|
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 |
generateMethodElement(Document doc,
String endpointName,
AxisBindingOperation bindingOperation)
Common code to generate a |
protected Element |
generateOptionParamComponent(Document doc,
String name,
String value)
A convenient method for the generating optionParam components |
protected Element |
generateParamComponent(Document doc,
String comment,
String paramName,
String paramType,
QName paramQName)
A convenient method for the generating the parameter element |
protected Element |
generateParamComponent(Document doc,
String comment,
String paramName,
String paramType,
QName operationName,
QName paramQName)
A convenient method for the generating the parameter element |
protected Element |
generateParamComponent(Document doc,
String comment,
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 org.apache.neethi.Policy |
getBindingPolicyFromMessage(AxisBindingOperation axisBindingOperation,
String key)
|
protected Object |
getBindingPropertyFromMessage(String name,
QName qName,
String key)
|
protected Object |
getBindingPropertyFromMessageFault(String name,
QName qName,
String key)
|
protected Object |
getBindingPropertyFromOperation(String name,
QName qName)
|
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,
AxisBindingOperation bindingOperation,
List headerParameterQNameList)
Get the input element |
protected Element[] |
getInputParamElement(Document doc,
AxisOperation operation)
|
Map |
getNewCopy(Map copyFormMap)
|
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,
AxisBindingOperation bindingOperation,
List headerParameterQNameList)
Finds the output element. |
protected Element |
getOutputParamElement(Document doc,
AxisOperation operation)
|
protected List |
getParameterElementList(Document doc,
List parameters,
String location)
|
protected List |
getParameterElementListForHttpHeader(Document doc,
List parameters,
String location)
|
protected List |
getParameterElementListForSOAPModules(Document doc,
List parameters)
|
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 |
writeExceptions()
Writes the exceptions. |
protected void |
writeFile(Document model,
FileWriter writer)
A resusable method for the implementation of interface and implementation writing. |
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 STUB_INTERFACE_SUFFIX_BACK
protected static final String MESSAGE_RECEIVER_SUFFIX
protected static final String DATABINDING_SUPPORTER_NAME_SUFFIX
protected static final Map mepToClassMap
protected static final Map mepToSuffixMap
protected AxisBinding axisBinding
protected AxisEndpoint axisEndpoint
protected int uniqueFaultNameCounter
protected static final HashMap constructorMap
protected static final org.apache.commons.logging.Log log
protected URIResolver resolver
protected Map infoHolder
protected Map allServiceInfoHolder
protected CodeGenConfiguration codeGenConfiguration
protected TypeMapper mapper
protected AxisService axisService
protected List axisServices
protected Map fullyQualifiedFaultClassNameMap
protected Map faultClassNameMap
protected Map faultElementQNameMap
protected Map instantiatableMessageClassNames
protected static final String TEST_SRC_DIR_NAME
protected boolean useHolderClass_jaxws
protected boolean wrapped_jaxws
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 Object getBindingPropertyFromOperation(String name, QName qName)
protected org.apache.neethi.Policy getBindingPolicyFromMessage(AxisBindingOperation axisBindingOperation, String key)
protected Object getBindingPropertyFromMessage(String name, QName qName, String key)
protected Object getBindingPropertyFromMessageFault(String name, QName qName, String key)
protected void updateMapperForStub()
protected String getFullyQualifiedStubName()
protected void resetFaultNames()
protected void generateAndPopulateFaultNames()
public void emitStub() throws CodeGenerationException
emitStub
in interface Emitter
CodeGenerationException
Emitter.emitStub()
public Map getNewCopy(Map copyFormMap)
public void copyMap(Map copyFormMap, Map copyToMap)
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 void addFaultMessages(List operationFaultMessages, Set faultMessagesToMep)
operationFaultMessages
- faultMessagesToMep
- 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 xmlName)
paramElement
- xmlName
- 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 Element generateMethodElement(Document doc, String endpointName, AxisBindingOperation bindingOperation) throws DOMException
doc
- endpointName
- bindingOperation
-
DOMException
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 writeFile(Document model, FileWriter writer) throws IOException, Exception
model
- writer
-
IOException
Exception
protected void addSOAPAction(Document doc, Element rootElement, QName qName)
doc
- rootElement
- qName
- protected void addHeaderOperations(List soapHeaderParameterQNameList, AxisBindingOperation bindingOperation, boolean input)
soapHeaderParameterQNameList
- bindingOperation
- input
- protected void addHeaderOperationsToFault(List soapHeaderParameterQNameList, AxisOperation axisOperation)
soapHeaderParameterQNameList
- axisOperation
- protected Element getInputElement(Document doc, AxisBindingOperation bindingOperation, List headerParameterQNameList)
doc
- bindingOperation
- headerParameterQNameList
-
protected Element getFaultElement(Document doc, AxisOperation operation)
doc
- operation
- protected Element getOutputElement(Document doc, AxisBindingOperation bindingOperation, List headerParameterQNameList)
doc
- bindingOperation
- 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 comment, String paramName, String paramType, QName operationName, QName paramQName)
doc
- paramName
- paramType
-
protected Element generateParamComponent(Document doc, String comment, String paramName, String paramType, QName paramQName)
doc
- paramName
- paramType
-
protected Element generateOptionParamComponent(Document doc, String name, String value)
doc
- name
- value
-
protected Element generateParamComponent(Document doc, String comment, 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 List getParameterElementListForHttpHeader(Document doc, List parameters, String location)
protected List getParameterElementListForSOAPModules(Document doc, List parameters)
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 |