Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Refactor of JavaFirst"

(GUI)
(GUI)
Line 84: Line 84:
 
== Project Wizard ==
 
== Project Wizard ==
 
The First Page: User can enter the project name
 
The First Page: User can enter the project name
   
+
  [[Image:Project-wizard-1.JPG]]
  
 
----
 
----
  
 
The Second Page: User can choose the runtime.
 
The Second Page: User can choose the runtime.
 +
[[Image:Project-wizard-2.JPG]]
  
 
----
 
----

Revision as of 02:15, 25 September 2007

Scenario

1). User has nothing.
2). User has an interface without implementation.
3). User has an interface and corresponding implementation.
4). User has an IMPL/POJO without interface.

Problems of Current Solution

1). Current solution can not cover all the cases listed above.


2). There are two steps for user to do his jobs. First is java2wsdl and second is wsdl2java. It’s too “complicated” for user. Actually, from user’s point of view, he does not care what the wsdl file looks like. He only and should only care about the SEI/IMPL. The wsdl file should be transparent for user. So, it needs to generate all artifacts including wsdl file and source codes from SEI/IMPL directly.


3). Further more; it is very possible that user will modify the generated wsdl file after java2wsdl step. Then, the source codes generated by wsdl2java tool from this modified wsdl file may not match the original SEI/IMPL. As the result of this, the service may not work. So, if the wsdl and source codes are generated in only one step, user will have no chance to modify the wsdl file and the problem will not occur.


4). The java2wsdl generator will be invoked each time when building the project. Actually, at most of time, user does not want to invoke the generator. They just only want to modify his SEI/IMPL. And when they think the SEI/IMPL is finished they would want to use the generator to generate other artifacts. So, it needs to provide a selection for user to choose whether build process will invoke the generator or not.


5). Which class (SEI/IMPL) will be chose to start the java2wsdl generator? In current solution, system will go through all the source codes and choose some of them to start the generator. It may be useful for user. But it is very possible that the system chooses a “wrong” class that the user does not want to choose. Actually, user knows his SEI/IMPL very clearly. And it is very easy for user to specify the java class to start the generator. So, why not let user point out which class to be start with?

New Solution for Java First Programming Model

1). Use one step to generate all artifacts from SEI/IMPL. User does can modify the generated wsdl file, but all the modifications to this file will be ignored. And the menu [Generate Code] for wsdl file will be disabled for Java-First projects. The SEI/IMPL will be the only input for the generator tool.


2). Add a selection for user to switch on/off the generator when building the project. The default value for this selection is false.


3). When starting the generator, user should provide the input class which can be specified in project property page by user. If user specifies an interface as the starting class, he should either provide an implementation or choose to use the generated implementation. Actually, STP will always invoke the genertor with the implementaion class.


4). Add a new action (popup menu) for user to invoke the generator manually.


5). If user has nothing.

-User creates an JavaFirst empty project using project wizard.
-User creates interface and implementation. The implementation class can also be generated automatically by STP as user's selection.  
-User set the interface or the implementation as the starting class from which to start the generator in the project property page.
-User right click the project or the starting class and select the [Generator tool] to start the generator.
-STP will annotate the interface and implementation if these classes have not been annotated as webservice. And then STP will invoke the generater of the coresponding runtime type to generate all the artifacts for user. 

6). If user has an interface without implementation.

-User starts the JavaFirst project wizard.
-User specifies the existing interface as the starting class and chooses using the generated implementation in the wizard page. The dependend java file and libraries can also be added.
-STP will import all the existing java file and libraries to the new created project. And default webservice annnotations will be added to the interface. And also, an implementation will be created for user. If the runtime choosed by user can generate implementation, STP will use the generator of this rumtime to generate the implementation. Otherwise, STP will use default generator to generate the implementation.
-User modifies the implementation class.
-User right click the project or the starting class and select the [Generator tool] to start the generator.
-And then STP will invoke the generator of the coresponding runtime type to generate all the artifacts for user. 




7). If user has an interface with corresponding implementation.

-User starts the JavaFirst project wizard.
-User specifies the existing interface as the starting class and chooses to use the existing implementation in the wizard page. The dependend java file and libraries can also be added.
-STP will import all the existing java file and libraries to the new created project. And default webservice annnotations will be added to the interface and implementation.
-User modifies the implementation class.
-User right click the project or the starting class and select the [Generator tool] to start the generator.
-And then STP will invoke the generator of the coresponding runtime type to generate all the artifacts for user. 



8). If user has an IMPL/POJO with out interface

-User starts the JavaFirst project wizard.
-User specifies the existing IMPL/POJO as the starting class in the wizard page. The dependend java file and libraries can also be added.
-STP will import all the existing java file and libraries to the new created project. And default webservice annnotations will be added to implementation/pojo.
-User modifies the implementation class.
-User right click the project or the starting class and select the [Generator tool] to start the generator.
-And then STP will invoke the generator of the coresponding runtime type to generate all the artifacts for user.

GUI

Project Wizard

The First Page: User can enter the project name

Project-wizard-1.JPG

The Second Page: User can choose the runtime.

Project-wizard-2.JPG

The Third Page: User can choose to create a empty project or to import existing source codes.


The last Page: User can set the parameters of generator for the specific runtime choosed by user. There will be a new wizard page in the project wizard on which generator parameters can be set will be added as an extension point. Different runtime type will have different page. The following picture is an example for CXF runtime type.

Cxf-project-wizard.JPG 

There will be another new wizard page on which user can specify from which class to start the generator. This is very useful if the user has already had some source code.

Project-wizard.JPG

Preference Page

No change compared with current solution.(TBD)

Project Property Page

Property-page.JPG

Java2ws Generator Wizard

This wizard will not display if the user has specified the “Start Point” in project property page.

Generator-wizard.JPG

Java2ws Generator Menu

This popup menu will be enabled on the selection of java-first project or the java file of the project in Package Viewer. And if click this menu item, generator wizard may display as described in section above.

Popup-menu.JPG

CXF Specific Generator Parameters

All the following generator parameters can be specified in project wizard page and project property page.

-databinding
-frontend
-soap
-verbose
-createxsdimport
-wsdl
-server
-client

Project Wizard Page for CXF

Cxf-project-wizard.JPG

Project Property Page for CXF

Cxf-project-property.JPG

JAXWS-RI Specific Generator Parameters

No change compared with current solution. (TBD)

Back to the top