Purposed Framework

folllowing is the purposed frmweork. Please help me improve this. Am willing to rewrite this after we brinstorm on this.

The tool has two parts

File parsing

The following files should be parsed and populated behind a interface so that the parsing logic does not represent by the interface. the purposed interface is J2EEWebServiceContext

  1. WSDL File - We shall use the SymbolTable in the axis. But the SymbolTable exposed too much parsing detail(DOM nodes in types ect.) to the code genaration side. We shall wrap the SymbolTable behind the org.apache.x.ws4j2ee.context.WSDLContext interface. As most of the classes in the Symboltable implements interfaces used here (javax.wsdl.*) it can be easily wrapped.
  2. webService.xml file
  3. JAX-RPC mapping file
  4. servlet/ejb configaration file

Code Genaration

framework is done with two interfaces.

  1. org.apache.x.ws4j2ee.toWs.Genarator - this interface reprsent bunch of code that genarate a module. e.g. who genarate the EJB files can give a class implement Genarator interface called EJBGenerator. When the genarate() method is called on that class EJB module should be genarated. So we can easily add remove modules.
  2. org.apache.x.ws4j2ee.toWs.Writer - this interface reprsent bunch of code that genarate a module. e.g. who genarate the EJB Remote interface can have EJBRemoteClassWriter in the EJBGenerator. When the writeCode() method is called on that class EJB Remote interface should be genarated. So we can easily add remove files to genaration modules.

Genarator has one or more writer inside it. genarate() method will call the writers one by one.

The Factories org.apache.x.ws4j2ee.toWs.WriterFactory ,org.apache.x.ws4j2ee.toWs.GenaratorFactory and the Constants (org.apache.x.ws4j2ee.toWs.GenarationConstants ) are use to hide the Concreate implementations of the genarators and writers. New concreate Writer or Generator can added by changing the Factory class. Only place the concreate classes referances are inside the Factories