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 ch...@apache.org on 2006/10/26 08:18:49 UTC

svn commit: r467886 - in /webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache: axis2/tools/bean/ axis2/tools/idea/ ideaplugin/bean/ ideaplugin/frames/ ideaplugin/plugin/

Author: chinthaka
Date: Wed Oct 25 23:18:48 2006
New Revision: 467886

URL: http://svn.apache.org/viewvc?view=rev&rev=467886
Log:
Applying the patch in http://issues.apache.org/jira/browse/AXIS2-1506. Thanks Keith. 


Modified:
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/CodegenBean.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ImagePanel.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OptionPane.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OutPutPane.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondFrame.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ResourceChooser.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/XMLSelectionPage.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/CodegenBean.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/CodegenBean.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/CodegenBean.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/bean/CodegenBean.java Wed Oct 25 23:18:48 2006
@@ -62,6 +62,12 @@
     private String portName;
     private String databindingName;
 
+    public void setNamespace2packageList(String namespace2packageList) {
+        this.namespace2packageList = namespace2packageList;
+    }
+
+    private String namespace2packageList;
+
     private boolean defaultClient = true;
 
     Project project;
@@ -213,6 +219,12 @@
 	       optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION, new CommandLineOption(
 	    		   CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION, new String[0]));
        }
+
+        //ns2pkg mapping
+       if (namespace2packageList!= null){
+	       optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.NAME_SPACE_TO_PACKAGE_OPTION, new CommandLineOption(
+	    		   CommandLineOptionConstants.WSDL2JavaConstants.NAME_SPACE_TO_PACKAGE_OPTION, getStringArray(namespace2packageList)));
+       }
         return optionMap;
 
     }
@@ -363,7 +375,6 @@
                 codegenConfig.setBaseURI(getBaseUri(WSDLFileName));
                 new CodeGenerationEngine(codegenConfig).generate();
             } catch (Throwable e1) {
-                e1.printStackTrace();
                 throw new Exception("Code generation failed due to " + e.getLocalizedMessage());
             }
         } finally {
@@ -475,6 +486,25 @@
         }
         return null;
     }
+
+    /**
+	 * Returns the namespace map from definition
+	 * @return
+	 */
+	public Collection getDefinitionNamespaceMap(){
+
+        Map namespaces = wsdlDefinition.getNamespaces();
+        ArrayList list = new ArrayList();
+        String target = wsdlDefinition.getTargetNamespace();
+        Iterator iterator = namespaces.values().iterator();
+        while (iterator.hasNext())
+        {
+            String namespace = (String)iterator.next();
+            if (!(namespace.equalsIgnoreCase(target)))
+                list.add(namespace);
+        }
+        return list;
+	}
 
 
 }

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/BottomPanel.java Wed Oct 25 23:18:48 2006
@@ -5,7 +5,6 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;
-import java.io.PrintWriter;
 import java.io.StringWriter;
 
 /*
@@ -80,7 +79,7 @@
             java2CodeFrame.backButtonImpl();
         }
         else if (obj == btnCancel) {
-            java2CodeFrame.setVisible(false);
+            java2CodeFrame.dispose();
             Thread.currentThread().setContextClassLoader(java2CodeFrame.getClassLoader());
         } else if (obj == btnFinish) {
 
@@ -103,17 +102,15 @@
                     try {
                         java2CodeFrame.generateDefaultClientCode(temp);
                     } catch (Exception e1) {
-                        e1.printStackTrace();
                         StringWriter writer = new StringWriter();
-                        e1.printStackTrace(new PrintWriter(writer));
                         JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
                                 "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
-                        java2CodeFrame.setVisible(false);
+                        java2CodeFrame.dispose();
                     }
 
                     JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration successful!",
                             "Axis2 codegeneration", JOptionPane.INFORMATION_MESSAGE);
-                    java2CodeFrame.setVisible(false);
+                    java2CodeFrame.dispose();
                     return;
 
                 }
@@ -135,12 +132,10 @@
 
                         java2CodeFrame.deleteDirectory(temp);
                     } catch (Exception e1) {
-                        e1.printStackTrace();
                     StringWriter writer = new StringWriter();
-                    e1.printStackTrace(new PrintWriter(writer));
                     JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
                             "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
-                    java2CodeFrame.setVisible(false);
+                    java2CodeFrame.dispose();
                     }
 
                 }
@@ -152,12 +147,10 @@
                     java2CodeFrame.generatecode();
 
                 } catch (Exception e1) {
-                    e1.printStackTrace();
                     StringWriter writer = new StringWriter();
-                    e1.printStackTrace(new PrintWriter(writer));
                     JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
                             "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
-                    java2CodeFrame.setVisible(false);
+                    java2CodeFrame.dispose();
                 }
                 }
             } else if (selected.equalsIgnoreCase("radDefaultServer")) {
@@ -171,12 +164,10 @@
 
                         java2CodeFrame.generateDefaultServerCode(temp, (String) java2CodeFrame.outputpane.cmbModuleSrc.getSelectedItem());
                     } catch (Exception e1) {
-                        e1.printStackTrace();
                         StringWriter writer = new StringWriter();
-                        e1.printStackTrace(new PrintWriter(writer));
                         JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
                                 "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
-                        java2CodeFrame.setVisible(false);
+                        java2CodeFrame.dispose();
                     }
 
 
@@ -187,12 +178,10 @@
                         try {
                             java2CodeFrame.generateDefaultServerCodeCustomLocation(path);
                         } catch (Exception e1) {
-                            e1.printStackTrace();
                             StringWriter writer = new StringWriter();
-                            e1.printStackTrace(new PrintWriter(writer));
                             JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
                                     "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
-                            java2CodeFrame.setVisible(false);
+                            java2CodeFrame.dispose();
                         }
 
                     } else {
@@ -216,12 +205,10 @@
                         java2CodeFrame.generateDefaultClientCode(temp2);
 
                     } catch (Exception e1) {
-                        e1.printStackTrace();
                         StringWriter writer = new StringWriter();
-                        e1.printStackTrace(new PrintWriter(writer));
                         JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
                                 "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
-                        java2CodeFrame.setVisible(false);
+                        java2CodeFrame.dispose();
                     }
 
                 } else {
@@ -233,12 +220,10 @@
                             File temp2 = java2CodeFrame.optionPane.setDefaultClientConfigurations();
                             java2CodeFrame.generateDefaultClientCode(temp2);
                         } catch (Exception e1) {
-                            e1.printStackTrace();
                             StringWriter writer = new StringWriter();
-                            e1.printStackTrace(new PrintWriter(writer));
                             JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration failed!" + writer.toString(),
                                     "Axis2 codegeneration", JOptionPane.ERROR_MESSAGE);
-                            java2CodeFrame.setVisible(false);
+                            java2CodeFrame.dispose();
                         }
 
                     } else {
@@ -253,7 +238,7 @@
 
             JOptionPane.showMessageDialog(java2CodeFrame, "Code genaration successful!",
                     "Axis2 codegeneration", JOptionPane.INFORMATION_MESSAGE);
-            java2CodeFrame.setVisible(false);
+            java2CodeFrame.dispose();
 
         } else if (obj == btnNext) {
 

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/FirstPanel.java Wed Oct 25 23:18:48 2006
@@ -61,7 +61,7 @@
         btnBrowse.addActionListener(this);
 
 
-        Dimension dim = new Dimension(450, 400);
+        Dimension dim = new Dimension(450, 600);
         setSize(dim);
         fc.setFileFilter(new WSDLFileFilter());
 
@@ -181,7 +181,7 @@
 
         Insets insets = parent.getInsets();
         dim.width = 541 + insets.left + insets.right;
-        dim.height = 300 + insets.top + insets.bottom;
+        dim.height = 600 + insets.top + insets.bottom;
 
         return dim;
     }

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ImagePanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ImagePanel.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ImagePanel.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/ImagePanel.java Wed Oct 25 23:18:48 2006
@@ -36,6 +36,9 @@
         ImageLayout customLayout = new ImageLayout();
         setLayout(customLayout);
 
+        java.net.URL resource = ImagePanel.class.getResource("/icons/asf-feather.png");
+        apachelogo = new ImageIcon(resource);
+
         lblImage = new JLabel(apachelogo);
         add(lblImage);
         lblImage.setBackground(Color.white);

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/Java2CodeFrame.java Wed Oct 25 23:18:48 2006
@@ -51,7 +51,6 @@
     OptionPane optionPane;
     private int panleID = 0;
     private ClassLoader classLoader;
-    Axi2PluginPage pluginPage;
 
     // To keep the value of wsdl wizzard
     private CodegenBean codegenBean;
@@ -92,10 +91,9 @@
         outputpane.setVisible(false);
         getContentPane().add(outputpane);
 
-        Dimension dim = new Dimension(450, 400);
+        Dimension dim = new Dimension(450, 600);
         setSize(dim);
         setBounds(200, 200, dim.width, dim.height);
-        this.setResizable(false);
     }
 
     public void setProject(Project project) {
@@ -126,7 +124,7 @@
             copyDirectory(new File(temp + File.separator + "resources"), new File(output + File.separator + ".." + File.separator + "resources"));
 
         } catch (Exception e1) {
-            e1.printStackTrace();
+            throw e1;
         }
         finally {
 
@@ -143,7 +141,7 @@
             codegenBean.generate();
 
         } catch (Exception e1) {
-            e1.printStackTrace();
+            throw e1;
         }
         
     }
@@ -196,7 +194,7 @@
             String wsdl = codegenBean.getWSDLFileName();
             final String name = wsdl.substring(wsdl.lastIndexOf(File.separatorChar) + 1, wsdl.lastIndexOf(".")) + "-stub.jar";
             System.out.println(name);
-            File lib = new File(codegenBean.getActiveProject().getProjectFile().getParent().getPath() + File.separator + "lib");
+            final File lib = new File(codegenBean.getActiveProject().getProjectFile().getParent().getPath() + File.separator + "lib");
             if (!lib.isDirectory()) {
                 lib.mkdir();
             }
@@ -207,19 +205,23 @@
             final LibraryTable table = (LibraryTable) project.getComponent(LibraryTable.class);
 
 
-            String url = VirtualFileManager.constructUrl(JarFileSystem.PROTOCOL, lib.getAbsolutePath() + File.separator + name) + JarFileSystem.JAR_SEPARATOR;
 
-            final VirtualFile jarVirtualFile = VirtualFileManager.getInstance().findFileByUrl(url);
 
             ApplicationManager.getApplication().runWriteAction(new
                     Runnable() {
                         public void run() {
-                            Library myLibrary = table.createLibrary(name);
 
+                            String url = VirtualFileManager.constructUrl(JarFileSystem.PROTOCOL, lib.getAbsolutePath() + File.separator + name) + JarFileSystem.JAR_SEPARATOR;
+
+
+
+                            VirtualFile jarVirtualFile = VirtualFileManager.getInstance().findFileByUrl(url);
+                            Library myLibrary = table.createLibrary(name);
                             Library.ModifiableModel libraryModel = myLibrary.getModifiableModel();
                             libraryModel.addRoot(jarVirtualFile, OrderRootType.CLASSES);
                             libraryModel.commit();
 
+
                         }
                     });
         } catch (Exception e1) {
@@ -271,6 +273,15 @@
                 break;
             }
             case 3: {
+                String result;
+                if (this.optionPane.radCustom.isSelected() && (result = validatePackageNames()) != null)
+                {
+                    JOptionPane.showMessageDialog(this, "The package name " + result + " is not a valid package name",
+                                "Error!!!", JOptionPane.INFORMATION_MESSAGE);
+                    panleID--;
+                    break;
+                }
+
                 panel_3.setCaptions("  Output"
                         , "  set the output project for the generated code");
                 this.secondPanel.setVisible(false);
@@ -285,6 +296,30 @@
         }
     }
 
+    public String validatePackageNames(){
+        if (!validatePackageName(this.secondPanel.txtPacakgeName.getText()))
+        return this.secondPanel.txtPacakgeName.getText();
+
+        for(int count=0;count<this.secondPanel.table.getRowCount();count++){
+            if(!validatePackageName((String)this.secondPanel.table.getValueAt(count,1)))
+            return (String)this.secondPanel.table.getValueAt(count,1);
+        }
+        return null;
+    }
+
+    public boolean validatePackageName(String name){
+        if (name.trim().equalsIgnoreCase(""))
+        return false;
+        String[] parts = new String[10];
+         parts = name.split("\\.");
+        for(int count=0;count<parts.length;count++)
+        {
+            if (parts[count].trim().equalsIgnoreCase(""))
+            return false;
+        }
+        return true;
+    }
+
     public void backButtonImpl(){
         panleID--;
         switch (panleID) {
@@ -381,7 +416,7 @@
 
         Insets insets = parent.getInsets();
         dim.width = 550 + insets.left + insets.right;
-        dim.height = 460 + insets.top + insets.bottom;
+        dim.height = 600 + insets.top + insets.bottom;
 
         return dim;
     }
@@ -400,23 +435,23 @@
         }
         c = parent.getComponent(1);
         if (c.isVisible()) {
-            c.setBounds(insets.left, insets.top + 80, 550, 340);
+            c.setBounds(insets.left, insets.top + 80, 600, 480);
         }
         c = parent.getComponent(3);
         if (c.isVisible()) {
-            c.setBounds(insets.left, insets.top + 80, 550, 330);
+            c.setBounds(insets.left, insets.top + 80, 600, 480);
         }
         c = parent.getComponent(4);
         if (c.isVisible()) {
-            c.setBounds(insets.left, insets.top + 80, 550, 330);
+            c.setBounds(insets.left, insets.top + 80, 600, 480);
         }
         c = parent.getComponent(5);
         if (c.isVisible()) {
-            c.setBounds(insets.left, insets.top + 80, 550, 330);
+            c.setBounds(insets.left, insets.top + 80, 600, 480);
         }
         c = parent.getComponent(2);
         if (c.isVisible()) {
-            c.setBounds(insets.left, insets.top + 415, 550, 50);
+            c.setBounds(insets.left, insets.top + 550, 600, 50);
         }
     }
 }

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OptionPane.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OptionPane.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OptionPane.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OptionPane.java Wed Oct 25 23:18:48 2006
@@ -198,7 +198,7 @@
 
             Insets insets = parent.getInsets();
             dim.width = 565 + insets.left + insets.right;
-            dim.height = 300 + insets.top + insets.bottom;
+            dim.height = 600 + insets.top + insets.bottom;
 
             return dim;
         }

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OutPutPane.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OutPutPane.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OutPutPane.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/OutPutPane.java Wed Oct 25 23:18:48 2006
@@ -202,7 +202,7 @@
 
         Insets insets = parent.getInsets();
         dim.width = 611 + insets.left + insets.right;
-        dim.height = 57 + insets.top + insets.bottom;
+        dim.height = 600 + insets.top + insets.bottom;
 
         return dim;
     }

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondFrame.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondFrame.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/idea/SecondFrame.java Wed Oct 25 23:18:48 2006
@@ -1,13 +1,18 @@
 package org.apache.axis2.tools.idea;
 
 import org.apache.axis2.tools.bean.CodegenBean;
+import org.apache.axis2.util.URLProcessor;
 
 import javax.swing.*;
+import javax.swing.table.TableModel;
 import javax.swing.border.BevelBorder;
 import javax.xml.namespace.QName;
 import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.util.Map;
+import java.util.Iterator;
+import java.util.Collection;
 
 import com.intellij.openapi.module.Module;
 /*
@@ -65,6 +70,12 @@
 
     ButtonGroup generationType;
 
+    PackageNameTableModel model;
+
+    JLabel lblPackageMapping;
+
+    JTable table;
+
     CodegenBean codegenBean;
     java.util.List serviceNameList;
 
@@ -170,7 +181,17 @@
         all.addActionListener(this);
         add(all);
 
-        Dimension dim = new Dimension(450, 350);
+        JSeparator packageSep = new JSeparator(JSeparator.HORIZONTAL);
+        add(packageSep);
+
+        lblPackageMapping = new JLabel("Namespace to Package Mapping");
+        add(lblPackageMapping);
+
+        model = new PackageNameTableModel(new Object [1][2]);
+        table = new JTable(model);
+        add(new JScrollPane(table));
+
+        Dimension dim = new Dimension(450, 600);
         setSize(dim);
     }
 
@@ -181,6 +202,8 @@
     }
 
     public void setStatus(){
+        loadNamespaces(codegenBean.getDefinitionNamespaceMap());
+        table.updateUI();
         txtPacakgeName.setText(codegenBean.packageFromTargetNamespace());
         cmbServiceName.removeAllItems();
         serviceNameList = codegenBean.getServiceList();
@@ -191,6 +214,34 @@
         cmbServiceName.setSelectedIndex(0);
     }
 
+    /**
+	 * Loads the namespaces
+	 * @param namespaceMap
+	 */
+	private void loadNamespaces(Collection namespaceMap){
+		Iterator namespaces = namespaceMap.iterator();
+        Object tableData [][] = new Object[namespaceMap.size()][2];
+        int i = 0;
+        while(namespaces.hasNext()){
+
+           String namespace = (String)namespaces.next();
+           tableData[i][0] = namespace;
+           tableData[i][1] = getPackageFromNamespace(namespace);
+           i++;
+        }
+
+        model.setTableData(tableData);
+
+
+    }
+
+    /**
+	 * get the package derived by  Namespace
+	 */
+	public String getPackageFromNamespace(String namespace){
+		return  URLProcessor.makePackageName(namespace);
+	}
+
     public void fillBean() {
         int index = cmbLan.getSelectedIndex();
         switch (index) {
@@ -253,8 +304,27 @@
         codegenBean.setPackageName(txtPacakgeName.getText());
         codegenBean.setServiceName(cmbServiceName.getSelectedItem().toString());
         codegenBean.setServiceName(cmbPortName.getSelectedItem().toString());
+        codegenBean.setNamespace2packageList(getNs2PkgMapping());
     }
 
+    /**
+	 * get the package to namespace mappings
+	 * @return
+	 */
+	public String getNs2PkgMapping(){
+		String returnList="";
+		String packageValue;
+		for (int i=0;i<table.getRowCount();i++){
+			packageValue = (String)table.getValueAt(i,1);
+				returnList = returnList +
+				             ("".equals(returnList)?"":",") +
+				             (String)table.getValueAt(i,0)+ "=" + packageValue;
+
+
+		}
+		return "".equals(returnList)?null:returnList;
+	}
+
     public void actionPerformed(ActionEvent e) {
         Object obj = e.getSource();
         if (obj == cmbServiceName) {
@@ -338,7 +408,7 @@
 
         Insets insets = parent.getInsets();
         dim.width = 575 + insets.left + insets.right;
-        dim.height = 500 + insets.top + insets.bottom;
+        dim.height = 600 + insets.top + insets.bottom;
 
         return dim;
     }
@@ -471,6 +541,23 @@
         c = parent.getComponent(21);
         if (c.isVisible()) {
             c.setBounds(insets.left + 8, insets.top + 310, 200, 24);
+        }
+
+        // JSeperator
+
+        c = parent.getComponent(22);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 8, insets.top + 337, 530, 2);
+        }
+
+        c = parent.getComponent(23);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 8, insets.top + 340, 250, 24);
+        }
+
+        c = parent.getComponent(24);
+        if (c.isVisible()) {
+            c.setBounds(insets.left + 8, insets.top + 370, 522, 85);
         }
 
 

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java Wed Oct 25 23:18:48 2006
@@ -5,6 +5,7 @@
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Calendar;
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
@@ -32,17 +33,66 @@
 
     private boolean singleService = false;
     private boolean generetServiceDesc = false;
-    private File classLocation;
+    private ArrayList classLocation = new ArrayList();
+    private File classLoc;
     private ClassLoader classLoader;
     private String ServiceXML;
 
     public String fileSeparator = System.getProperty("file.separator");
 
-    private ArrayList libs;
-    private ArrayList wsdls;
+    private ArrayList libs = new ArrayList();
+    private ArrayList tempLibs = new ArrayList();
+    private ArrayList tempWsdls = new ArrayList();
+
+
+    private ArrayList wsdls = new ArrayList();
 
     private String outPath;
     private String archiveName;
+    private ArrayList servicelsit = new ArrayList();
+
+
+    public ArrayList getTempWsdls() {
+        return tempWsdls;
+    }
+
+    public void setTempWsdls(ArrayList tempWsdls) {
+        this.tempWsdls = tempWsdls;
+    }
+
+    public ArrayList getTempLibs() {
+        return tempLibs;
+    }
+
+    public void setTempLibs(ArrayList tempLibs) {
+        this.tempLibs = tempLibs;
+    }
+
+    public File getClassLoc() {
+        return classLoc;
+    }
+
+    public void setClassLoc(File classLoc) {
+        this.classLoc = classLoc;
+    }
+
+    public ArrayList getServicelsit() {
+        return servicelsit;
+    }
+
+    public void addToServicelsit(ServiceObj service) {
+        for (int count =0;count<servicelsit.size();count++)
+        {
+            if (((ServiceObj)servicelsit.get(count)).getServiceName().equalsIgnoreCase(service.getServiceName()))
+            {
+                servicelsit.remove(count);
+                servicelsit.add(service);
+                return;
+            }
+
+        }
+        servicelsit.add(service);
+    }
 
     public boolean isSingleService() {
         return singleService;
@@ -60,12 +110,12 @@
         this.generetServiceDesc = generetServiceDesc;
     }
 
-    public File getClassLocation() {
+    public ArrayList getClassLocation() {
         return classLocation;
     }
 
-    public void setClassLocation(File classLocation) {
-        this.classLocation = classLocation;
+    public void addClassLocation(File classLocation) {
+        this.classLocation.add(classLocation);
     }
 
     public String getServiceXML() {
@@ -80,16 +130,16 @@
         return libs;
     }
 
-    public void setLibs(ArrayList libs) {
-        this.libs = libs;
+    public void addLibs(ArrayList libs) {
+        this.libs.addAll(libs);
     }
 
     public ArrayList getWsdls() {
         return wsdls;
     }
 
-    public void setWsdls(ArrayList wsdls) {
-        this.wsdls = wsdls;
+    public void addWsdls(ArrayList wsdls) {
+        this.wsdls.addAll(wsdls);
     }
 
     public String getOutPath() {
@@ -108,14 +158,13 @@
         this.archiveName = archiveName;
     }
 
-    public void finsh() {
+    public void finsh() throws Exception {
         //Creating out File
         try {
             File outFile = new File(getOutPath());
-            File tempfile = new File(outFile, "temp");
-            if (!tempfile.exists()) {
-                tempfile.mkdirs();
-            }
+            String time = Calendar.getInstance().getTime().toString().replace(':', '-');
+            File tempfile = new File(outFile, "temp-" + time);
+            tempfile.mkdir();
             //creating META-INF
             File metainf = new File(tempfile, "META-INF");
             if (!metainf.exists()) {
@@ -131,19 +180,24 @@
 
             //Coping class files
             FileCopier fc = new FileCopier();
-            fc.copyFiles(getClassLocation(), tempfile, null);
+            for (int count=0;count<classLocation.size();count++)
+            fc.copyFiles((File)classLocation.get(count), tempfile, null);
 
             // Coping wsdl files
             File lib = new File(tempfile, "lib");
             if (!lib.exists()) {
                 lib.mkdir();
             }
+            if (libs!=null)
+            {
             for (int i = 0; i < libs.size(); i++) {
                 String libname = (String) libs.get(i);
                 fc.copyFiles(new File(libname), lib, null);
             }
+            }
 
             //coping wsdl files
+            if (wsdls!=null)
             for (int i = 0; i < wsdls.size(); i++) {
                 String libname = (String) wsdls.get(i);
                 fc.copyFiles(new File(libname), metainf, null);
@@ -158,12 +212,9 @@
             //craeting the jar file
             deleteDir(tempfile);
 //
-        } catch (FileNotFoundException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+
         } catch (Exception e) {
-            e.printStackTrace();
+            throw e;
         }
     }
 

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java Wed Oct 25 23:18:48 2006
@@ -48,7 +48,7 @@
     }
 
     public String toString() {
-        String serviceXML = "<service name=\"" + serviceName + "\"  scope=\"transportsession\">\n" +
+        String serviceXML = "<service name=\"" + serviceName + "\" >\n" +
                 "<description>\n" +
                 "Please Type your service description here\n" +
                 "</description>\n" +

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/Axi2PluginPage.java Wed Oct 25 23:18:48 2006
@@ -64,7 +64,6 @@
 
         butOK = new JButton("OK");
         butOK.addActionListener(this);
-        //setResizable(false);
         add(butOK);
 
         butCancle = new JButton("Cancel");
@@ -99,12 +98,16 @@
             if (javawsdl.isSelected()) {
 
                 win = new Java2CodeFrame();
+                win.setResizable(false);
+                win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                 win.setProject(project);
                 win.pack();
                 win.show();
                 
             } else {
                 ServiceArciveFrame window = new ServiceArciveFrame();
+                window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                window.setResizable(false);
                 window.setTitle("Service Archive creation");
                 window.show();
             }

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/BottomPanel.java Wed Oct 25 23:18:48 2006
@@ -88,18 +88,30 @@
         }
         if (obj == butNext) {
             ((ObjectKeeper) currentPanel).fillBean(bean);
+            if (currentPanel instanceof SelectPanel){
+               ((SelectPanel)currentPanel).process(); 
+            }
+            if(currentPanel instanceof FirstFrame){
+                parent.setEnable(true, false, false, true);
+            }
             currentPanel = ((ObjectKeeper) currentPanel).getNext();
+
+
             parent.Next(currentPanel);
-            if (currentPanel instanceof DescriptorFile) {
-                parent.setEnable(false, true, false, true);
-            }
+
         } else if (obj == btnFinsh) {
             ((ObjectKeeper) currentPanel).fillBean(bean);
-            bean.finsh();
+            try {
+                bean.finsh();
+            } catch (Exception e1) {
+               JOptionPane.showMessageDialog(parent, "An error occured while creating the service archieve",
+                    "Error!", JOptionPane.ERROR_MESSAGE);
+            parent.dispose();
+            }
 
             JOptionPane.showMessageDialog(parent, "Service creation successful!",
                     "Axis2 Service creation", JOptionPane.INFORMATION_MESSAGE);
-            parent.setVisible(false);
+            parent.dispose();
 
         } else if (obj == butBack) {
             currentPanel = ((ObjectKeeper) currentPanel).getPrivious();

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ClassSelctionPage.java Wed Oct 25 23:18:48 2006
@@ -60,17 +60,19 @@
         add(txtClassDir);
         txtClassDir.setBounds(insets.left + 136, insets.top + 24, 336, 24);
 
-        butSelect = new JButton(" ... ");
+        butSelect = new JButton("Browse...");
         add(butSelect);
         butSelect.addActionListener(this);
-        butSelect.setBounds(insets.left + 480, insets.top + 24, 56, 24);
+        butSelect.setBounds(insets.left + 480, insets.top + 24, 90, 24);
         setSize(getPreferredSize());
 //        this.parent.setEnable(true, false, false, true);
 //        this.parent.reShow();
+
+
     }
 
     public void fillBean(ArchiveBean bean) {
-        bean.setClassLocation(file);
+        bean.setClassLoc(file);
     }
 
     //to keep a refernce to next panel
@@ -79,6 +81,7 @@
 
     public JPanel getNext() {
         ResourceChooser res = new ResourceChooser(parent);
+        parent.setEnable(true,true,false,true);
         res.setPrivious(this);
         return res;
 //        return selectPanel;
@@ -111,11 +114,11 @@
                 file = parent.fc.getSelectedFile();
                 parent.fc.setCurrentDirectory(file);
                 txtClassDir.setText(file.getAbsolutePath());
-                parent.setEnable(false, true, false, true);
+                parent.setEnable(true, true, false, true);
 //                selectPanel = new SelectPanel(parent,file);
 //                selectPanel.setPrivious(this);
             } else {
-                txtClassDir.setText("No File");
+                txtClassDir.setText("");
                 parent.setEnable(true, false, false, true);
             }
         }

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/DescriptorFile.java Wed Oct 25 23:18:48 2006
@@ -86,6 +86,7 @@
 
     public JPanel getNext() {
         OutPage out = new OutPage(parent);
+        parent.setEnable(true, true, false, true);
         out.setPrivious(this);
         return out;
     }

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/FirstFrame.java Wed Oct 25 23:18:48 2006
@@ -91,6 +91,7 @@
     public JPanel getNext() {
         boolean singleservice = radioSingle.isSelected();
         boolean generateXML = radioGenerate.isSelected();
+        
         if (singleservice && generateXML) {
             parent.singleService = true;
             parent.generateServiceXML = true;

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/OutPage.java Wed Oct 25 23:18:48 2006
@@ -46,7 +46,6 @@
     public OutPage(ServiceArciveFrame parent) {
         this.parent = parent;
         OutPageLayout customLayout = new OutPageLayout();
-
         setFont(new Font("Helvetica", Font.PLAIN, 12));
         setLayout(customLayout);
 
@@ -56,7 +55,7 @@
         txtoutput = new JTextField(".");
         add(txtoutput);
 
-        butselect = new JButton("Select");
+        butselect = new JButton("Browse...");
         butselect.addActionListener(this);
         add(butselect);
 
@@ -157,7 +156,7 @@
         }
         c = parent.getComponent(2);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 488, insets.top + 16, 72, 24);
+            c.setBounds(insets.left + 488, insets.top + 16, 90, 24);
         }
         c = parent.getComponent(3);
         if (c.isVisible()) {

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ResourceChooser.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ResourceChooser.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ResourceChooser.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ResourceChooser.java Wed Oct 25 23:18:48 2006
@@ -50,7 +50,6 @@
     JButton butaddwsdl;
     JList listwsdl;
     JScrollPane sp_listwsdl;
-    JButton butDone;
     private DefaultListModel listModellibs;
     private DefaultListModel listModellwsdls;
     private JPanel previous;
@@ -75,7 +74,7 @@
         butLoad.addActionListener(this);
         add(butLoad);
 
-        butselect = new JButton("...");
+        butselect = new JButton("Browse...");
         butselect.addActionListener(this);
         add(butselect);
 
@@ -90,7 +89,7 @@
         txtwsdl = new JTextField("");
         add(txtwsdl);
 
-        butSelectwsdl = new JButton("...");
+        butSelectwsdl = new JButton("Browse...");
         butSelectwsdl.addActionListener(this);
         add(butSelectwsdl);
 
@@ -103,17 +102,22 @@
         sp_listwsdl = new JScrollPane(listwsdl);
         add(sp_listwsdl);
 
-        butDone = new JButton("Done");
-        butDone.addActionListener(this);
-        add(butDone);
-        setSize(getPreferredSize());
+   setSize(getPreferredSize());
 
     }
 
     public void actionPerformed(ActionEvent e) {
         Object obj = e.getSource();
         if (obj == butLoad) {
+            File lib = new File(txtLibs.getText());
+            if (lib.isFile() ) {
+                if( !listModellibs.contains(txtLibs.getText()))
             listModellibs.addElement(txtLibs.getText());
+            }
+            else{
+                JOptionPane.showMessageDialog(parent, "The file selected is not a valid jar file",
+                    "Axis2 ServiceArchieve creation", JOptionPane.ERROR_MESSAGE);
+            }
         } else if (obj == butselect) {
             fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
             int returnVal = fc.showOpenDialog(this);
@@ -135,9 +139,15 @@
                 txtwsdl.setText("");
             }
         } else if (obj == butaddwsdl) {
+            File wsdl = new File(txtwsdl.getText());
+            if (wsdl.isFile()){
+                if(!listModellwsdls.contains(txtwsdl.getText()))
             listModellwsdls.addElement(txtwsdl.getText());
-        } else if (obj == butDone) {
-            parent.setEnable(false, true, false, true);
+            }
+            else{
+                JOptionPane.showMessageDialog(parent, "The file selected is not a valid jar file",
+                    "Axis2 ServiceArchieve creation", JOptionPane.ERROR_MESSAGE);
+            }
         }
     }
 
@@ -161,7 +171,7 @@
             count++;
         }
         try {
-            urllist[count] = bean.getClassLocation().toURL();
+            urllist[count] = bean.getClassLoc().toURL();
         } catch (MalformedURLException e) {
 
         }
@@ -173,14 +183,14 @@
 //            String s = (String) enumerator.nextElement();
 //            libs.add(s);
 //        }
-        bean.setLibs(libs);
+        bean.setTempLibs(libs);
         enumerator = listModellwsdls.elements();
         ArrayList wsdls = new ArrayList();
         while (enumerator.hasMoreElements()) {
             String s = (String) enumerator.nextElement();
             wsdls.add(s);
         }
-        bean.setWsdls(wsdls);
+        bean.setTempWsdls(wsdls);
     }
 
 
@@ -198,15 +208,25 @@
     }
 
     public JPanel getNext() {
+
+
+
+
         if (parent.generateServiceXML) {
-            SelectPanel sp = new SelectPanel(parent, parent.bean.getClassLocation());
+            parent.setEnable(true, false, false, true);
+            SelectPanel sp = new SelectPanel(parent, parent.bean.getClassLoc());
+            
+            
             sp.setPrivious(this);
             return sp;
         } else {
             DescriptorFile dis = new DescriptorFile(parent, parent.bean.getServiceXML());
+            parent.setEnable(true, true, false, true);
             dis.setPrivious(this);
             return dis;
         }
+
+
 //        OutPage op = new OutPage(parent);
 //        op.setPrivious(this);
 //        return op;
@@ -254,47 +274,43 @@
         Component c;
         c = parent.getComponent(0);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 16, insets.top + 16, 128, 24);
+            c.setBounds(insets.left + 16, insets.top + 16, 100, 24);
         }
         c = parent.getComponent(1);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 152, insets.top + 16, 312, 24);
+            c.setBounds(insets.left + 120, insets.top + 16, 300, 24);
         }
         c = parent.getComponent(2);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 496, insets.top + 16, 72, 24);
+            c.setBounds(insets.left + 530, insets.top + 16, 60, 24);
         }
         c = parent.getComponent(3);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 472, insets.top + 16, 16, 24);
+            c.setBounds(insets.left + 430, insets.top + 16, 90, 24);
         }
         c = parent.getComponent(4);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 152, insets.top + 48, 312, 72);
+            c.setBounds(insets.left + 120, insets.top + 48, 300, 72);
         }
         c = parent.getComponent(5);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 16, insets.top + 128, 128, 24);
+            c.setBounds(insets.left + 16, insets.top + 128, 100, 24);
         }
         c = parent.getComponent(6);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 152, insets.top + 128, 312, 24);
+            c.setBounds(insets.left + 120, insets.top + 128, 300, 24);
         }
         c = parent.getComponent(7);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 472, insets.top + 128, 16, 24);
+            c.setBounds(insets.left + 430, insets.top + 128, 90, 24);
         }
         c = parent.getComponent(8);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 496, insets.top + 128, 72, 24);
+            c.setBounds(insets.left + 530, insets.top + 128, 60, 24);
         }
         c = parent.getComponent(9);
         if (c.isVisible()) {
-            c.setBounds(insets.left + 152, insets.top + 160, 312, 64);
-        }
-        c = parent.getComponent(10);
-        if (c.isVisible()) {
-            c.setBounds(insets.left + 248, insets.top + 225, 72, 24);
+            c.setBounds(insets.left + 120, insets.top + 160, 300, 72);
         }
     }
 }

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/SelectPanel.java Wed Oct 25 23:18:48 2006
@@ -46,7 +46,6 @@
     protected JTextField txtClassDir;
     protected JTextField txtServiceName;
     protected JButton butSelect;
-    protected JButton butDone;
     protected JButton load;
     protected JScrollPane sp;
     protected JLabel tablelbl;
@@ -58,9 +57,10 @@
     protected String fileName;
     protected int count = 1;
     protected HashMap operations;
-    protected ArrayList servicelsit = new ArrayList();
     protected DescriptorFile disfile;
+    protected ClassSelctionPage classPage;
     protected String sgXMl;
+    ArrayList servicelsit;
 
     public SelectPanel(ServiceArciveFrame parent, File file) {
         this.parent = parent;
@@ -73,34 +73,30 @@
 
         lblClass = new JLabel("Select Service Classes");
         add(lblClass);
-        lblClass.setBounds(insets.left + 8, insets.top + 2, 150, 24);
+        lblClass.setBounds(insets.left + 8, insets.top + 2, 130, 24);
 
         txtClassDir = new JTextField("");
         add(txtClassDir);
-        txtClassDir.setBounds(insets.left + 150, insets.top + 2, 336, 24);
+        txtClassDir.setBounds(insets.left + 140, insets.top + 2, 280, 24);
 
-        butSelect = new JButton(" ... ");
+        butSelect = new JButton("Browse...");
         add(butSelect);
         butSelect.addActionListener(this);
-        butSelect.setBounds(insets.left + 487, insets.top + 2, 10, 24);
+        butSelect.setBounds(insets.left + 420, insets.top + 2, 90, 24);
 
 
         load = new JButton(" Load ");
         add(load);
         load.addActionListener(this);
-        load.setBounds(insets.left + 502, insets.top + 2, 70, 24);
+        load.setBounds(insets.left + 512, insets.top + 2, 70, 24);
+
 
-        butDone = new JButton("Done");
-        butDone.addActionListener(this);
-        add(butDone);
-        butDone.setBounds(insets.left + 250, insets.top + 185, 70, 24);
         lblServiceNam = new JLabel("Service Name : ");
         add(lblServiceNam);
         lblServiceNam.setBounds(insets.left + 10, insets.top + 185, 100, 24);
         txtServiceName = new JTextField("");
         add(txtServiceName);
         txtServiceName.setBounds(insets.left + 115, insets.top + 185, 120, 24);
-        butDone.setVisible(false);
         lblServiceNam.setVisible(false);
         txtServiceName.setVisible(false);
         setSize(getPreferredSize());
@@ -108,7 +104,10 @@
     }
 
     public void fillBean(ArchiveBean bean) {
+        bean.addClassLocation(bean.getClassLoc());
         bean.setServiceXML(sgXMl);
+        bean.addLibs(bean.getTempLibs());
+        bean.addWsdls(bean.getTempWsdls());
     }
 
     //to keep a refernce to next panel
@@ -117,6 +116,12 @@
     }
 
     public JPanel getNext() {
+        parent.setEnable(true, true, false, true);
+        if (classPage != null) {
+
+         classPage.setPrivious(this);
+            return classPage;
+        }
         return disfile;
     }
 
@@ -158,14 +163,13 @@
                 }
             }
         } else if (obj == load) {
-            if (file == null) {
+            if (file == null || fileName ==null) {
                 return;
             }
             try {
                 try {
                     this.remove(sp);
                     this.remove(tablelbl);
-                    butDone.setVisible(false);
                     lblServiceNam.setVisible(false);
                     txtServiceName.setVisible(false);
                 } catch (Exception e1) {
@@ -200,18 +204,33 @@
                 sp.setAutoscrolls(true);
                 sp.setBounds(insets.left + 10, insets.top + 75, 550, 100);
                 txtServiceName.setText("MyService" + count);
-                butDone.setVisible(true);
                 lblServiceNam.setVisible(true);
                 txtServiceName.setVisible(true);
+                parent.setEnable(true,true,false,true);
             } catch (ClassNotFoundException e1) {
                 JOptionPane.showMessageDialog(parent, "The specified file is not a valid java class",
                             "Error!", JOptionPane.ERROR_MESSAGE);
             }
+             catch (NoClassDefFoundError e1) {
+                JOptionPane.showMessageDialog(parent, "The specified file is not a valid java class",
+                            "Error!", JOptionPane.ERROR_MESSAGE);
+            }
             parent.repaint();
 
-        } else if (obj == butDone) {
+        }
+    }
+
+    public String getTopLable() {
+        return "Service class and operation selection";
+    }
+
+    public String getLable() {
+        return "First select service class and load its method operations";
+    }
+
+    public void process(){
 
-            ArrayList ops = new ArrayList();
+        ArrayList ops = new ArrayList();
             Iterator opitr = operations.values().iterator();
             while (opitr.hasNext()) {
                 OperationObj operationObj = (OperationObj) opitr.next();
@@ -221,7 +240,8 @@
             }
 
             ServiceObj service = new ServiceObj(txtServiceName.getText(), fileName, ops);
-            servicelsit.add(service);
+
+            parent.bean.addToServicelsit(service);
             if (!parent.singleService) {
                 int valu = JOptionPane.showConfirmDialog(parent, "Do you want to add an another service to group", "Service Archive",
                         JOptionPane.YES_NO_OPTION);
@@ -231,16 +251,17 @@
                     try {
                         this.remove(sp);
                         this.remove(tablelbl);
-                        butDone.setVisible(false);
                         lblServiceNam.setVisible(false);
                         txtServiceName.setVisible(false);
                     } catch (Exception e1) {
 //                    e1.printStackTrace();
                     }
+                    classPage = new ClassSelctionPage(parent);
                     count++;
                     parent.reShow();
                     this.repaint();
                 } else {
+                    servicelsit = parent.bean.getServicelsit();
                     parent.setEnable(false, true, false, true);
                     sgXMl = "<serviceGroup>\n";
                     for (int i = 0; i < servicelsit.size(); i++) {
@@ -252,6 +273,7 @@
                     disfile.setPrivious(this);
                 }
             } else {
+                servicelsit = parent.bean.getServicelsit();
                 parent.setEnable(false, true, false, true);
                 sgXMl = "<serviceGroup>\n";
                 for (int i = 0; i < servicelsit.size(); i++) {
@@ -261,45 +283,9 @@
                 sgXMl = sgXMl + "</serviceGroup>";
                 disfile = new DescriptorFile(parent, sgXMl);
                 disfile.setPrivious(this);
-            }
 
-//            int valu = JOptionPane.showConfirmDialog(parent,"Do you want to add an another service to group","Service Archive",
-//                    JOptionPane.YES_NO_OPTION);
-//            if(valu == 0){
-//                txtClassDir.setText("");
-//                fileName = "";
-//                try {
-//                    this.remove(sp);
-//                    this.remove(tablelbl);
-//                    butDone.setVisible(false);
-//                    lblServiceNam.setVisible(false);
-//                    txtServiceName.setVisible(false);
-//                } catch (Exception e1) {
-////                    e1.printStackTrace();
-//                }
-//                count ++;
-//                parent.reShow();
-//                this.repaint();
-//            } else {
-//                parent.setEnable(false,true,false,true);
-//                sgXMl = "<serviceGroup>\n";
-//                for (int i = 0; i < servicelsit.size(); i++) {
-//                    ServiceObj serviceObj = (ServiceObj) servicelsit.get(i);
-//                    sgXMl = sgXMl + serviceObj.toString();
-//                }
-//                sgXMl = sgXMl + "</serviceGroup>";
-//                disfile = new DescriptorFile(parent,sgXMl);
-//                disfile.setPrivious(this);
-//            }
-        }
-    }
-
-    public String getTopLable() {
-        return "Service class and operation selection";
-    }
+            }
 
-    public String getLable() {
-        return "First select service class and load its method operations";
     }
 
 
@@ -332,6 +318,8 @@
         }
         return ext;
     }
+
+
 
 }
 }

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/ServiceArciveFrame.java Wed Oct 25 23:18:48 2006
@@ -68,14 +68,15 @@
         bottomPanel.setBounds(insets.left, insets.top + 328, 608, 60);
         setSize(getPreferredSize());
         setResizable(false);
+        
 
     }
 
     public void setEnable(boolean back, boolean next, boolean finish, boolean cancel) {
         if (currentpanle instanceof FirstFrame) {
-            bottomPanel.setEnable(false, next, finish, cancel);
+            bottomPanel.setEnable(back, next, finish, cancel);
         } else {
-            bottomPanel.setEnable(true, next, finish, cancel);
+            bottomPanel.setEnable(back, next, finish, cancel);
         }
 
     }
@@ -90,7 +91,7 @@
         getContentPane().add(current);
         current.setBounds(insets.left, insets.top + 80, 608, 260);
         currentpanle = current;
-        setEnable(true, false, false, true);
+        
         reShow();
     }
 

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/XMLSelectionPage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/XMLSelectionPage.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/XMLSelectionPage.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/frames/XMLSelectionPage.java Wed Oct 25 23:18:48 2006
@@ -60,7 +60,7 @@
         txtService = new JTextField("");
         add(txtService);
 
-        butSelect = new JButton("Select");
+        butSelect = new JButton("Browse...");
         butSelect.addActionListener(this);
         add(butSelect);
 
@@ -70,23 +70,24 @@
         txtclass = new JTextField("");
         add(txtclass);
 
-        bustSelectclss = new JButton("Select");
+        bustSelectclss = new JButton("Browse...");
         bustSelectclss.addActionListener(this);
         add(bustSelectclss);
 
         selectxml.setBounds(insets.left + 16, insets.top + 16, 168, 24);
         txtService.setBounds(insets.left + 192, insets.top + 16, 288, 24);
-        butSelect.setBounds(insets.left + 488, insets.top + 16, 72, 24);
+        butSelect.setBounds(insets.left + 488, insets.top + 16, 90, 24);
 
         selctclass.setBounds(insets.left + 16, insets.top + 45, 168, 24);
         txtclass.setBounds(insets.left + 192, insets.top + 45, 288, 24);
-        bustSelectclss.setBounds(insets.left + 488, insets.top + 45, 72, 24);
+        bustSelectclss.setBounds(insets.left + 488, insets.top + 45, 90, 24);
 
         setSize(getPreferredSize());
     }
 
     public void fillBean(ArchiveBean bean) {
-        bean.setClassLocation(file);
+        bean.addClassLocation(file);
+        bean.setClassLoc(file);
         bean.setServiceXML(value);
     }
 
@@ -104,9 +105,18 @@
     }
 
     public JPanel getNext() {
+
+        ResourceChooser resourceChooser = new ResourceChooser(parent);
+        parent.setEnable(true,true,false,true);
+        resourceChooser.setPrivious(this);
+        return resourceChooser;
+
+
+        /*
         DescriptorFile disfile = new DescriptorFile(parent, value);
         disfile.setPrivious(this);
         return disfile;
+        */
     }
 
     //to keep a refernce to previous panel
@@ -126,9 +136,10 @@
             if (returnVal == JFileChooser.APPROVE_OPTION) {
                 file = parent.fc.getSelectedFile();
                 txtclass.setText(file.getAbsolutePath());
+                if ((new File(txtService.getText())).isFile())
                 parent.setEnable(false, true, false, true);
             } else {
-                txtclass.setText("No File");
+                txtclass.setText("");
                 parent.setEnable(true, false, false, true);
             }
 
@@ -153,9 +164,10 @@
                 } catch (IOException e1) {
                 }
                 txtService.setText(file.getAbsolutePath());
+                if ((new File(txtclass.getText())).isDirectory())
                 parent.setEnable(false, true, false, true);
             } else {
-                txtService.setText("No File");
+                txtService.setText("");
                 parent.setEnable(true, false, false, true);
             }
 

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java?view=diff&rev=467886&r1=467885&r2=467886
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java (original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java Wed Oct 25 23:18:48 2006
@@ -45,6 +45,8 @@
 
         if (form == null) {
             form = new Axi2PluginPage();
+            form.setResizable(false);
+            form.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         }
         if (myIcon == null) {
             java.net.URL resource = Axis2IdeaPlugin.class.getResource("/icons/icon.png");



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org