You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by aj...@apache.org on 2006/01/30 13:14:48 UTC
svn commit: r373496 - in
/webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen:
eclipse/ eclipse/ui/ eclipse/util/ resource/
Author: ajith
Date: Mon Jan 30 04:14:35 2006
New Revision: 373496
URL: http://svn.apache.org/viewcvs?rev=373496&view=rev
Log:
Updated the code for the Java2WSDL wizard. Still the final codegen code has to be done.
Modified:
webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java
webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/JavaSourceSelectionPage.java
webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/JavaWSDLOptionsPage.java
webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/ToolSelectionPage.java
webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/util/SettingsConstants.java
webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/resource/Codegen.properties
Modified: webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java?rev=373496&r1=373495&r2=373496&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java (original)
+++ webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java Mon Jan 30 04:14:35 2006
@@ -263,35 +263,8 @@
try {
monitor.worked(1);
- String classLocation = javaSourceSelectionPage
- .getClassLocation();
- monitor.worked(1);
- String className = javaSourceSelectionPage.getClassName();
- monitor.worked(1);
- String locationURL = java2wsdlOptionsPage.getLocationURL();
- monitor.worked(1);
- String inputWSDLName = java2wsdlOptionsPage
- .getInputWSDLName();
- monitor.worked(1);
- String bindingName = java2wsdlOptionsPage.getBindingName();
- monitor.worked(1);
- String portypeName = java2wsdlOptionsPage.getPortypeName();
- monitor.worked(1);
- String style = java2wsdlOptionsPage.getStyle();
- monitor.worked(1);
- String fullFileName = java2wsdlOutputLocationPage
- .getFullFileName();
- monitor.worked(1);
- int mode = java2wsdlOptionsPage.getMode();
- monitor.worked(1);
- Vector selectedMethods = javaSourceSelectionPage
- .getSelectedMethods();
- monitor.worked(1);
- new Java2WSDLGenerator().emit(classLocation, className,
- locationURL, inputWSDLName, bindingName,
- portypeName, style, fullFileName, mode,
- selectedMethods);
- monitor.worked(1);
+ //TODO - fill here
+
} catch (Throwable e) {
throw new RuntimeException(e);
}
Modified: webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/JavaSourceSelectionPage.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/JavaSourceSelectionPage.java?rev=373496&r1=373495&r2=373496&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/JavaSourceSelectionPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/JavaSourceSelectionPage.java Mon Jan 30 04:14:35 2006
@@ -15,41 +15,29 @@
*/
package org.apache.axis2.tool.codegen.eclipse.ui;
-import java.io.File;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Vector;
+
import org.apache.axis2.tool.codegen.eclipse.plugin.CodegenWizardPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Text;
public class JavaSourceSelectionPage extends AbstractWizardPage{
- private Text javaClassFileLocationBox;
private Text javaClassNameBox;
- private Button searchDeclaredMethodsCheckBox;
-
- private Table table;
-
- private boolean dirty;
+ private List javaClasspathList;
public JavaSourceSelectionPage() {
super("page4");
@@ -57,7 +45,7 @@
protected void initializeDefaultSettings() {
settings.put(JAVA_CLASS_NAME, "");
- settings.put(JAVA_CLASS_LOCATION_NAME, "");
+ settings.put(JAVA_CLASS_NAME, "");
}
/*
@@ -82,35 +70,14 @@
layout.verticalSpacing = 9;
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-
- Label label = new Label(container, SWT.NULL);
- label.setText(CodegenWizardPlugin
- .getResourceString("page4.javafilelocation.label"));
-
- javaClassFileLocationBox = new Text(container, SWT.BORDER);
- javaClassFileLocationBox.setLayoutData(gd);
- javaClassFileLocationBox.setText(settings.get(JAVA_CLASS_LOCATION_NAME));
- javaClassFileLocationBox.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e){
- handleLocationTextChange();
- }
- });
-
-
- Button browseButton = new Button(container, SWT.PUSH);
- browseButton.setText(CodegenWizardPlugin
- .getResourceString("general.browse"));
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleDirectoryBrowse();
- }
- });
- label = new Label(container, SWT.NULL);
+ //class name entry
+ Label label = new Label(container, SWT.NULL);
label.setText(CodegenWizardPlugin
.getResourceString("page4.classname.label"));
gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
javaClassNameBox = new Text(container,SWT.BORDER);
javaClassNameBox.setLayoutData(gd);
javaClassNameBox.setText(settings.get(JAVA_CLASS_NAME));
@@ -120,45 +87,59 @@
}
});
- Button searchButton = new Button(container, SWT.PUSH);
- searchButton.setText(CodegenWizardPlugin
- .getResourceString("general.search"));
- searchButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateTable();
- }
+ //class path entry
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan=3;
+ label = new Label(container, SWT.NULL);
+ label.setLayoutData(gd);
+ label.setText(CodegenWizardPlugin
+ .getResourceString("page4.classpath.label"));
+
+
+
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ Button addDirButton = new Button(container,SWT.PUSH);
+ addDirButton.setLayoutData(gd);
+ addDirButton.setText(CodegenWizardPlugin
+ .getResourceString("page4.addDir.label"));
+ addDirButton.addMouseListener(new MouseAdapter(){
+ public void mouseUp(MouseEvent e) {
+ handleDirectoryBrowse();
+ }
});
- //searchButton.setEnabled(false);
+
gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 3;
+ Button addJarButton = new Button(container,SWT.PUSH);
+ addJarButton.setLayoutData(gd);
+ addJarButton.setText(CodegenWizardPlugin
+ .getResourceString("page4.addJar.label"));
+ addJarButton.addMouseListener(new MouseAdapter(){
+ public void mouseUp(MouseEvent e) {
+ handleFileBrowse();
+ }
+ });
- searchDeclaredMethodsCheckBox = new Button(container,SWT.CHECK);
- searchDeclaredMethodsCheckBox.setLayoutData(gd);
- searchDeclaredMethodsCheckBox.setText("List Declared Methods Only");
- searchDeclaredMethodsCheckBox.addSelectionListener(new SelectionListener(){
- public void widgetSelected(SelectionEvent e){
- updateDirtyStatus(true);//dirty
- }
- public void widgetDefaultSelected(SelectionEvent e){}
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ Button removeEntryButton = new Button(container,SWT.PUSH);
+ removeEntryButton.setLayoutData(gd);
+ removeEntryButton.setText(CodegenWizardPlugin
+ .getResourceString("page4.removeEntry.label"));
+ removeEntryButton.addMouseListener(new MouseAdapter(){
+ public void mouseUp(MouseEvent e) {
+ //handle the remove click here
+ }
});
- gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan=3;
- gd.verticalSpan=5;
- table = new Table(container,SWT.SINGLE|SWT.FULL_SELECTION|SWT.CHECK);
- table.setLinesVisible(true);
- table.setHeaderVisible(true);
- table.setLayoutData(gd);
- declareColumn(table,20,"");
- declareColumn(table,100,"Method Name");
- declareColumn(table,100,"Return Type");
- declareColumn(table,100,"Parameter Count");
- table.setVisible(false);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 3;
+ gd.verticalSpan = 4;
+ javaClasspathList = new List(container,SWT.READ_ONLY | SWT.BORDER);
+ javaClasspathList.setLayoutData(gd);
+
setPageComplete(false);
if (restoredFromPreviousSettings){
- handleLocationTextChange();
handleClassNameTextChange();
}
@@ -166,11 +147,7 @@
}
- private void declareColumn(Table table, int width,String colName){
- TableColumn column = new TableColumn(table,SWT.NONE);
- column.setWidth(width);
- column.setText(colName);
- }
+
/**
* Pops up the file browse dialog box
*
@@ -179,28 +156,35 @@
DirectoryDialog fileDialog = new DirectoryDialog(this.getShell());
String dirName = fileDialog.open();
if (dirName != null) {
- javaClassFileLocationBox.setText(dirName);
+ javaClasspathList.add(dirName);
}
}
- private void handleLocationTextChange(){
- String locationText = javaClassFileLocationBox.getText();
- settings.put(JAVA_CLASS_LOCATION_NAME,locationText);
- if (locationText==null || "".equals(locationText.trim())){
- updateStatus("Class file location needs to be specified!");
- }else{
- updateStatus(null);
+
+ /**
+ * Pops up the file browse dialog box
+ *
+ */
+ private void handleFileBrowse() {
+ FileDialog fileDialog = new FileDialog(this.getShell());
+ fileDialog.setFilterExtensions(new String[]{"*.jar"});
+ String fileName = fileDialog.open();
+ if (fileName != null) {
+ javaClasspathList.add(fileName);
}
+
}
private void handleClassNameTextChange(){
String className = javaClassNameBox.getText();
settings.put(JAVA_CLASS_NAME,className);
if (className==null || "".equals(className.trim())){
- updateStatus("Fully qualified class name needs to be specified!");
+ updateStatus(CodegenWizardPlugin
+ .getResourceString("page4.error.invalidClassName"));
}else if(className.endsWith(".")){
- updateStatus("Class name is not properly terminated!");
+ updateStatus(CodegenWizardPlugin
+ .getResourceString("page4.error.ClassNameNotTerminated"));
}else{
updateStatus(null);
}
@@ -210,68 +194,9 @@
return javaClassNameBox.getText();
}
- public String getClassLocation(){
- return javaClassFileLocationBox.getText();
- }
-
- public Vector getSelectedMethods(){
- Vector list = new Vector();
- TableItem[] items = table.getItems();
- int itemLength = items.length;
- for(int i=0;i<itemLength;i++){
- if(items[i].getChecked()){
- list.add(items[i].getText(1));//get the selected method name only
- }
- }
- return list;
- }
-
- private void updateTable() {
- //get a URL from the class file location
- try {
- String classFileLocation = this.getClassLocation();
- URL classFileURL = new File(classFileLocation).toURL();
- ClassLoader loader = new URLClassLoader(new URL[] { classFileURL },Thread.currentThread().getContextClassLoader());
-
- Class clazz = loader.loadClass(getClassName());
- Method[] methods = null;
-
- if (searchDeclaredMethodsCheckBox.getSelection()){
- methods = clazz.getDeclaredMethods();
- }else{
- methods = clazz.getMethods();
- }
-
- int methodCount = methods.length;
- if (methodCount > 0) {
- table.removeAll();
- TableItem[] items = new TableItem[methodCount]; // An item for each field
- for (int i = 0 ; i < methodCount; i++){
- items[i] = new TableItem(table, SWT.NONE);
- items[i].setText(1,methods[i].getName());
- items[i].setText(2,methods[i].getReturnType().getName());
- items[i].setText(3,methods[i].getParameterTypes().length+"");
- items[i].setChecked(true);//check them all by default
- }
- table.setVisible(true);
-
- //update the dirty variable
- updateDirtyStatus(false);
- updateStatus(null);
- }
-
- } catch (MalformedURLException e) {
- updateStatus("Error : invalid location " +e.getMessage());
- } catch (ClassNotFoundException e) {
- updateStatus("Error : Class not found " + e.getMessage());
- }
+ public String[] getClassPathList(){
+ return javaClasspathList.getItems();
}
- private void updateDirtyStatus(boolean status){
- dirty = status;
- if (table.isVisible()){
- table.setEnabled(!status);
- }
- setPageComplete(!status);
- }
+
}
Modified: webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/JavaWSDLOptionsPage.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/JavaWSDLOptionsPage.java?rev=373496&r1=373495&r2=373496&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/JavaWSDLOptionsPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/JavaWSDLOptionsPage.java Mon Jan 30 04:14:35 2006
@@ -19,65 +19,32 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-/**
- * -I, --input <argument>input WSDL filename -o, --output <argument>output
- * WSDL filename -l, --location <argument>service location url -P,
- * --portTypeName <argument>portType name (obtained from class-of-portType if
- * not specif ied) -b, --bindingName <argument>binding name (--servicePortName
- * value + "SOAPBinding" if not specified) -S, --serviceElementName <argument>
- * service element name (defaults to --servicePortName value + "Service") -s,
- * --servicePortName <argument>service port name (obtained from --location if
- * not specified ) -n, --namespace <argument>target namespace -p, --PkgtoNS
- * <argument>= <value>package=namespace, name value pairs -m, --methods
- * <argument>space or comma separated list of methods to export -a, --all look
- * for allowed methods in inherited class -w, --outputWsdlMode <argument>output
- * WSDL mode: All, Interface, Implementation -L, --locationImport <argument>
- * location of interface wsdl -N, --namespaceImpl <argument>target namespace
- * for implementation wsdl -O, --outputImpl <argument>output Implementation
- * WSDL filename, setting this causes --o utputWsdlMode to be ignored -i,
- * --implClass <argument>optional class that contains implementation of methods
- * in cl ass-of-portType. The debug information in the class is used to obtain
- * the method parameter names, which are used to set the WSDL part names. -x,
- * --exclude <argument>space or comma separated list of methods not to export
- * -c, --stopClasses <argument>space or comma separated list of class names
- * which will stop inheritance search if --all switch is given -T,
- * --typeMappingVersion <argument>indicate 1.1 or 1.2. The default is 1.1 (SOAP
- * 1.1 JAX-RPC c ompliant 1.2 indicates SOAP 1.1 encoded.) -A, --soapAction
- * <argument>value of the operation's soapAction field. Values are DEFAUL T,
- * OPERATION or NONE. OPERATION forces soapAction to the nam e of the operation.
- * DEFAULT causes the soapAction to be set according to the operation's meta
- * data (usually ""). NONE forces the soapAction to "". The default is DEFAULT.
- * -y, --style <argument>The style of binding in the WSDL, either DOCUMENT,
- * RPC, or W RAPPED. -u, --use <argument>The use of items in the binding,
- * either LITERAL or ENCODED -e, --extraClasses <argument>A space or comma
- * separated list of class names to be added t o the type section. -C,
- * --importSchema A file or URL to an XML Schema that should be physically imp
- * orted into the generated WSDL -X, --classpath additional classpath elements
- */
+/*
+Usage java2wsdl -cn <fully qualified class name> : class file name
+-o <output Location> : output file location
+-cp <class path uri> : list of classpath entries - (urls)
+-tn <target namespace> : target namespace
+-tp <target namespace prefix> : target namespace prefix
+-stn <schema target namespace> : target namespace for schema
+-stp <schema target namespace prefix> : target namespace prefix for schema
+-sn <service name> : service name
+-of <output file name> : output file name for the WSDL
+*/
public class JavaWSDLOptionsPage extends AbstractWizardPage {
- private Text inputWSDLNameTextBox;
-
- private Text serviceLocationURLTextBox;
-
- private Text portTypeNameTextBox;
-
- private Text bindingTextBox;
-
- private Combo modeSelectionCombo;
-
- private Combo styleSelectionCombo;
-
+ private Text targetNamespaceText;
+ private Text targetNamespacePrefixText;
+ private Text schemaTargetNamepaceText;
+ private Text schemaTargetNamespacePrefixText;
+ private Text serviceNameText;
+
//TODO need more here
/*
@@ -86,12 +53,12 @@
* @see org.apache.axis2.tool.codegen.eclipse.ui.AbstractWizardPage#initializeDefaultSettings()
*/
protected void initializeDefaultSettings() {
- settings.put(PREF_JAVA_INPUT_WSDL_NAME,"");
- settings.put(PREF_JAVA_LOCATION,"http://localhost:8080");
- settings.put(PREF_JAVA_BINDING_NAME,"");
- settings.put(PREF_JAVA_PORTYPE_NAME,"");
- settings.put(PREF_JAVA_MODE_INDEX,0);
- settings.put(PREF_JAVA_STYLE_INDEX,0);
+ settings.put(PREF_JAVA_TARGET_NS,"");
+ settings.put(PREF_JAVA_TARGET_NS_PREF,"");
+ settings.put(PREF_JAVA_SCHEMA_TARGET_NS,"");
+ settings.put(PREF_JAVA_SCHEMA_TARGET_NS_PREF,"");
+ settings.put(PREF_JAVA_SERVICE_NAME,"");
+
}
/**
@@ -126,145 +93,103 @@
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
Label label = new Label(container, SWT.NULL);
label.setText(CodegenWizardPlugin
- .getResourceString("page5.inputwsdl.label"));
+ .getResourceString("page5.targetNamespace.label"));
- inputWSDLNameTextBox = new Text(container, SWT.BORDER | SWT.SINGLE);
- inputWSDLNameTextBox.setLayoutData(gd);
- inputWSDLNameTextBox.setText(settings.get(PREF_JAVA_INPUT_WSDL_NAME));
- inputWSDLNameTextBox.addModifyListener(new ModifyListener() {
+ targetNamespaceText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ targetNamespaceText.setLayoutData(gd);
+ targetNamespaceText.setText(settings.get(PREF_JAVA_TARGET_NS));
+ targetNamespaceText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- settings.put(PREF_JAVA_INPUT_WSDL_NAME, inputWSDLNameTextBox.getText());
+ settings.put(PREF_JAVA_TARGET_NS, targetNamespaceText.getText());
//dialogChanged();
}
});
label = new Label(container, SWT.NULL);
label.setText(CodegenWizardPlugin
- .getResourceString("page5.servicelocation.label"));
+ .getResourceString("page5.targetNamespacePrefix.label"));
gd = new GridData(GridData.FILL_HORIZONTAL);
- serviceLocationURLTextBox = new Text(container, SWT.BORDER);
- serviceLocationURLTextBox.setLayoutData(gd);
- serviceLocationURLTextBox.setText(settings.get(PREF_JAVA_LOCATION));
- serviceLocationURLTextBox.addModifyListener(new ModifyListener() {
+ targetNamespacePrefixText = new Text(container, SWT.BORDER);
+ targetNamespacePrefixText.setLayoutData(gd);
+ targetNamespacePrefixText.setText(settings.get(PREF_JAVA_TARGET_NS_PREF));
+ targetNamespacePrefixText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- settings.put(PREF_JAVA_LOCATION, serviceLocationURLTextBox.getText());
+ settings.put(PREF_JAVA_TARGET_NS_PREF, targetNamespacePrefixText.getText());
//dialogChanged();
}
});
label = new Label(container, SWT.NULL);
label.setText(CodegenWizardPlugin
- .getResourceString("page5.binding.label"));
+ .getResourceString("page5.schemaTargetNs.label"));
gd = new GridData(GridData.FILL_HORIZONTAL);
- bindingTextBox = new Text(container, SWT.BORDER);
- bindingTextBox.setLayoutData(gd);
- bindingTextBox.setText(settings.get(PREF_JAVA_BINDING_NAME));
- bindingTextBox.addModifyListener(new ModifyListener() {
+ schemaTargetNamepaceText = new Text(container, SWT.BORDER);
+ schemaTargetNamepaceText.setLayoutData(gd);
+ schemaTargetNamepaceText.setText(settings.get(PREF_JAVA_SCHEMA_TARGET_NS_PREF));
+ schemaTargetNamepaceText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- settings.put(PREF_JAVA_BINDING_NAME, bindingTextBox.getText());
+ settings.put(PREF_JAVA_SCHEMA_TARGET_NS_PREF, schemaTargetNamepaceText.getText());
//dialogChanged();
}
});
label = new Label(container, SWT.NULL);
label.setText(CodegenWizardPlugin
- .getResourceString("page5.porttype.label"));
+ .getResourceString("page5.schemaTargetNsPrefix.label"));
gd = new GridData(GridData.FILL_HORIZONTAL);
- portTypeNameTextBox = new Text(container, SWT.BORDER);
- portTypeNameTextBox.setLayoutData(gd);
- portTypeNameTextBox.setText(settings.get(PREF_JAVA_PORTYPE_NAME));
- portTypeNameTextBox.addModifyListener(new ModifyListener() {
+ schemaTargetNamespacePrefixText = new Text(container, SWT.BORDER);
+ schemaTargetNamespacePrefixText.setLayoutData(gd);
+ schemaTargetNamespacePrefixText.setText(settings.get(PREF_JAVA_SCHEMA_TARGET_NS));
+ schemaTargetNamespacePrefixText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- settings.put(PREF_JAVA_PORTYPE_NAME, portTypeNameTextBox.getText());
+ settings.put(PREF_JAVA_SCHEMA_TARGET_NS, schemaTargetNamespacePrefixText.getText());
//dialogChanged();
}
});
-
- // #####################################################
- label = new Label(container, SWT.NULL);
- label
- .setText(CodegenWizardPlugin
- .getResourceString("page5.mode.label"));
-
- gd = new GridData(GridData.FILL_HORIZONTAL);
- modeSelectionCombo = new Combo(container, SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);
- modeSelectionCombo.setLayoutData(gd);
- // modeSelectionCombo.
- populateModeCombo();
- modeSelectionCombo.addSelectionListener(new SelectionListener(){
- public void widgetSelected(SelectionEvent e){
- settings.put(PREF_JAVA_MODE_INDEX,modeSelectionCombo.getSelectionIndex());
- }
- public void widgetDefaultSelected(SelectionEvent e){}
- });
- // #####################################################
label = new Label(container, SWT.NULL);
- label
- .setText(CodegenWizardPlugin
- .getResourceString("page5.style.label"));
+ label.setText(CodegenWizardPlugin
+ .getResourceString("page5.binding.label"));
gd = new GridData(GridData.FILL_HORIZONTAL);
- styleSelectionCombo = new Combo(container, SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);
- styleSelectionCombo.setLayoutData(gd);
- populateStyleCombo();
- styleSelectionCombo.addSelectionListener(new SelectionListener(){
- public void widgetSelected(SelectionEvent e){
- settings.put(PREF_JAVA_STYLE_INDEX,styleSelectionCombo.getSelectionIndex());
+ schemaTargetNamespacePrefixText = new Text(container, SWT.BORDER);
+ schemaTargetNamespacePrefixText.setLayoutData(gd);
+ schemaTargetNamespacePrefixText.setText(settings.get(PREF_JAVA_SCHEMA_TARGET_NS));
+ schemaTargetNamespacePrefixText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ settings.put(PREF_JAVA_SCHEMA_TARGET_NS, schemaTargetNamespacePrefixText.getText());
+ //dialogChanged();
}
- public void widgetDefaultSelected(SelectionEvent e){}
});
-
setControl(container);
}
- private void populateModeCombo() {
- modeSelectionCombo.add(WSDL_ALL);
- modeSelectionCombo.add(WSDL_INTERFACE_ONLY);
- modeSelectionCombo.add(WSDL_IMPLEMENTATION_ONLY);
-
- modeSelectionCombo.select(settings.getInt(PREF_JAVA_MODE_INDEX));
- }
-
- private void populateStyleCombo() {
- styleSelectionCombo.add(WSDL_STYLE_DOCUMENT);
- styleSelectionCombo.add(WSDL_STYLE_RPC);
- styleSelectionCombo.add(WSDL_STYLE_WRAPPED);
-
- styleSelectionCombo.select(settings.getInt(PREF_JAVA_STYLE_INDEX));
- }
- public int getMode(){
- return 0;
- }
-
+
- public String getStyle(){
- return this.styleSelectionCombo.getItem(styleSelectionCombo.getSelectionIndex()).toUpperCase();
- }
- public String getLocationURL() {
- return this.serviceLocationURLTextBox.getText();
+ public String getTargetNamespace() {
+ return this.targetNamespacePrefixText.getText();
}
- public String getInputWSDLName() {
- return this.inputWSDLNameTextBox.getText();
+ public String getTargetNamespacePrefix() {
+ return this.targetNamespaceText.getText();
}
- public String getPortypeName() {
- return this.portTypeNameTextBox.getText();
+ public String getSchemaTargetNamespace() {
+ return this.schemaTargetNamepaceText.getText();
}
- public String getBindingName() {
- return this.bindingTextBox.getText();
+ public String getSchemaTargetNamespacePrefix() {
+ return this.schemaTargetNamespacePrefixText.getText();
}
- private String getgetClassFileLocation(){
- return null;
+ private String getServiceName(){
+ return this.serviceNameText.getText();
}
Modified: webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/ToolSelectionPage.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/ToolSelectionPage.java?rev=373496&r1=373495&r2=373496&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/ToolSelectionPage.java (original)
+++ webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/ui/ToolSelectionPage.java Mon Jan 30 04:14:35 2006
@@ -20,7 +20,6 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
@@ -54,8 +53,7 @@
layout.numColumns = 1;
layout.verticalSpacing = 9;
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-
+
Label label = new Label(container, SWT.NULL);
label.setText(CodegenWizardPlugin.getResourceString("page0.options.desc"));
@@ -82,8 +80,7 @@
});
///////////////////////////////////////
- /// The java2WSDL is disabled ///
- java2WSDLRadioButton.setEnabled(false);
+ //java2WSDLRadioButton.setEnabled(false);
//////////////////////////////////////
handleCheckboxSelection();
Modified: webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/util/SettingsConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/util/SettingsConstants.java?rev=373496&r1=373495&r2=373496&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/util/SettingsConstants.java (original)
+++ webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/eclipse/util/SettingsConstants.java Mon Jan 30 04:14:35 2006
@@ -97,13 +97,13 @@
// ##################################################################################
// Java2wsdl options selection page
- static final String PREF_JAVA_INPUT_WSDL_NAME = "INPUT_WSDL";
+ static final String PREF_JAVA_TARGET_NS = "INPUT_WSDL";
- static final String PREF_JAVA_LOCATION = "LOCATION_URL";
- static final String PREF_JAVA_BINDING_NAME = "BINDING_NAME";
- static final String PREF_JAVA_MODE_INDEX = "MODE_INDEX";
+ static final String PREF_JAVA_TARGET_NS_PREF = "LOCATION_URL";
+ static final String PREF_JAVA_SCHEMA_TARGET_NS = "BINDING_NAME";
+ static final String PREF_JAVA_SERVICE_NAME = "MODE_INDEX";
static final String PREF_JAVA_STYLE_INDEX = "STYLE_INDEX";
- static final String PREF_JAVA_PORTYPE_NAME = "PORTYPE_NAME";
+ static final String PREF_JAVA_SCHEMA_TARGET_NS_PREF = "PORTYPE_NAME";
// ##################################################################################
//output page
Modified: webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/resource/Codegen.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/resource/Codegen.properties?rev=373496&r1=373495&r2=373496&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/resource/Codegen.properties (original)
+++ webservices/axis2/trunk/java/modules/tool/src/org/apache/axis2/tool/codegen/resource/Codegen.properties Mon Jan 30 04:14:35 2006
@@ -73,21 +73,24 @@
page4.title=Java source selection
page4.desc=Set the output project for the generated code
#labels
-page4.javafilelocation.label=Java class file location
+page4.classpath.label=Java class file location
page4.classname.label=Class name
+page4.addDir.label=Add Folder
+page4.addJar.label=Add Jar
+page4.removeEntry.label=Remove
+page4.error.invalidClassName=Fully qualified class name needs to be specified!
+page4.error.ClassNameNotTerminated=Class name is not properly terminated!
###############################################################
#java2wsdl options = page 5
page5.name=page5
page5.title=Java to WSDL Options
page5.desc=Set the Options for the generator
-#####
-page5.inputwsdl.label=Input WSDL name
-page5.outputwsdl.label=Output WSDL name
-page5.servicelocation.label=Service Location
-page5.porttype.label=Port type name
-page5.binding.label=Binding
-page5.mode.label=Mode
-page5.style.label=Style
+page5.targetNamespace.label=Target Namespace
+page5.targetNamespacePrefix.label=Target Namespace Prefix
+page5.schemaTargetNs.label=Schema target namespace
+page5.schemaTargetNsPrefix.label=Schema target namespace Prefix
+page5.serviceName.label=Service Name
+
###############################################################
#java2wsdl output location - page 6
page6.name=page6