org.apache.axis2.wsdl.codegen.emitter
Class AxisServiceBasedMultiLanguageEmitter

java.lang.Object
  extended byorg.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter
All Implemented Interfaces:
Emitter
Direct Known Subclasses:
CSharpEmitter, JavaEmitter

public class AxisServiceBasedMultiLanguageEmitter
extends Object
implements Emitter

MultiLanguageClientEmitter we have now is based on WOM. This one will directly infer the information from the AxisService.


Field Summary
protected  TypeMapper mapper
           
protected  URIResolver resolver
           
 
Constructor Summary
AxisServiceBasedMultiLanguageEmitter()
           
 
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 addSoapVersion(Document doc, Element rootElement)
          Looks for the SOAPVersion and adds it.
protected  Document createDocumentForMessageReceiver(String mep, boolean isServerSideInterface)
           
protected  Document createDOMDocumentForAntBuild()
          Creates the DOM tree for the Ant build.
protected  Document createDOMDocumentForCallbackHandler()
          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 createDOMDocumentForTestCase()
           
protected  Element createDOMElementforDatabinders(Document doc)
          create a dom doc for databinders
 void emitSkeleton()
          Emit the skeltons
 void emitStub()
           
protected  Element getFaultElement(Document doc, AxisOperation operation)
          Get the fault element - No header faults are supported
protected  Element getInputElement(Document doc, AxisOperation operation, List headerParameterQNameList)
           
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  String makeJavaClassName(String word)
           
 void setCodeGenConfiguration(CodeGenConfiguration configuration)
           
 void setMapper(TypeMapper mapper)
           
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 writeInterface(boolean writeDatabinders)
          Writes the interfaces.
protected  void writeInterfaceImplementation()
          Writes the implementations.
protected  void writeMessageReceiver()
           
protected  void writeTestClasses()
          Write the test classes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resolver

protected URIResolver resolver

mapper

protected TypeMapper mapper
Constructor Detail

AxisServiceBasedMultiLanguageEmitter

public AxisServiceBasedMultiLanguageEmitter()
Method Detail

setCodeGenConfiguration

public void setCodeGenConfiguration(CodeGenConfiguration configuration)
Specified by:
setCodeGenConfiguration in interface Emitter

setMapper

public void setMapper(TypeMapper mapper)
Specified by:
setMapper in interface Emitter

emitStub

public void emitStub()
              throws CodeGenerationException
Specified by:
emitStub in interface Emitter
Throws:
CodeGenerationException
See Also:
Emitter.emitStub()

writeAntBuild

protected void writeAntBuild()
                      throws Exception
Writes the Ant build.

Throws:
Exception

createDOMDocumentForAntBuild

protected Document createDOMDocumentForAntBuild()
Creates the DOM tree for the Ant build. Uses the interface.


writeTestClasses

protected void writeTestClasses()
                         throws Exception
Write the test classes

Throws:
Exception

createDOMDocumentForTestCase

protected Document createDOMDocumentForTestCase()

writeInterfaceImplementation

protected void writeInterfaceImplementation()
                                     throws Exception
Writes the implementations.

Throws:
Exception

createDOMDocumentForInterfaceImplementation

protected Document createDOMDocumentForInterfaceImplementation()
                                                        throws Exception
Creates the DOM tree for implementations.

Throws:
Exception

addEndpoint

protected void addEndpoint(Document doc,
                           Element rootElement)
                    throws Exception
Adds the endpoint to the document.

Parameters:
doc -
rootElement -
Throws:
Exception

addSoapVersion

protected void addSoapVersion(Document doc,
                              Element rootElement)
Looks for the SOAPVersion and adds it.

Parameters:
doc -
rootElement -

writeCallBackHandlers

protected void writeCallBackHandlers()
                              throws Exception
Writes the callback handlers.

Throws:
Exception

createDOMDocumentForCallbackHandler

protected Document createDOMDocumentForCallbackHandler()
Generates the model for the callbacks.


writeInterface

protected void writeInterface(boolean writeDatabinders)
                       throws Exception
Writes the interfaces.

Throws:
Exception

createDOMDocumentForInterface

protected Document createDOMDocumentForInterface(boolean writeDatabinders)
Creates the DOM tree for the interface creation. Uses the interface.


emitSkeleton

public void emitSkeleton()
                  throws CodeGenerationException
Emit the skeltons

Specified by:
emitSkeleton in interface Emitter
Throws:
CodeGenerationException

writeMessageReceiver

protected void writeMessageReceiver()
                             throws Exception
Throws:
Exception

createDocumentForMessageReceiver

protected Document createDocumentForMessageReceiver(String mep,
                                                    boolean isServerSideInterface)

createDOMElementforDatabinders

protected Element createDOMElementforDatabinders(Document doc)
create a dom doc for databinders

Parameters:
doc -

makeJavaClassName

protected String makeJavaClassName(String word)
Parameters:
word -
Returns:
Returns character removed string.

addAttribute

protected void addAttribute(Document document,
                            String AttribName,
                            String attribValue,
                            Element element)
Utility method to add an attribute to a given element.

Parameters:
document -
AttribName -
attribValue -
element -

getOutputDirectory

protected File getOutputDirectory(File outputDir,
                                  String dir2)
Gets the output directory for source files.

Parameters:
outputDir -
Returns:
Returns File.

writeClass

protected void writeClass(Document model,
                          ClassWriter writer)
                   throws IOException,
                          Exception
A resusable method for the implementation of interface and implementation writing.

Parameters:
model -
writer -
Throws:
IOException
Exception

getInputElement

protected Element getInputElement(Document doc,
                                  AxisOperation operation,
                                  List headerParameterQNameList)

getFaultElement

protected Element getFaultElement(Document doc,
                                  AxisOperation operation)
Get the fault element - No header faults are supported

Parameters:
doc -
operation -

getOutputElement

protected Element getOutputElement(Document doc,
                                   AxisOperation operation,
                                   List headerParameterQNameList)
Finds the output element.

Parameters:
doc -
operation -
headerParameterQNameList -

addElement

protected Element addElement(Document document,
                             String eltName,
                             String eltValue,
                             Element element)
Utility method to add an attribute to a given element.

Parameters:
document -
eltName -
eltValue -
element -