Package com.ibm.di.fc.webservice.util
Class WsdlGenerator
- java.lang.Object
-
- com.ibm.di.fc.webservice.util.WsdlGenerator
-
public class WsdlGenerator extends java.lang.Object
Generates WSDL from Java
-
-
Constructor Summary
Constructors Constructor Description WsdlGenerator(AssemblyLineConfig aALConfig, java.lang.String aWebServiceLocation)
Class constructorWsdlGenerator(MetamergeConfig aMMConfig, java.util.Vector aOperationNames, java.lang.String aWebServiceLocation, java.lang.String aThisNamespace, java.lang.String aDefinitionName)
Class constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addService()
AddsPort
,QName
andService
to the definitionprotected javax.wsdl.Binding
createBinding()
CreatesBinding
for the messageDefinition
protected javax.wsdl.BindingOperation
createBindingOperation(java.lang.String aOperationName)
CreateBindingOperation
for the specified operation.protected void
createDefinition()
Creates the Definition for the WSDLprotected javax.wsdl.Input
createInput(java.lang.String aOperationName)
CreatesInput
for specified operation nameprotected javax.wsdl.Message
createMessage(java.lang.String aOperationName, boolean aIsInputMessage)
Creates aMessage
for the specified operation name and boolean parameterprotected javax.wsdl.Operation
createOperation(java.lang.String aOperationName)
CreatesOperation
for the specified operation nameprotected javax.wsdl.Output
createOutput(java.lang.String aOperationName)
CreatesOutput
for the specified operation nameprotected javax.wsdl.Part
createPart(java.lang.String aParameterName, java.lang.String aXsdType)
Creates aPart
for the specified parametersprotected javax.wsdl.Port
createPort()
CreatesPort
protected javax.wsdl.PortType
createPortType()
Creates aPortType
for theDefinition
protected javax.wsdl.extensions.soap.SOAPBody
createSoapBody()
Creates aSOAPBody
for the messagestatic void
generateWsdl(BaseConfiguration aBaseConfig, java.lang.String aWsdlFileName, java.lang.String aWebServiceLocation)
Generates WSDL with the specifiedBaseConfiguration
and location of the web service in the specified filevoid
writeToFile(java.lang.String aWsdlFileName)
Writes the WSDL to a file
-
-
-
Constructor Detail
-
WsdlGenerator
public WsdlGenerator(AssemblyLineConfig aALConfig, java.lang.String aWebServiceLocation) throws java.lang.Exception
Class constructor- Parameters:
aALConfig
- the configuration of the Assembly lineaWebServiceLocation
- String- Throws:
java.lang.Exception
- if parameter type is not supported
-
WsdlGenerator
public WsdlGenerator(MetamergeConfig aMMConfig, java.util.Vector aOperationNames, java.lang.String aWebServiceLocation, java.lang.String aThisNamespace, java.lang.String aDefinitionName) throws java.lang.Exception
Class constructor- Parameters:
aMMConfig
-MetamergeConfig
aOperationNames
- VectoraWebServiceLocation
- StringaThisNamespace
- namespaceaDefinitionName
- definition name of the message- Throws:
java.lang.Exception
- if parameter type is not supported
-
-
Method Detail
-
writeToFile
public void writeToFile(java.lang.String aWsdlFileName) throws javax.wsdl.WSDLException, java.io.FileNotFoundException
Writes the WSDL to a file- Parameters:
aWsdlFileName
- String , file name- Throws:
javax.wsdl.WSDLException
- if the file stream cannot be closedjava.io.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 java.lang.Exception
Creates the Definition for the WSDL- Throws:
java.lang.Exception
- if error occurs
-
addService
protected void addService() throws java.lang.Exception
AddsPort
,QName
andService
to the definition- Throws:
java.lang.Exception
- if error occurs
-
createPort
protected javax.wsdl.Port createPort() throws java.lang.Exception
CreatesPort
- Returns:
- Port
- Throws:
java.lang.Exception
- if error occurs
-
createBinding
protected javax.wsdl.Binding createBinding() throws java.lang.Exception
CreatesBinding
for the messageDefinition
- Returns:
- Binding
- Throws:
java.lang.Exception
- if error occurs
-
createPortType
protected javax.wsdl.PortType createPortType() throws java.lang.Exception
Creates aPortType
for theDefinition
- Returns:
- PortType
- Throws:
java.lang.Exception
- if error occurs
-
createOperation
protected javax.wsdl.Operation createOperation(java.lang.String aOperationName) throws java.lang.Exception
CreatesOperation
for the specified operation name- Parameters:
aOperationName
- String- Returns:
- Operation
- Throws:
java.lang.Exception
- if parameter is not supported
-
createInput
protected javax.wsdl.Input createInput(java.lang.String aOperationName) throws java.lang.Exception
CreatesInput
for specified operation name- Parameters:
aOperationName
- String- Returns:
- Input
- Throws:
java.lang.Exception
- if parameter type is not supported
-
createOutput
protected javax.wsdl.Output createOutput(java.lang.String aOperationName) throws java.lang.Exception
CreatesOutput
for the specified operation name- Parameters:
aOperationName
- String- Returns:
- Output
- Throws:
java.lang.Exception
- if parameter is not supported
-
createMessage
protected javax.wsdl.Message createMessage(java.lang.String aOperationName, boolean aIsInputMessage) throws java.lang.Exception
Creates aMessage
for the specified operation name and boolean parameter- Parameters:
aOperationName
- name of the operation.aIsInputMessage
- boolean, input/output suffix- Returns:
- Message
- Throws:
java.lang.Exception
- if the parameter type is not supported
-
createPart
protected javax.wsdl.Part createPart(java.lang.String aParameterName, java.lang.String aXsdType)
Creates aPart
for the specified parameters- Parameters:
aParameterName
- String , name of the partaXsdType
- String- Returns:
- Part
-
createBindingOperation
protected javax.wsdl.BindingOperation createBindingOperation(java.lang.String aOperationName)
CreateBindingOperation
for the specified operation.- Parameters:
aOperationName
- name of the operation.- Returns:
- BindingOperation
-
createSoapBody
protected javax.wsdl.extensions.soap.SOAPBody createSoapBody()
Creates aSOAPBody
for the message- Returns:
- the SOAP body
-
generateWsdl
public static void generateWsdl(BaseConfiguration aBaseConfig, java.lang.String aWsdlFileName, java.lang.String aWebServiceLocation) throws java.lang.Exception
Generates WSDL with the specifiedBaseConfiguration
and location of the web service in the specified file- Parameters:
aBaseConfig
-BaseConfiguration
aWsdlFileName
- String , file nameaWebServiceLocation
- String , location of the web service- Throws:
java.lang.Exception
- if parameters are not valid
-
-