com.ibm.di.fc.webservice.util
Class WsdlGenerator

java.lang.Object
  extended by com.ibm.di.fc.webservice.util.WsdlGenerator

public class WsdlGenerator
extends Object

Generates WSDL from Java


Constructor Summary
WsdlGenerator(AssemblyLineConfig aALConfig, String aWebServiceLocation)
          Class constructor
WsdlGenerator(MetamergeConfig aMMConfig, Vector aOperationNames, String aWebServiceLocation, String aThisNamespace, String aDefinitionName)
          Class constructor
 
Method Summary
protected  void addService()
          Adds Port , QName and Service to the definition
protected  javax.wsdl.Binding createBinding()
          Creates Binding for the message Definition
protected  javax.wsdl.BindingOperation createBindingOperation(String aOperationName)
          Create BindingOperation for the specified operation.
protected  void createDefinition()
          Creates the Definition for the WSDL
protected  javax.wsdl.Input createInput(String aOperationName)
          Creates Input for specified operation name
protected  javax.wsdl.Message createMessage(String aOperationName, boolean aIsInputMessage)
          Creates a Message for the specified operation name and boolean parameter
protected  javax.wsdl.Operation createOperation(String aOperationName)
          Creates Operation for the specified operation name
protected  javax.wsdl.Output createOutput(String aOperationName)
          Creates Output for the specified operation name
protected  javax.wsdl.Part createPart(String aParameterName, String aXsdType)
          Creates a Part for the specified parameters
protected  javax.wsdl.Port createPort()
          Creates Port
protected  javax.wsdl.PortType createPortType()
          Creates a PortType for the Definition
protected  javax.wsdl.extensions.soap.SOAPBody createSoapBody()
          Creates a SOAPBody for the message
static void generateWsdl(BaseConfiguration aBaseConfig, String aWsdlFileName, String aWebServiceLocation)
          Generates WSDL with the specified BaseConfiguration and location of the web service in the specified file
 void writeToFile(String aWsdlFileName)
          Writes the WSDL to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WsdlGenerator

public WsdlGenerator(AssemblyLineConfig aALConfig,
                     String aWebServiceLocation)
              throws Exception
Class constructor

Parameters:
aALConfig - the configuration of the Assembly line
aWebServiceLocation - String
Throws:
Exception - if parameter type is not supported

WsdlGenerator

public WsdlGenerator(MetamergeConfig aMMConfig,
                     Vector aOperationNames,
                     String aWebServiceLocation,
                     String aThisNamespace,
                     String aDefinitionName)
              throws Exception
Class constructor

Parameters:
aMMConfig - MetamergeConfig
aOperationNames - Vector
aWebServiceLocation - String
aThisNamespace - namespace
aDefinitionName - definition name of the message
Throws:
Exception - if parameter type is not supported
Method Detail

writeToFile

public void writeToFile(String aWsdlFileName)
                 throws javax.wsdl.WSDLException,
                        FileNotFoundException
Writes the WSDL to a file

Parameters:
aWsdlFileName - String , file name
Throws:
javax.wsdl.WSDLException - if the file stream cannot be closed
FileNotFoundException - If the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason then a FileNotFoundException is thrown.

createDefinition

protected void createDefinition()
                         throws Exception
Creates the Definition for the WSDL

Throws:
Exception - if error occurs

addService

protected void addService()
                   throws Exception
Adds Port , QName and Service to the definition

Throws:
Exception - if error occurs

createPort

protected javax.wsdl.Port createPort()
                              throws Exception
Creates Port

Returns:
Port
Throws:
Exception - if error occurs

createBinding

protected javax.wsdl.Binding createBinding()
                                    throws Exception
Creates Binding for the message Definition

Returns:
Binding
Throws:
Exception - if error occurs

createPortType

protected javax.wsdl.PortType createPortType()
                                      throws Exception
Creates a PortType for the Definition

Returns:
PortType
Throws:
Exception - if error occurs

createOperation

protected javax.wsdl.Operation createOperation(String aOperationName)
                                        throws Exception
Creates Operation for the specified operation name

Parameters:
aOperationName - String
Returns:
Operation
Throws:
Exception - if parameter is not supported

createInput

protected javax.wsdl.Input createInput(String aOperationName)
                                throws Exception
Creates Input for specified operation name

Parameters:
aOperationName - String
Returns:
Input
Throws:
Exception - if parameter type is not supported

createOutput

protected javax.wsdl.Output createOutput(String aOperationName)
                                  throws Exception
Creates Output for the specified operation name

Parameters:
aOperationName - String
Returns:
Output
Throws:
Exception - if parameter is not supported

createMessage

protected javax.wsdl.Message createMessage(String aOperationName,
                                           boolean aIsInputMessage)
                                    throws Exception
Creates a Message for the specified operation name and boolean parameter

Parameters:
aOperationName - name of the operation.
aIsInputMessage - boolean, input/output suffix
Returns:
Message
Throws:
Exception - if the parameter type is not supported

createPart

protected javax.wsdl.Part createPart(String aParameterName,
                                     String aXsdType)
Creates a Part for the specified parameters

Parameters:
aParameterName - String , name of the part
aXsdType - String
Returns:
Part

createBindingOperation

protected javax.wsdl.BindingOperation createBindingOperation(String aOperationName)
Create BindingOperation for the specified operation.

Parameters:
aOperationName - name of the operation.
Returns:
BindingOperation

createSoapBody

protected javax.wsdl.extensions.soap.SOAPBody createSoapBody()
Creates a SOAPBody for the message

Returns:
the SOAP body

generateWsdl

public static void generateWsdl(BaseConfiguration aBaseConfig,
                                String aWsdlFileName,
                                String aWebServiceLocation)
                         throws Exception
Generates WSDL with the specified BaseConfiguration and location of the web service in the specified file

Parameters:
aBaseConfig - BaseConfiguration
aWsdlFileName - String , file name
aWebServiceLocation - String , location of the web service
Throws:
Exception - if parameters are not valid