it.imolinfo.jbi4corba.webservice.generator
Class WSDLGenerator

java.lang.Object
  extended by it.imolinfo.jbi4corba.webservice.generator.WSDLGenerator

public final class WSDLGenerator
extends Object

Class to generate WSDL file starting from an IDL file. Usually this class is used by NetBeans plugin.

Author:
Marco Cimatti, Luca Acquaviva

Method Summary
protected  void addRequiredSchemaImports(javax.wsdl.extensions.schema.Schema schema, Map attribute)
          Add schema imports if is needed.
 DefinitionAndSchema createRemoveXSD(List<javax.wsdl.Definition> definition)
          This method should be used in sequence with the method generateWSDLListfromIDL it accepts the definition generated list from method generateWSDLListfromIDL 1) Remove the content of tag schema and add the import schema file generated; 2) Create xsd schema for each xmlSchema in the WSDL.
 javax.wsdl.Definition generateWSDLfromIDL(File idlFile, WSDLDescriptor desc)
          Deprecated. 
 List<javax.wsdl.Definition> generateWSDLListfromIDL(File idlFile, ArrayList<WSDLDescriptor> descList)
          Creates a WSDL file starting from an IDL file.
 List<IdlFileDataHolder> getIdlFileData(File idlFile)
          Returns The names' and namespace's from an idl
static WSDLGenerator getWSDLGenerator()
          Gets an instance of this class.
 int idlInterfacesCounter(File idlFile)
          Returns the numbers of Interfaces from an IDL
 List<String> idlInterfacesNames(File idlFile)
          Returns the Interface's name from an IDL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWSDLGenerator

public static WSDLGenerator getWSDLGenerator()
Gets an instance of this class.

Returns:
an instance of this class, ready to use.

generateWSDLfromIDL

@Deprecated
public javax.wsdl.Definition generateWSDLfromIDL(File idlFile,
                                                            WSDLDescriptor desc)
                                          throws ClassGenerationException,
                                                 IOException,
                                                 javax.wsdl.WSDLException,
                                                 WSDLGenerationException,
                                                 Jbi4CorbaException
Deprecated. 

Creates a WSDL file starting from an IDL file. The generated WSDL contains only one binding, related to the JBI4Corba component.

Parameters:
desc - the descriptor incapsulating all required informations to generate a complete WSDL. Must be not null.
Returns:
The WSDL definition
Throws:
ClassGenerationException - if an error occurs during java class generation.
IOException - if an I/O error occurs while reading from or writing to a file.
javax.wsdl.WSDLException - if an error occurs manipulating the WSDL to adjust its content. CRB-80 New Method added generateWSDLListfromIDL
WSDLGenerationException
Jbi4CorbaException

generateWSDLListfromIDL

public List<javax.wsdl.Definition> generateWSDLListfromIDL(File idlFile,
                                                           ArrayList<WSDLDescriptor> descList)
                                                    throws ClassGenerationException,
                                                           IOException,
                                                           javax.wsdl.WSDLException,
                                                           WSDLGenerationException,
                                                           Jbi4CorbaException
Creates a WSDL file starting from an IDL file. The generated WSDL contains only one binding, related to the JBI4Corba component.

Parameters:
desc - the descriptor incapsulating all required informations to generate a complete WSDL. Must be not null.
Returns:
The List of WSDL definition
Throws:
ClassGenerationException - if an error occurs during java class generation.
IOException - if an I/O error occurs while reading from or writing to a file.
javax.wsdl.WSDLException - if an error occurs manipulating the WSDL to adjust its content. CRB-80 Modify the endpoint name generation the portType is the endpointname
WSDLGenerationException
Jbi4CorbaException

createRemoveXSD

public DefinitionAndSchema createRemoveXSD(List<javax.wsdl.Definition> definition)
                                    throws IOException,
                                           ParserConfigurationException,
                                           TransformerException
This method should be used in sequence with the method generateWSDLListfromIDL it accepts the definition generated list from method generateWSDLListfromIDL 1) Remove the content of tag schema and add the import schema file generated; 2) Create xsd schema for each xmlSchema in the WSDL. 3)

Parameters:
definition - Definition WSDlL
service - service's name
Returns:
definition without schema anda separated schema
Throws:
IOException
ParserConfigurationException
TransformerException

idlInterfacesCounter

public int idlInterfacesCounter(File idlFile)
                         throws IOException,
                                Jbi4CorbaException
Returns the numbers of Interfaces from an IDL

Parameters:
idl - the IDL file to read from. Must be not null.
Returns:
Throws:
IOException - if an I/O error occurs while reading file.
Jbi4CorbaException

idlInterfacesNames

public List<String> idlInterfacesNames(File idlFile)
                                throws IOException,
                                       Jbi4CorbaException
Returns the Interface's name from an IDL

Parameters:
idl - the IDL file to read from. Must be not null.
Returns:
Interfaces Names
Throws:
IOException - if an I/O error occurs while reading file.
Jbi4CorbaException

getIdlFileData

public List<IdlFileDataHolder> getIdlFileData(File idlFile)
                                       throws IOException,
                                              Jbi4CorbaException
Returns The names' and namespace's from an idl

Parameters:
idl - the IDL file to read from. Must be not null.
Returns:
Interfaces Names
Throws:
IOException - if an I/O error occurs while reading file.
Jbi4CorbaException

addRequiredSchemaImports

protected void addRequiredSchemaImports(javax.wsdl.extensions.schema.Schema schema,
                                        Map attribute)
Add schema imports if is needed.

Parameters:
schemaElement -
attribute -


Copyright © 2005-2010 Imola Informatica. All Rights Reserved.