|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
public class AxisServiceBasedMultiLanguageEmitter
Field Summary | |
---|---|
protected java.util.Map |
allServiceInfoHolder
|
protected AxisBinding |
axisBinding
|
protected AxisEndpoint |
axisEndpoint
|
protected AxisService |
axisService
|
protected java.util.List |
axisServices
|
protected static java.lang.String |
CALL_BACK_HANDLER_SUFFIX
|
protected CodeGenConfiguration |
codeGenConfiguration
|
protected static java.util.HashMap |
constructorMap
Field constructorMap |
protected static java.lang.String |
DATABINDING_SUPPORTER_NAME_SUFFIX
|
protected java.util.Map |
faultClassNameMap
|
protected java.util.Map |
faultElementQNameMap
|
protected java.util.Map |
fullyQualifiedFaultClassNameMap
|
protected java.util.Map |
infoHolder
|
protected java.util.Map |
instantiatableMessageClassNames
|
protected static org.apache.commons.logging.Log |
log
|
protected TypeMapper |
mapper
|
protected static java.util.Map |
mepToClassMap
|
protected static java.util.Map |
mepToSuffixMap
|
protected static java.lang.String |
MESSAGE_RECEIVER_SUFFIX
|
protected javax.xml.transform.URIResolver |
resolver
|
protected static java.lang.String |
SKELETON_CLASS_SUFFIX
|
protected static java.lang.String |
SKELETON_CLASS_SUFFIX_BACK
|
protected static java.lang.String |
SKELETON_INTERFACE_SUFFIX
|
protected static java.lang.String |
SKELETON_INTERFACE_SUFFIX_BACK
|
protected static java.lang.String |
STUB_INTERFACE_SUFFIX_BACK
|
protected static java.lang.String |
STUB_SUFFIX
|
protected static java.lang.String |
TEST_SRC_DIR_NAME
|
protected static java.lang.String |
TEST_SUFFIX
|
protected int |
uniqueFaultNameCounter
|
protected boolean |
useHolderClass_jaxws
|
protected boolean |
wrapped_jaxws
|
Constructor Summary | |
---|---|
AxisServiceBasedMultiLanguageEmitter()
default constructor - builds |
Method Summary | |
---|---|
protected void |
addAttribute(org.w3c.dom.Document document,
java.lang.String AttribName,
java.lang.String attribValue,
org.w3c.dom.Element element)
Utility method to add an attribute to a given element. |
protected org.w3c.dom.Element |
addElement(org.w3c.dom.Document document,
java.lang.String eltName,
java.lang.String eltValue,
org.w3c.dom.Element element)
Utility method to add an attribute to a given element. |
protected void |
addEndpoint(org.w3c.dom.Document doc,
org.w3c.dom.Element rootElement)
Adds the endpoint to the document. |
protected void |
addFaultMessages(java.util.List operationFaultMessages,
java.util.Set faultMessagesToMep)
add the qNames of the operation fault message names to faultMessages Mep |
protected void |
addHeaderOperations(java.util.List soapHeaderParameterQNameList,
AxisBindingOperation bindingOperation,
boolean input)
populate the header parameters |
protected void |
addHeaderOperationsToFault(java.util.List soapHeaderParameterQNameList,
AxisOperation axisOperation)
populate the header parameters to faults |
protected void |
addShortType(org.w3c.dom.Element paramElement,
java.lang.String xmlName)
set the short type as it is in the data binding |
protected void |
addSOAPAction(org.w3c.dom.Document doc,
org.w3c.dom.Element rootElement,
QName qName)
Adds the soap action |
protected void |
addSoapVersion(org.w3c.dom.Document doc,
org.w3c.dom.Element rootElement)
Looks for the SOAPVersion and adds it. |
void |
copyMap(java.util.Map copyFormMap,
java.util.Map copyToMap)
|
protected void |
copyToFaultMap()
Utility method to copy the faults to the correct map |
protected org.w3c.dom.Document |
createDocumentForMessageReceiver(java.lang.String mep,
boolean isServerSideInterface)
Creates the XML model for the message receiver |
protected org.w3c.dom.Document |
createDOMDocumentForAntBuild()
Creates the DOM tree for the Ant build. |
protected org.w3c.dom.Document |
createDOMDocumentForCallbackHandler()
Generates the model for the callbacks. |
protected org.w3c.dom.Document |
createDOMDocumentForException()
Generates the model for the callbacks. |
protected org.w3c.dom.Document |
createDOMDocumentForInterface(boolean writeDatabinders)
Creates the DOM tree for the interface creation. |
protected org.w3c.dom.Document |
createDOMDocumentForInterfaceImplementation()
Creates the DOM tree for implementations. |
protected org.w3c.dom.Document |
createDOMDocumentForServiceXML()
|
protected org.w3c.dom.Document |
createDOMDocumentForSkeleton(boolean isSkeletonInterface)
Creates the XMLModel for the skeleton |
protected org.w3c.dom.Document |
createDOMDocumentForSkeletonInterface()
Creates the XML model for the skeleton interface |
protected org.w3c.dom.Document |
createDOMDocumentForTestCase()
Creates the XML Model for the test case |
protected org.w3c.dom.Element |
createDOMElementforDatabinders(org.w3c.dom.Document doc,
boolean isServerside)
create a dom element for databinders. |
protected void |
debugLogDocument(java.lang.String description,
org.w3c.dom.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(org.w3c.dom.Document doc,
org.w3c.dom.Element rootElement)
|
protected void |
generateAndPopulateFaultNames()
Populate a map of fault class names |
protected org.w3c.dom.Element |
generateMethodElement(org.w3c.dom.Document doc,
java.lang.String endpointName,
AxisBindingOperation bindingOperation)
Common code to generate a |
protected org.w3c.dom.Element |
generateOptionParamComponent(org.w3c.dom.Document doc,
java.lang.String name,
java.lang.String value)
A convenient method for the generating optionParam components |
protected org.w3c.dom.Element |
generateParamComponent(org.w3c.dom.Document doc,
java.lang.String paramName,
java.lang.String paramType,
QName paramQName)
A convenient method for the generating the parameter element |
protected org.w3c.dom.Element |
generateParamComponent(org.w3c.dom.Document doc,
java.lang.String paramName,
java.lang.String paramType,
QName operationName,
QName paramQName)
A convenient method for the generating the parameter element |
protected org.w3c.dom.Element |
generateParamComponent(org.w3c.dom.Document doc,
java.lang.String paramName,
java.lang.String paramType,
QName opName,
QName paramQName,
java.lang.String partName,
boolean isPrimitive,
boolean isArray)
A convenient method for the generating the parameter element |
protected org.w3c.dom.Element |
getBase64Elements(org.w3c.dom.Document doc)
Gets the base64 types. |
protected org.apache.neethi.Policy |
getBindingPolicyFromMessage(AxisBindingOperation axisBindingOperation,
java.lang.String key)
|
protected java.lang.Object |
getBindingPropertyFromMessage(java.lang.String name,
QName qName,
java.lang.String key)
|
protected java.lang.Object |
getBindingPropertyFromMessageFault(java.lang.String name,
QName qName,
java.lang.String key)
|
protected java.lang.Object |
getBindingPropertyFromOperation(java.lang.String name,
QName qName)
|
protected org.w3c.dom.Document |
getEmptyDocument()
|
protected org.w3c.dom.Element |
getFaultElement(org.w3c.dom.Document doc,
AxisOperation operation)
Get the fault element - No header faults are supported |
protected org.w3c.dom.Element[] |
getFaultParamElements(org.w3c.dom.Document doc,
AxisOperation operation)
|
protected java.lang.String |
getFullyQualifiedMessageReceiverName()
|
protected java.lang.String |
getFullyQualifiedSkeletonInterfaceName()
|
protected java.lang.String |
getFullyQualifiedSkeletonName()
|
protected java.lang.String |
getFullyQualifiedStubName()
Returns the fully qualified Stub name reused in many methods |
protected org.w3c.dom.Element |
getInputElement(org.w3c.dom.Document doc,
AxisBindingOperation bindingOperation,
java.util.List headerParameterQNameList)
Get the input element |
protected org.w3c.dom.Element[] |
getInputParamElement(org.w3c.dom.Document doc,
AxisOperation operation)
|
java.util.Map |
getNewCopy(java.util.Map copyFormMap)
|
protected org.w3c.dom.Element |
getOpNames(org.w3c.dom.Document doc)
Gets an element representing the operation names |
protected java.io.File |
getOutputDirectory(java.io.File outputDir,
java.lang.String dir2)
Gets the output directory for source files. |
protected org.w3c.dom.Element |
getOutputElement(org.w3c.dom.Document doc,
AxisBindingOperation bindingOperation,
java.util.List headerParameterQNameList)
Finds the output element. |
protected org.w3c.dom.Element |
getOutputParamElement(org.w3c.dom.Document doc,
AxisOperation operation)
|
protected java.util.List |
getParameterElementList(org.w3c.dom.Document doc,
java.util.List parameters,
java.lang.String location)
|
protected java.util.List |
getParameterElementListForHttpHeader(org.w3c.dom.Document doc,
java.util.List parameters,
java.lang.String location)
|
protected java.util.List |
getParameterElementListForSOAPModules(org.w3c.dom.Document doc,
java.util.List parameters)
|
protected java.lang.String |
getParamInitializer(java.lang.String paramType)
|
protected org.w3c.dom.Element |
getServiceElement(java.lang.String serviceName,
java.lang.String className,
org.w3c.dom.Document doc)
A resusable method to return the service element for creating the service xml |
protected org.w3c.dom.Element |
getUniqueListofFaults(org.w3c.dom.Document doc)
A util method that returns a unique list of faults |
protected org.w3c.dom.Element |
getUniqueListofFaultsofMep(org.w3c.dom.Document doc,
java.lang.String mep)
A util method that returns a unique list of faults for a given mep |
protected boolean |
loadOperations(org.w3c.dom.Document doc,
org.w3c.dom.Element rootElement,
java.lang.String mep)
Loads the operations |
protected java.lang.String |
makeJavaClassName(java.lang.String word)
|
protected void |
processModelObjects(java.util.Map objectMappings,
org.w3c.dom.Element root,
org.w3c.dom.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(java.lang.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(org.w3c.dom.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 java.lang.String CALL_BACK_HANDLER_SUFFIX
protected static final java.lang.String STUB_SUFFIX
protected static final java.lang.String TEST_SUFFIX
protected static final java.lang.String SKELETON_CLASS_SUFFIX
protected static final java.lang.String SKELETON_CLASS_SUFFIX_BACK
protected static final java.lang.String SKELETON_INTERFACE_SUFFIX
protected static final java.lang.String SKELETON_INTERFACE_SUFFIX_BACK
protected static final java.lang.String STUB_INTERFACE_SUFFIX_BACK
protected static final java.lang.String MESSAGE_RECEIVER_SUFFIX
protected static final java.lang.String DATABINDING_SUPPORTER_NAME_SUFFIX
protected static java.util.Map mepToClassMap
protected static java.util.Map mepToSuffixMap
protected AxisBinding axisBinding
protected AxisEndpoint axisEndpoint
protected int uniqueFaultNameCounter
protected static java.util.HashMap constructorMap
protected static final org.apache.commons.logging.Log log
protected javax.xml.transform.URIResolver resolver
protected java.util.Map infoHolder
protected java.util.Map allServiceInfoHolder
protected CodeGenConfiguration codeGenConfiguration
protected TypeMapper mapper
protected AxisService axisService
protected java.util.List axisServices
protected java.util.Map fullyQualifiedFaultClassNameMap
protected java.util.Map faultClassNameMap
protected java.util.Map faultElementQNameMap
protected java.util.Map instantiatableMessageClassNames
protected static final java.lang.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 java.lang.Object getBindingPropertyFromOperation(java.lang.String name, QName qName)
protected org.apache.neethi.Policy getBindingPolicyFromMessage(AxisBindingOperation axisBindingOperation, java.lang.String key)
protected java.lang.Object getBindingPropertyFromMessage(java.lang.String name, QName qName, java.lang.String key)
protected java.lang.Object getBindingPropertyFromMessageFault(java.lang.String name, QName qName, java.lang.String key)
protected void updateMapperForStub()
protected java.lang.String getFullyQualifiedStubName()
protected void resetFaultNames()
protected void generateAndPopulateFaultNames()
public void emitStub() throws CodeGenerationException
emitStub
in interface Emitter
CodeGenerationException
Emitter.emitStub()
public java.util.Map getNewCopy(java.util.Map copyFormMap)
public void copyMap(java.util.Map copyFormMap, java.util.Map copyToMap)
protected void writeAntBuild() throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document createDOMDocumentForAntBuild()
protected void writeTestClasses() throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document createDOMDocumentForTestCase()
protected void writeInterfaceImplementation() throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document createDOMDocumentForInterfaceImplementation() throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Element getUniqueListofFaults(org.w3c.dom.Document doc)
doc
-
protected void addFaultMessages(java.util.List operationFaultMessages, java.util.Set faultMessagesToMep)
operationFaultMessages
- faultMessagesToMep
- protected org.w3c.dom.Element getUniqueListofFaultsofMep(org.w3c.dom.Document doc, java.lang.String mep)
doc
-
protected void addEndpoint(org.w3c.dom.Document doc, org.w3c.dom.Element rootElement) throws java.lang.Exception
doc
- rootElement
-
java.lang.Exception
protected void addSoapVersion(org.w3c.dom.Document doc, org.w3c.dom.Element rootElement)
doc
- rootElement
- protected void writeExceptions() throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document createDOMDocumentForException()
protected void writeCallBackHandlers() throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document createDOMDocumentForCallbackHandler()
protected void writeInterface(boolean writeDatabinders) throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document createDOMDocumentForInterface(boolean writeDatabinders)
protected void updateMapperForMessageReceiver()
protected java.lang.String getFullyQualifiedMessageReceiverName()
protected java.lang.String getFullyQualifiedSkeletonName()
protected java.lang.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 java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document createDocumentForMessageReceiver(java.lang.String mep, boolean isServerSideInterface)
mep
- isServerSideInterface
-
protected org.w3c.dom.Element createDOMElementforDatabinders(org.w3c.dom.Document doc, boolean isServerside)
doc
- protected void addShortType(org.w3c.dom.Element paramElement, java.lang.String xmlName)
paramElement
- xmlName
- protected org.w3c.dom.Element getOpNames(org.w3c.dom.Document doc)
doc
-
protected org.w3c.dom.Element getBase64Elements(org.w3c.dom.Document doc)
doc
-
protected void processModelObjects(java.util.Map objectMappings, org.w3c.dom.Element root, org.w3c.dom.Document doc)
objectMappings
- root
- doc
- protected void updateMapperClassnames(java.lang.String fullyQulifiedIncludingClassNamePrefix)
protected void writeServiceXml() throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document createDOMDocumentForServiceXML()
protected org.w3c.dom.Element getServiceElement(java.lang.String serviceName, java.lang.String className, org.w3c.dom.Document doc)
serviceName
- className
- doc
-
protected void writeSkeleton() throws java.lang.Exception
java.lang.Exception
protected void writeSkeletonInterface() throws java.lang.Exception
java.lang.Exception
protected org.w3c.dom.Document createDOMDocumentForSkeleton(boolean isSkeletonInterface)
isSkeletonInterface
-
protected org.w3c.dom.Document createDOMDocumentForSkeletonInterface()
protected boolean loadOperations(org.w3c.dom.Document doc, org.w3c.dom.Element rootElement, java.lang.String mep)
doc
- rootElement
- mep
-
protected org.w3c.dom.Element generateMethodElement(org.w3c.dom.Document doc, java.lang.String endpointName, AxisBindingOperation bindingOperation) throws org.w3c.dom.DOMException
doc
- endpointName
- bindingOperation
-
org.w3c.dom.DOMException
protected org.w3c.dom.Document getEmptyDocument()
protected java.lang.String makeJavaClassName(java.lang.String word)
word
-
protected void addAttribute(org.w3c.dom.Document document, java.lang.String AttribName, java.lang.String attribValue, org.w3c.dom.Element element)
document
- AttribName
- attribValue
- element
- protected void fillSyncAttributes(org.w3c.dom.Document doc, org.w3c.dom.Element rootElement)
doc
- rootElement
- protected void debugLogDocument(java.lang.String description, org.w3c.dom.Document doc)
description
- doc
- protected java.io.File getOutputDirectory(java.io.File outputDir, java.lang.String dir2)
outputDir
-
protected void writeFile(org.w3c.dom.Document model, FileWriter writer) throws java.io.IOException, java.lang.Exception
model
- writer
-
java.io.IOException
java.lang.Exception
protected void addSOAPAction(org.w3c.dom.Document doc, org.w3c.dom.Element rootElement, QName qName)
doc
- rootElement
- qName
- protected void addHeaderOperations(java.util.List soapHeaderParameterQNameList, AxisBindingOperation bindingOperation, boolean input)
soapHeaderParameterQNameList
- bindingOperation
- input
- protected void addHeaderOperationsToFault(java.util.List soapHeaderParameterQNameList, AxisOperation axisOperation)
soapHeaderParameterQNameList
- axisOperation
- protected org.w3c.dom.Element getInputElement(org.w3c.dom.Document doc, AxisBindingOperation bindingOperation, java.util.List headerParameterQNameList)
doc
- bindingOperation
- headerParameterQNameList
-
protected org.w3c.dom.Element getFaultElement(org.w3c.dom.Document doc, AxisOperation operation)
doc
- operation
- protected org.w3c.dom.Element getOutputElement(org.w3c.dom.Document doc, AxisBindingOperation bindingOperation, java.util.List headerParameterQNameList)
doc
- bindingOperation
- headerParameterQNameList
- protected org.w3c.dom.Element[] getFaultParamElements(org.w3c.dom.Document doc, AxisOperation operation)
doc
- operation
-
protected org.w3c.dom.Element[] getInputParamElement(org.w3c.dom.Document doc, AxisOperation operation)
doc
- operation
-
protected org.w3c.dom.Element generateParamComponent(org.w3c.dom.Document doc, java.lang.String paramName, java.lang.String paramType, QName operationName, QName paramQName)
doc
- paramName
- paramType
-
protected org.w3c.dom.Element generateParamComponent(org.w3c.dom.Document doc, java.lang.String paramName, java.lang.String paramType, QName paramQName)
doc
- paramName
- paramType
-
protected org.w3c.dom.Element generateOptionParamComponent(org.w3c.dom.Document doc, java.lang.String name, java.lang.String value)
doc
- name
- value
-
protected org.w3c.dom.Element generateParamComponent(org.w3c.dom.Document doc, java.lang.String paramName, java.lang.String paramType, QName opName, QName paramQName, java.lang.String partName, boolean isPrimitive, boolean isArray)
doc
- paramName
- paramType
- opName
- paramName
- protected org.w3c.dom.Element getOutputParamElement(org.w3c.dom.Document doc, AxisOperation operation)
doc
- operation
-
protected java.lang.String getParamInitializer(java.lang.String paramType)
paramType
- protected java.util.List getParameterElementList(org.w3c.dom.Document doc, java.util.List parameters, java.lang.String location)
doc
- parameters
- location
- protected java.util.List getParameterElementListForHttpHeader(org.w3c.dom.Document doc, java.util.List parameters, java.lang.String location)
protected java.util.List getParameterElementListForSOAPModules(org.w3c.dom.Document doc, java.util.List parameters)
protected org.w3c.dom.Element addElement(org.w3c.dom.Document document, java.lang.String eltName, java.lang.String eltValue, org.w3c.dom.Element element)
document
- eltName
- eltValue
- element
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |