com.ibm.di.fc.webservice
Class ComplexTypesGenerator

java.lang.Object
  extended by com.ibm.di.fc.Function
      extended by com.ibm.di.fc.webservice.ComplexTypesGenerator
All Implemented Interfaces:
FunctionInterface, VersionInfoInterface

public class ComplexTypesGenerator
extends Function

The Complex Types Generator Function Component is part of the TDI Web Services suite. This Function Component is used for generating a JAR file, which contains the Java class files implementing the complex data types defined in a schema either internal to or referenced by a WSDL. This JAR file can then be used by the other Web Service FCs in order to serialize and parse SOAP messages containing these complex data types. Please note that this FC is not supposed to be "run" as part of an AssemblyLine for example. Here is the way this FC is supposed to be used:
1. Place it in an AssemblyLine
2. Fill in its parameters
3. Click the "Generate complex types" button to create the JAR file.
After the desired JAR file has been created the FC can be either disabled or deleted altogether from the AssemblyLine - the FC does not provide any runtime functionality whatsoever.


Field Summary
 
Fields inherited from class com.ibm.di.fc.Function
logger
 
Constructor Summary
ComplexTypesGenerator()
           
 
Method Summary
 void compile(String aJavaCompilerExecutablePath)
          Compiles and executes the java command which generates the complex java types
static void generateComplexTypes(String aWsdlUrl, String aWsdlToJavaOptions, String aJDKPath, String aJarFileName, boolean aAutoGenJavaSrcFiles)
          Executes the main logic in this class which generates the complex java types and saves them in a JAR archive.
 void generateComplexTypesJavaFiles(String wsdlFile, String aWsdlToJavaOptions)
          Generates complex java types by a given WSDL and options
 String getVersion()
          Version information.
 Object perform(Object obj)
          Does nothing in this class
static String readInputStream(InputStream aInputStream)
          Reads from the given input stream until the end of the stream is reached and returns the read data.
 
Methods inherited from class com.ibm.di.fc.Function
debug, getConfiguration, getContext, getDebug, getLog, getParam, getRSInterface, getUI, initialize, initialize, logmsg, querySchema, setConfiguration, setContext, setDebug, setLog, setParam, setRSInterface, terminate, updateSchema, verifyInitialized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComplexTypesGenerator

public ComplexTypesGenerator()
Method Detail

generateComplexTypesJavaFiles

public void generateComplexTypesJavaFiles(String wsdlFile,
                                          String aWsdlToJavaOptions)
                                   throws Exception
Generates complex java types by a given WSDL and options

Parameters:
wsdlFile - The WSDL that defines the complex types
aWsdlToJavaOptions - The options to the generator
Throws:
Exception

compile

public void compile(String aJavaCompilerExecutablePath)
             throws Exception
Compiles and executes the java command which generates the complex java types

Parameters:
aJavaCompilerExecutablePath - The Java Home Path
Throws:
Exception

readInputStream

public static String readInputStream(InputStream aInputStream)
                              throws IOException
Reads from the given input stream until the end of the stream is reached and returns the read data.

Parameters:
aInputStream - The input stream.
Returns:
The read data.
Throws:
IOException

perform

public Object perform(Object obj)
               throws Exception
Does nothing in this class

Parameters:
obj -
Returns:
Entry object
Throws:
Exception

getVersion

public String getVersion()
Version information.

Returns:
version information

generateComplexTypes

public static void generateComplexTypes(String aWsdlUrl,
                                        String aWsdlToJavaOptions,
                                        String aJDKPath,
                                        String aJarFileName,
                                        boolean aAutoGenJavaSrcFiles)
                                 throws Exception
Executes the main logic in this class which generates the complex java types and saves them in a JAR archive.

Parameters:
aWsdlUrl - The URL to the WSDL file
aWsdlToJavaOptions - Any options you want to pass to the generator
aJDKPath - Path to JDK
aJarFileName - The name of the JAR you want to get in the end of the operation
aAutoGenJavaSrcFiles - If true, the program will generate Java source files for the generated complex types
Throws:
Exception