Hi,
Since I m following the architecture of the Axis2/Java codegen tool, I'm loading configurations dynamically in a way it allow to take a binary release of the tool and get done code generation for another language easily. Since Axis2/c is designed to intergrate with other platforms like Firefox, PHP, Perl we should be able to generate code for these languages as well. So I think it is better to keep this feature (Muliti language support) in the Axis2/C code generation tool.

Some explanation of the logic flow of the Codegen tool is attached with this.

Regards
Dimuthu




Damitha Kumarage wrote:

Hi Dimuthu,

Dimuthu Gamage wrote:

Hi,
The reason I plan to create seperate DLL's for extensions and emitters is, they should be loaded dynamically according to the configuration file by reflection. Since there will be many .so files for each extension and emitters I thought its better to create sepereate folders. Aren't there any other ways to overcome this?


What your emitter does is, it read from wsdl and populate an xml right?. So why you call emitters? you have only
one emitter right.

Please explain me what kind of extension you mention here.

I don't understand why you need dynamic loading inside the wsdl2c tool.
What I understand is that you need one library called axis2_wsdl2c.so and an executable which use that library to produce results. Anyway could you explain your flow of logic so that I can understand better
thanks
Damitha


Regards
Dimuthu

Damitha Kumarage wrote:

Hi Dimuthu,
Why do we create a sub folder inside lib called and put codegen libs there. We can just put them in libs folder as we do with other modules. Also I would prefer a single codegen dll in use. Similary we can put the executable directly under deploy/bin.
thanks
Damitha

Dimuthu Gamage wrote:

Hi
Sorry about the bad formatting. Corrected one is pasted and attched here.

Thanks
Dimuthu

$AXIS2C_HOME
 |
 +-------<conf>
| | | | | +---------<codegen>configuration files | | | +------<templates> templates only for c
 |
 +------ <lib>
 |         |
 |         |
 |         +-------<codegen>
 |                      |
 |                      |
 |                      +------<writer>   dll's for writers
 |                      |
 |                      |
 |                      +------<emitter>  dll's for emitters
 |                      |
 |                      |
 |                      +------<extensions>  dll's for extensions
 |
 +------ <bin>
 |        |
 |        |
 |        +-------<codegen>
                      |
                      +------w2c executable


Dimuthu Gamage wrote:

Hi,
Thanks for your comment. Then I ll put that in to the subfolder named codegen inside lib and binaries in sameway inside bin. So the installed directory structure would be like this.

$AXIS2C_HOME
  |
 +-------<conf>
| | | +---------<codegen>configuration files | | | | | +------<templates> templates only for c
  |
  |
  +------ <lib>
   |            |
   |            |
   |           +-------<codegen>
   |                            |
   |                            |
   |                           +------<writer>   dll's for writers
   |                            |
   |                            |
   |                           +------<emitter>  dll's for emitters
   |                            |
   |                            |
| +------<extensions> dll's for extensions
   |
  +------ <bin>
   |            |
   |            |
   |           +-------<codegen>
                              |
                             +------w2c executable

Regards
Dimuthu

Samisa Abeysinghe wrote:

Given that the Java tool already does Java and C#, do we need those folders. I cannot see anyone form Java world using this C tool to generate Java code.

Also I am not sure of the install structure. Bacically the DLLs should go to the lib folder in $AXIS2C_HOME, not to seperate sub folders. conf files and templates should go into a folder named conf/codegen(or cg gor short)/templates folder.

Thoughts....

Samisa...


Dimuthu Gamage wrote:

Hi,
 Here is the directory structure inside the codegen source

<templates>
  |
  +-------<c> --- (c templates )
  |
  +-------<java>
  |
  +-------<c-sharp>
  |
  |
<util>-------this contain utility functions
  |          i.e: XSLT parser wrapper,
  |           configuration loaders,
  |           message loaders,
  |           command line option parsers,
  |           error messages collection,
  |           configuration file
  |
<codegen>-+----classes for codgen engine
         |     (this would load the emitters
         |     and invoke emit according to
         |      command line options and configurations)
         |
      <emitter> - libraries for emitters
         |        (this parse the wsdl ( using woden/c)
         |         and build the intermediate xml to
         |         with xslt
         |
         |
      <writer>----writer libraries for
         |        ( each xsl template related to one writer )
         |
    <extension> - validators and customizations
                  from current configuration
After this is installed, installed components would be in following structure



This is also taken from WSDL2Java source  directory structure.
I hope this is ok. Anyway if I should change the structure, please give your feedback.

Regards
Dimuthu

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



------------------------------------------------------------------------

$AXIS2C_HOME
 |
 +-------<conf>
| | | | | +---------<codegen>configuration files | | | +------<templates> templates only for c
 |
 +------ <lib>
 |         |
 |         |
 |         +-------<codegen>
 |                      |
 |                      |
 |                      +------<writer>   dll's for writers
 |                      |
 |                      |
 |                      +------<emitter>  dll's for emitters
 |                      |
 |                      |
 |                      +------<extensions>  dll's for extensions
 |
 +------ <bin>
 |        |
 |        |
 |        +-------<codegen>
                      |
                      +------w2c executable

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  
 
Logic flow of the tool
=====================
                                     +----------------------+
 +----------------------------+      | select the emitter   |      
+------------------------+       +-------------+
 | loads command line         |      | to the langugage     |      | engage pre 
extenstions |       | generatd an |
 | options and configurations |----->| from command line opt| ---->| (e.g - 
wsdl validation,|-----> | intermediate|
 |(managed by codegen engine) |      | if no option given   |      |        
data binding    |       | xml-        |
 +----------------------------+      | default languag loads|      
+------------------------+       + ------------+ 
                                     | (managed by engine)  |
                                     +----------------------+
 
 +-----------------+     +---------------+     
+-------------------------------------+
 | load writers    |     |load template  |     | pass intermidiate xml and 
template  |    +-----------------------+
 | for the language|---->|from the config|---> | for the xslt parser to 
generate     |--->|engage post extensions |
 +-----------------+     |propery file   |     | the code                       
     |    |( e.g - indent the code|
                         +---------------+     
+-------------------------------------+    +-----------------------+


Some explanation how the tool support code generation for multiple languages
============================================================================
                                                                                
        +--------------------------+ 
      +---------------------+           +---------------------+                 
        | codegen.cofig.properties |
      | command line options|---------- |   codegen engine    
|-------------------------+--------------------------+
      +---------------------+           +---------------------+                 
        | langauge -> emitter map  | 
                     |                        /            \                    
        | writers -> template map  |
                     |          <load according to the command line option>     
        +--------------------------+
                     |                      /                \ 
              +--------------------------------+           
+--------------------------------+
              | emitter for c                  |           | emitter for java 
script        |
              +--------------------------------+           
+--------------------------------+
                     /                                                   |  
                    / <call writers accoding                             | 
<call writers accoding
                   /   to command line options>                          |  to 
command line options> 
                  /                                                      |
          +-----------+--------------------------------+           
+---------+--------------------------------+
          | writers   | templates for c                |           | writers |  
 templates for firefox(js)    |
          +-----------+--------------------------------+           
+---------+--------------------------------+
          | writer1 --> template for service skeleton  |           | writer1 
-->  template for main html      | 
          | writer2 --> template for skel source       |           
+-------------------------------------------+
          | writer3 --> template for skel header       |        
          | writer4 --> template for stub source       |
          | writer5 --> template for stub header       |
          +--------------------------------------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to