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

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

public abstract class MultiLanguageClientEmitter
extends java.lang.Object
implements Emitter


Field Summary
protected  CodeGenConfiguration configuration
           
protected  TypeMapper mapper
           
protected  java.io.InputStream xsltStream
           
 
Constructor Summary
MultiLanguageClientEmitter()
           
 
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  void addEndpoints(org.w3c.dom.Document doc, org.w3c.dom.Element rootElement, java.util.HashMap endpointMap)
          Add the endpoint to the document
protected  void addSoapVersion(org.apache.wsdl.WSDLBinding binding, org.w3c.dom.Document doc, org.w3c.dom.Element rootElement)
           
protected  org.w3c.dom.Document createDocumentForMessageReceiver(org.apache.wsdl.WSDLBinding binding)
           
protected  org.w3c.dom.Document createDOMDocumentForCallbackHandler(org.apache.wsdl.WSDLInterface boundInterface, org.apache.wsdl.WSDLBinding axisBinding)
          Generating the model for the callbacks
protected  org.w3c.dom.Document createDOMDocumentForInterface(org.apache.wsdl.WSDLInterface wsdlInterface, org.apache.wsdl.WSDLBinding axisBinding)
          Creates the DOM tree for the interface creation.
protected  org.w3c.dom.Document createDOMDocumentForInterfaceImplementation(org.apache.wsdl.WSDLBinding binding, org.apache.wsdl.WSDLService service)
          Creates the DOM tree for implementations
protected  org.w3c.dom.Document createDOMDocumentforSerialization(org.apache.wsdl.WSDLOperation operation, java.lang.String portTypeName, org.apache.wsdl.WSDLBindingOperation bindingOperation)
           
protected  org.w3c.dom.Document createDOMDocumentForServiceXML(org.apache.wsdl.WSDLInterface boundInterface, boolean forTesting, org.apache.wsdl.WSDLBinding axisBinding)
           
protected  org.w3c.dom.Document createDOMDocumentForSkeleton(org.apache.wsdl.WSDLInterface boundInterface, org.apache.wsdl.WSDLBinding axisBinding)
          Create the model for the skeleton
protected  org.w3c.dom.Document createDOMDocumentForTestCase(org.apache.wsdl.WSDLBinding binding)
           
 void emitSkeleton()
           
 void emitStub()
           
protected  org.w3c.dom.Element getInputElement(org.w3c.dom.Document doc, org.apache.wsdl.WSDLOperation operation, java.util.List headerParameterQNameList)
          Finds the input element for the xml document
protected  org.w3c.dom.Element getOutputElement(org.w3c.dom.Document doc, org.apache.wsdl.WSDLOperation operation, java.util.List headerParameterQNameList)
          Finds the output element for the output element
protected  java.lang.String reformatName(java.lang.String word)
           
protected  java.lang.String reformatName(java.lang.String word, boolean decapitalizaFirst)
           
 void setCodeGenConfiguration(CodeGenConfiguration configuration)
          Sets the code generator configuration
 void setMapper(TypeMapper mapper)
          Sets the mapper
protected  void writeCallBackHandlers(org.apache.wsdl.WSDLInterface wsdlInterface, org.apache.wsdl.WSDLBinding axisBinding)
          Write the callback handlers
protected  void writeClass(org.w3c.dom.Document model, ClassWriter writer)
          A resusable method for the implementation of interface and implementation writing
protected  void writeDatabindingSupporters(org.apache.wsdl.WSDLBinding axisBinding)
          Writes the skeleton
protected  void writeInterface(org.apache.wsdl.WSDLInterface axisInterface, org.apache.wsdl.WSDLBinding axisBinding)
          Writes the interfaces
protected  void writeInterfaceImplementation(org.apache.wsdl.WSDLBinding axisBinding, org.apache.wsdl.WSDLService service)
          Writes the implementations
protected  void writeMessageReceiver(org.apache.wsdl.WSDLBinding axisBinding)
           
protected  void writeServiceXml(org.apache.wsdl.WSDLInterface axisInterface, org.apache.wsdl.WSDLBinding axisBinding)
          Writes the skeleton
protected  void writeSkeleton(org.apache.wsdl.WSDLInterface axisInteface, org.apache.wsdl.WSDLBinding axisBinding)
          Writes the skeleton
protected  void writeTestClasses(org.apache.wsdl.WSDLBinding binding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xsltStream

protected java.io.InputStream xsltStream

configuration

protected CodeGenConfiguration configuration

mapper

protected TypeMapper mapper
Constructor Detail

MultiLanguageClientEmitter

public MultiLanguageClientEmitter()
Method Detail

setMapper

public void setMapper(TypeMapper mapper)
Sets the mapper

Specified by:
setMapper in interface Emitter
Parameters:
mapper -
See Also:
TypeMapper

setCodeGenConfiguration

public void setCodeGenConfiguration(CodeGenConfiguration configuration)
Sets the code generator configuration

Specified by:
setCodeGenConfiguration in interface Emitter
Parameters:
configuration -

emitSkeleton

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

emitStub

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

writeCallBackHandlers

protected void writeCallBackHandlers(org.apache.wsdl.WSDLInterface wsdlInterface,
                                     org.apache.wsdl.WSDLBinding axisBinding)
                              throws java.lang.Exception
Write the callback handlers

Throws:
java.lang.Exception

writeTestClasses

protected void writeTestClasses(org.apache.wsdl.WSDLBinding binding)
                         throws java.lang.Exception
Throws:
java.lang.Exception

writeInterface

protected void writeInterface(org.apache.wsdl.WSDLInterface axisInterface,
                              org.apache.wsdl.WSDLBinding axisBinding)
                       throws java.lang.Exception
Writes the interfaces

Parameters:
axisInterface -
axisBinding -
Throws:
java.lang.Exception

writeSkeleton

protected void writeSkeleton(org.apache.wsdl.WSDLInterface axisInteface,
                             org.apache.wsdl.WSDLBinding axisBinding)
                      throws java.lang.Exception
Writes the skeleton

Parameters:
axisInteface -
axisBinding -
Throws:
java.lang.Exception

writeDatabindingSupporters

protected void writeDatabindingSupporters(org.apache.wsdl.WSDLBinding axisBinding)
                                   throws java.lang.Exception
Writes the skeleton

Parameters:
axisBinding -
Throws:
java.lang.Exception

writeServiceXml

protected void writeServiceXml(org.apache.wsdl.WSDLInterface axisInterface,
                               org.apache.wsdl.WSDLBinding axisBinding)
                        throws java.lang.Exception
Writes the skeleton

Parameters:
axisInterface -
axisBinding -
Throws:
java.lang.Exception

writeInterfaceImplementation

protected void writeInterfaceImplementation(org.apache.wsdl.WSDLBinding axisBinding,
                                            org.apache.wsdl.WSDLService service)
                                     throws java.lang.Exception
Writes the implementations

Parameters:
axisBinding -
Throws:
java.lang.Exception

writeMessageReceiver

protected void writeMessageReceiver(org.apache.wsdl.WSDLBinding axisBinding)
                             throws java.lang.Exception
Throws:
java.lang.Exception

writeClass

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

Parameters:
model -
writer -
Throws:
java.io.IOException
java.lang.Exception

createDOMDocumentForCallbackHandler

protected org.w3c.dom.Document createDOMDocumentForCallbackHandler(org.apache.wsdl.WSDLInterface boundInterface,
                                                                   org.apache.wsdl.WSDLBinding axisBinding)
Generating the model for the callbacks

Parameters:
boundInterface -
axisBinding -

getInputElement

protected org.w3c.dom.Element getInputElement(org.w3c.dom.Document doc,
                                              org.apache.wsdl.WSDLOperation operation,
                                              java.util.List headerParameterQNameList)
Finds the input element for the xml document

Parameters:
doc -
operation -
headerParameterQNameList -

getOutputElement

protected org.w3c.dom.Element getOutputElement(org.w3c.dom.Document doc,
                                               org.apache.wsdl.WSDLOperation operation,
                                               java.util.List headerParameterQNameList)
Finds the output element for the output element

Parameters:
doc -
operation -
headerParameterQNameList -

createDOMDocumentForServiceXML

protected org.w3c.dom.Document createDOMDocumentForServiceXML(org.apache.wsdl.WSDLInterface boundInterface,
                                                              boolean forTesting,
                                                              org.apache.wsdl.WSDLBinding axisBinding)

createDocumentForMessageReceiver

protected org.w3c.dom.Document createDocumentForMessageReceiver(org.apache.wsdl.WSDLBinding binding)

createDOMDocumentForInterface

protected org.w3c.dom.Document createDOMDocumentForInterface(org.apache.wsdl.WSDLInterface wsdlInterface,
                                                             org.apache.wsdl.WSDLBinding axisBinding)
Creates the DOM tree for the interface creation. Uses the interface

Parameters:
wsdlInterface -
axisBinding -

createDOMDocumentForSkeleton

protected org.w3c.dom.Document createDOMDocumentForSkeleton(org.apache.wsdl.WSDLInterface boundInterface,
                                                            org.apache.wsdl.WSDLBinding axisBinding)
Create the model for the skeleton

Parameters:
boundInterface -
axisBinding -
Returns:
documentModel for the skeleton

createDOMDocumentForTestCase

protected org.w3c.dom.Document createDOMDocumentForTestCase(org.apache.wsdl.WSDLBinding binding)

createDOMDocumentforSerialization

protected org.w3c.dom.Document createDOMDocumentforSerialization(org.apache.wsdl.WSDLOperation operation,
                                                                 java.lang.String portTypeName,
                                                                 org.apache.wsdl.WSDLBindingOperation bindingOperation)

createDOMDocumentForInterfaceImplementation

protected org.w3c.dom.Document createDOMDocumentForInterfaceImplementation(org.apache.wsdl.WSDLBinding binding,
                                                                           org.apache.wsdl.WSDLService service)
Creates the DOM tree for implementations

Parameters:
binding -
service -

addSoapVersion

protected void addSoapVersion(org.apache.wsdl.WSDLBinding binding,
                              org.w3c.dom.Document doc,
                              org.w3c.dom.Element rootElement)

addEndpoints

protected void addEndpoints(org.w3c.dom.Document doc,
                            org.w3c.dom.Element rootElement,
                            java.util.HashMap endpointMap)
Add the endpoint to the document

Parameters:
doc -
rootElement -
endpointMap -

addAttribute

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

Parameters:
document -
AttribName -
attribValue -
element -

reformatName

protected java.lang.String reformatName(java.lang.String word)
Parameters:
word -
Returns:
character removed string

reformatName

protected java.lang.String reformatName(java.lang.String word,
                                        boolean decapitalizaFirst)
Parameters:
word -
Returns:
character removed string