org.objectweb.jonas_ws.wsgen.generator.ews.wsdltoj2ee.writer
Class JOnASDeployWriter

java.lang.Object
  extended by org.apache.axis.wsdl.toJava.JavaWriter
      extended by org.objectweb.jonas_ws.wsgen.generator.ews.wsdltoj2ee.writer.JOnASDeployWriter
All Implemented Interfaces:
org.apache.axis.wsdl.gen.Generator
Direct Known Subclasses:
J2EEClientDeployWriter, J2EEServerDeployWriter

public abstract class JOnASDeployWriter
extends org.apache.axis.wsdl.toJava.JavaWriter

JOnAS Base DeployWriter. It's a placeholder for commonly used methods and fields.

Author:
Guillaume Sauthier Based on J2eeDeployWriter from Ias (http://cvs.apache.org/viewcvs.cgi/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ws/J2eeDeployWriter.java?rev=1.13&view=markup)

Field Summary
protected  org.apache.axis.constants.Use use
          Field use
protected static java.lang.String WSDD_SUFFIX
          WSDD Extension suffix
 
Fields inherited from class org.apache.axis.wsdl.toJava.JavaWriter
emitter, LINE_LENGTH, type
 
Constructor Summary
JOnASDeployWriter(org.apache.axis.wsdl.toJava.Emitter emitter, javax.wsdl.Definition definition, org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
          Constructor.
 
Method Summary
static int getCount()
           
 javax.wsdl.Definition getDefinition()
           
protected  java.lang.String getFileName()
           
 JOnASJ2EEWebServicesContext getJonasWSContext()
           
 java.lang.String getModeString(byte mode)
          Method getModeString
protected abstract  java.lang.String getPrefix()
           
protected  java.io.PrintWriter getPrintWriter(java.lang.String filename)
          Method getPrintWriter
 org.apache.axis.wsdl.symbolTable.SymbolTable getSymbolTable()
           
protected  void writeArrayTypeMapping(java.io.PrintWriter pw, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String javaType, java.lang.String encodingStyle, javax.xml.namespace.QName innerType)
          Raw routine that writes out the arrayMapping.
protected abstract  void writeDeployServices(java.io.PrintWriter pw)
          Writes te list of wsdd:service
protected  void writeDeployTypes(java.io.PrintWriter pw, javax.wsdl.Binding binding, boolean hasLiteral, boolean hasMIME, org.apache.axis.constants.Use use)
          Write out bean mappings for each type
protected  void writeFileBody(java.io.PrintWriter pw)
          Write the body of the deploy.wsdd file.
protected  void writeFileHeader(java.io.PrintWriter pw)
          Replace the default file header with the deployment doc file header.
protected  void writeOperation(java.io.PrintWriter pw, java.lang.String javaOperName, javax.xml.namespace.QName elementQName, javax.xml.namespace.QName returnQName, javax.xml.namespace.QName returnType, org.apache.axis.wsdl.symbolTable.Parameters params, java.util.ArrayList faults, java.lang.String soapAction)
          Raw routine that writes out the operation and parameters.
protected  void writeTypeMapping(java.io.PrintWriter pw, java.lang.String namespaceURI, java.lang.String localPart, java.lang.String javaType, java.lang.String serializerFactory, java.lang.String deserializerFactory, java.lang.String encodingStyle)
          Raw routine that writes out the typeMapping.
 
Methods inherited from class org.apache.axis.wsdl.toJava.JavaWriter
closePrintWriter, generate, getJavadocDescriptionPart, isFileGenerated, registerFile, verboseMessage, writeComment, writeComment, writeFileFooter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WSDD_SUFFIX

protected static final java.lang.String WSDD_SUFFIX
WSDD Extension suffix

See Also:
Constant Field Values

use

protected org.apache.axis.constants.Use use
Field use

Constructor Detail

JOnASDeployWriter

public JOnASDeployWriter(org.apache.axis.wsdl.toJava.Emitter emitter,
                         javax.wsdl.Definition definition,
                         org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
Constructor.

Parameters:
emitter - J2EE Emitter
definition - Current Definition
symbolTable - SymbolTable
Method Detail

getFileName

protected java.lang.String getFileName()
Specified by:
getFileName in class org.apache.axis.wsdl.toJava.JavaWriter
Returns:
Returns the fully-qualified name of the deploy.wsdd file to be generated.

writeFileHeader

protected void writeFileHeader(java.io.PrintWriter pw)
                        throws java.io.IOException
Replace the default file header with the deployment doc file header.

Overrides:
writeFileHeader in class org.apache.axis.wsdl.toJava.JavaWriter
Parameters:
pw - PrintWriter where descriptor has to be written
Throws:
java.io.IOException - not thrown

writeFileBody

protected void writeFileBody(java.io.PrintWriter pw)
                      throws java.io.IOException
Write the body of the deploy.wsdd file.

Specified by:
writeFileBody in class org.apache.axis.wsdl.toJava.JavaWriter
Parameters:
pw - PrintWriter
Throws:
java.io.IOException - thrown by writeDeployServices

getPrefix

protected abstract java.lang.String getPrefix()
Returns:
Returns the filename prefix.

writeDeployServices

protected abstract void writeDeployServices(java.io.PrintWriter pw)
                                     throws java.io.IOException
Writes te list of wsdd:service

Parameters:
pw - PrintWriter
Throws:
java.io.IOException - implementation may throw IOException

writeTypeMapping

protected void writeTypeMapping(java.io.PrintWriter pw,
                                java.lang.String namespaceURI,
                                java.lang.String localPart,
                                java.lang.String javaType,
                                java.lang.String serializerFactory,
                                java.lang.String deserializerFactory,
                                java.lang.String encodingStyle)
Raw routine that writes out the typeMapping.

Parameters:
pw - PrintWriter
namespaceURI - xml type namespace
localPart - xml type localpart
javaType - java classname
serializerFactory - java serializer factory classname
deserializerFactory - java deserializer factory classname
encodingStyle - encoding style

writeOperation

protected void writeOperation(java.io.PrintWriter pw,
                              java.lang.String javaOperName,
                              javax.xml.namespace.QName elementQName,
                              javax.xml.namespace.QName returnQName,
                              javax.xml.namespace.QName returnType,
                              org.apache.axis.wsdl.symbolTable.Parameters params,
                              java.util.ArrayList faults,
                              java.lang.String soapAction)
Raw routine that writes out the operation and parameters.

Parameters:
pw - PrintWriter
javaOperName - java method name
elementQName - wsdl operation qname
returnQName - wsdl return type qname
returnType - java return type classname ?
params - list of params used by this operation
faults - list of faults thrown by this operation
soapAction - soapAction value

writeDeployTypes

protected void writeDeployTypes(java.io.PrintWriter pw,
                                javax.wsdl.Binding binding,
                                boolean hasLiteral,
                                boolean hasMIME,
                                org.apache.axis.constants.Use use)
Write out bean mappings for each type

Parameters:
pw - PrintWriter
binding - wsdl:binding
hasLiteral - has a literal type ?
hasMIME - has MIME type ?
use - Use

writeArrayTypeMapping

protected void writeArrayTypeMapping(java.io.PrintWriter pw,
                                     java.lang.String namespaceURI,
                                     java.lang.String localPart,
                                     java.lang.String javaType,
                                     java.lang.String encodingStyle,
                                     javax.xml.namespace.QName innerType)
Raw routine that writes out the arrayMapping.

Parameters:
pw - PrintWriter
namespaceURI - xml type namespace
localPart - xml type localpart
javaType - java classname
encodingStyle - encoding style
innerType - array component type QName

getModeString

public java.lang.String getModeString(byte mode)
Method getModeString

Parameters:
mode - Parameter mode (IN, INOUT, OUT)
Returns:
Parameter Mode String representation

getPrintWriter

protected java.io.PrintWriter getPrintWriter(java.lang.String filename)
                                      throws java.io.IOException
Method getPrintWriter

Overrides:
getPrintWriter in class org.apache.axis.wsdl.toJava.JavaWriter
Parameters:
filename - file to open
Returns:
Returns the printWriter for the file
Throws:
java.io.IOException - When File cannot be open/written

getCount

public static int getCount()
Returns:
Returns the count.

getDefinition

public javax.wsdl.Definition getDefinition()
Returns:
Returns the definition.

getJonasWSContext

public JOnASJ2EEWebServicesContext getJonasWSContext()
Returns:
Returns the jonasWSContext.

getSymbolTable

public org.apache.axis.wsdl.symbolTable.SymbolTable getSymbolTable()
Returns:
Returns the symbolTable.