ch.sahits.codegen.generator
Class AxisWSDL2JavaWrapper

java.lang.Object
  extended by ch.sahits.codegen.generator.AxisWSDL2JavaWrapper
All Implemented Interfaces:
IGeneratorWrapper

public final class AxisWSDL2JavaWrapper
extends java.lang.Object
implements IGeneratorWrapper

This is a generator wrapper that wrapps the funcionality of the Apaches Axis2 WSDL2Java generator.

Since:
1.2.0
Author:
Andi Hotz, Sahits GmbH

Field Summary
static java.lang.String MESSAGE_RECEIVER_IN_ONLY
          File Ending of the MessageRecieferIn only java source file
static java.lang.String MESSAGE_RECEIVER_IN_OUT_FRAGMENT
          File Ending of the MessageRecieferIn and Out java source file
static java.lang.String SERVICE_STAB_FRAGMENT
          Filename fragment for the Stup class
static java.lang.String SERVICE_XML_FILE_NAME
          Name of the service.xml file
 
Constructor Summary
AxisWSDL2JavaWrapper(IWebservice ws, IOutputFileModel model)
          Initialize the generator with the specific model data
 
Method Summary
 void calculateOption(java.lang.String outputFilePath)
          Compute the bes generate option and define the files that need to be deleted after the generation
 void cleanup()
          Remove the undesired artifacts
 void generate()
          Generate all output that is needed
 AxisService getAxisService(java.lang.String wsdlURI)
          Reads the WSDL Object Model from the given location.
 java.lang.String getBaseUri(java.lang.String wsdlURI)
          Retrive the URI of the directory of the WSDL file
 java.util.List<java.lang.String> getCorretedPath(java.lang.String outputFile)
          Retrieve the output path for an output fragment normaly there is only one path but there may be more
protected  Definition getWsdlDefinition(java.lang.String filepath)
          public method to get loaded wsdl Definition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_RECEIVER_IN_ONLY

public static final java.lang.String MESSAGE_RECEIVER_IN_ONLY
File Ending of the MessageRecieferIn only java source file

See Also:
Constant Field Values

MESSAGE_RECEIVER_IN_OUT_FRAGMENT

public static final java.lang.String MESSAGE_RECEIVER_IN_OUT_FRAGMENT
File Ending of the MessageRecieferIn and Out java source file

See Also:
Constant Field Values

SERVICE_XML_FILE_NAME

public static final java.lang.String SERVICE_XML_FILE_NAME
Name of the service.xml file

See Also:
Constant Field Values

SERVICE_STAB_FRAGMENT

public static final java.lang.String SERVICE_STAB_FRAGMENT
Filename fragment for the Stup class

See Also:
Constant Field Values
Constructor Detail

AxisWSDL2JavaWrapper

public AxisWSDL2JavaWrapper(IWebservice ws,
                            IOutputFileModel model)
Initialize the generator with the specific model data

Parameters:
ws - Webservice model
model - Data model
Throws:
java.lang.NullPointerException - if either argument is null
Method Detail

calculateOption

public void calculateOption(java.lang.String outputFilePath)
Compute the bes generate option and define the files that need to be deleted after the generation

Specified by:
calculateOption in interface IGeneratorWrapper
Parameters:
outputFilePath - the output file that should not be deleted

cleanup

public void cleanup()
Remove the undesired artifacts

Specified by:
cleanup in interface IGeneratorWrapper

generate

public void generate()
Generate all output that is needed

Specified by:
generate in interface IGeneratorWrapper

getWsdlDefinition

protected Definition getWsdlDefinition(java.lang.String filepath)
                                throws WSDLException
public method to get loaded wsdl Definition

Parameters:
filepath - path to the WSDL file
Returns:
WSDL definition object
Throws:
WSDLException

getBaseUri

public java.lang.String getBaseUri(java.lang.String wsdlURI)
Retrive the URI of the directory of the WSDL file

Parameters:
wsdlURI -
Returns:
path to the WSDL

getAxisService

public AxisService getAxisService(java.lang.String wsdlURI)
                           throws java.io.IOException
Reads the WSDL Object Model from the given location.

Parameters:
wsdlURI - the filesystem location (full path) of the WSDL file to read in.
Returns:
the WSDLDescription object containing the WSDL Object Model of the given WSDL file
Throws:
java.io.IOException - on errors reading the WSDL file

getCorretedPath

public java.util.List<java.lang.String> getCorretedPath(java.lang.String outputFile)
Retrieve the output path for an output fragment normaly there is only one path but there may be more

Parameters:
outputFile - last fragment of the absolut path
Returns:
absolut path to the file or null if the path could not be retrieved