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 pr...@apache.org on 2007/07/28 00:08:13 UTC

svn commit: r560403 [3/3] - in /webservices/axis2/branches/java/jaxws21: ./ modules/adb-codegen/src/org/apache/axis2/schema/ modules/adb/src/org/apache/axis2/databinding/typemapping/ modules/codegen/src/org/apache/axis2/wsdl/ modules/codegen/src/org/ap...

Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/axis2/tools/wizardframe/WizardFrame.java Fri Jul 27 15:08:09 2007
@@ -21,10 +21,13 @@
 import org.apache.axis2.tools.component.*;
 import org.apache.axis2.tools.bean.WsdlgenBean;
 import org.apache.axis2.tools.bean.CodegenBean;
+import org.apache.axis2.tools.bean.SrcCompiler;
 import org.apache.axis2.tools.idea.ProgressBarPanel;
 import org.apache.axis2.tools.idea.FirstPanel;
 import org.apache.axis2.tools.idea.SecondPanel;
 import org.apache.axis2.tools.idea.WSDL2JavaOutputPanel;
+import org.apache.ideaplugin.bean.ArchiveBean;
+import org.apache.ideaplugin.bean.JarFileWriter;
 
 import javax.swing.*;
 import java.awt.*;
@@ -48,11 +51,10 @@
     private JLabel panelImageLabel;
     private JLabel panelTopTitleLabel;
     private JLabel panelBottomTitleLabel;
-    private JLabel errorLabel;
-    private JPanel errorPanel;
     private WizardComponents wizardComponents;
     protected WsdlgenBean wsdlgenBean;
     protected CodegenBean codegenBean;
+    protected ArchiveBean archiveBean;
     protected Project project;
     private ProgressBarPanel progress;
 
@@ -63,6 +65,10 @@
     private void init() {
 
         wizardComponents = new DefaultWizardComponents();
+        wsdlgenBean= new WsdlgenBean();
+        codegenBean = new CodegenBean();
+        archiveBean =new ArchiveBean();
+
 
         this.getContentPane().setLayout(new GridBagLayout());
         this.getContentPane().add(createTitlePanel()
@@ -96,8 +102,8 @@
                         ,GridBagConstraints.EAST, GridBagConstraints.NONE,
                         new Insets(10, 10, 10, 10), 0, 0));
 
-        ImageIcon  img=new ImageIcon("icons/icon.png");
-        this.setIconImage(img.getImage());
+        java.net.URL resource = WizardPanel.class.getResource("/icons/icon.png");           
+        this.setIconImage(new ImageIcon(resource).getImage());
         this.setFont(new Font("Helvetica", Font.PLAIN, 8));
 
         wizardComponents.addPropertyChangeListener(new PropertyChangeListener() {
@@ -105,8 +111,7 @@
                 setPanelTopTitle(((WizardPanel)event.getNewValue()).getPanelTopTitle());
                 setPanelTitleImage(((WizardPanel)event.getNewValue()).getPanelImage());
                 setPanelBottomTitle(((WizardPanel)event.getNewValue()).getPanelBottomTitle());
-                setErrorVisible(false
-                        ,((WizardPanel)event.getNewValue()).getError());
+                setTitle(((WizardPanel)event.getNewValue()).getFrameTitle());
             }
         });
         wizardComponents.setFinishAction(createFinishAction());
@@ -124,14 +129,10 @@
 
     public void show() {
         wizardComponents.updateComponents();
+        this.setSize(600,600);
+        Utilities.centerComponentOnScreen(this);
         super.show();
     }
-      // set error message
-    protected void setErrorVisible(boolean flag ,String  error){
-        errorLabel.setText(error);
-        errorPanel.setVisible(flag);
-
-    }
     protected void setBottomVisible(boolean flag){
         panelBottomTitleLabel.setVisible(flag);
     }
@@ -158,22 +159,10 @@
         panelTopTitleLabel.setFont(new Font("Helvetica", Font.BOLD, 12));
 
         panelBottomTitleLabel=new JLabel();
+        panelBottomTitleLabel.setFont(new Font("Helvetica", Font.ITALIC, 10));
 
         panelImageLabel= new JLabel();
 
-        errorLabel = new JLabel();
-        errorLabel.setVisible(false);
-        errorLabel.setBackground(Color.blue);
-
-        errorPanel =new JPanel();
-        errorPanel .setLayout(new GridBagLayout());
-        errorPanel .setBorder(BorderFactory.createLineBorder(Color.black));
-
-        errorPanel.add(errorLabel,
-                new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
-                , GridBagConstraints.CENTER, GridBagConstraints.BOTH
-                , new Insets(10, 10, 0, 10), 0, 0));
-
         panel.add(panelTopTitleLabel
                 , new GridBagConstraints(0, 0, 1, 1, 0.5, 0.0
                 , GridBagConstraints.LINE_START , GridBagConstraints.BOTH
@@ -189,12 +178,6 @@
                 , GridBagConstraints.CENTER, GridBagConstraints.BOTH
                 , new Insets(0, 0, 0, 0), 0, 0));
 
-
-        panel.add(errorPanel
-                , new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
-                , GridBagConstraints.SOUTH, GridBagConstraints.BOTH
-                , new Insets(20, 0, 0, 0), 0, 0));
-
         return panel;
 
     }
@@ -222,12 +205,17 @@
                             doFinishJava2WSDL();
                             System.out.println("FinishAction Java2WSDL performed");
                             break;
+                         case WizardPanel.SERVICE_ARCHIVE_TYPE:
+                            doFinishServiceArchive();
+                            System.out.println("FinishAction Servcie Archive performed");
+                            break;
                         case WizardPanel.UNSPECIFIED_TYPE:
                             break; //Do nothing
                         default:
                             throw new RuntimeException("Invalid state!");
                     }
                 } catch (Exception e) {
+                     wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
                      dispose();
                 }
 
@@ -238,6 +226,7 @@
     protected CancelAction createCancelAction() {
         return new CancelAction(wizardComponents) {
             public void performAction() {
+                wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
                 System.out.println("CancelAction performed");
                 dispose();
             }
@@ -245,6 +234,7 @@
     }
 
     protected void handleWindowClosing() {
+        wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
         this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
         this.addWindowListener(new WindowAdapter() {
             public void windowClosing(WindowEvent e) {
@@ -271,6 +261,7 @@
                 "Code genaration Successful !" + writer.toString(),
                 "Axis2 code generation",
                 JOptionPane.INFORMATION_MESSAGE );
+        wizardComponents.setCurrentIndex(CodegenFrame.PANEL_CHOOSER);
         dispose();
     }
 
@@ -351,8 +342,8 @@
     }
     protected void doFinishWSDL2Java(){
         handlePragress();
-        new java.util.Timer(true).schedule(new TimerTask() {
-            public void run() {
+       new java.util.Timer(true).schedule(new TimerTask() {
+           public void run() {
                 try {
                     FirstPanel  first=(FirstPanel)wizardComponents.getWizardPanel(1);
                     SecondPanel option=(SecondPanel)wizardComponents.getWizardPanel(3);
@@ -382,24 +373,81 @@
                     codegenBean.setOutput(output.getOutputLocation());
                     codegenBean.setNamespace2packageList(option.getNs2PkgMapping());
                     codegenBean.setWSDLFileName(first.getWSDLFileName());
-                    codegenBean.generate();
+                    codegenBean.generate();                      
+                     //Add the codegen libs that are coming with the plugin to the project lib that has been created
+                 if (output.getAxis2PluginLibCopyCheckBoxSelection()){
+                     java.net.URL resource = WizardPanel.class.getResource("/icons/icon.png");
+                     String path =new File(resource.getPath()).getParentFile().getParentFile().getParentFile().getPath();
+                     System.out.println(path);
+                     String pluginLibLocation = path+File.separator+"lib";
+                	 addLibsToProjectLib(pluginLibLocation, output.getOutputLocation());
+                 }
+
+                 //Add the libraries on the plugin lib directory to the created project lib
+                 if (output.getAxisLibCopyCheckBoxSelection() && output.oktoLoadLibs()){
+                	 String libDirectory = output.getAxisJarsLocation();
+                	 addLibsToProjectLib(libDirectory, output.getOutputLocation());
+                 }
+
+                 //This will Create a jar file from the codegen results and add to the output
+                 //locations lib directory
+                 if (output.getCreateJarCheckBoxSelection()){
+                     File tempClassFile=codegenBean.getTemp();
+                     tempClassFile.mkdir();
+                     File srcTemp=new File(tempClassFile.getPath()+File.separator+"src");
+                     srcTemp.mkdir();
+                     copyDirectory(new File(output.getOutputLocation()+File.separator+"src"),srcTemp);
+                     //Compile the source to another directory
+                	 SrcCompiler srcCompileTool = new SrcCompiler();
+                	 srcCompileTool.compileSource(tempClassFile.getPath());
+                     //create the jar file and add that to the lib directory
+                	 String projectLib = output.getOutputLocation()+File.separator+"lib";
+                	 JarFileWriter jarFileWriter = new JarFileWriter();
+                	 String jarFileName = "CodegenResults.jar";
+                	 if (!output.getJarFilename().equals("")){
+                		 jarFileName=output.getJarFilename();
+                	 }
+                	 output.setJarFileName(jarFileName);
+                      File tempClass = new File(tempClassFile.getPath()+File.separator+"classes");
+                     jarFileWriter.writeJarFile(new File(projectLib), jarFileName, tempClass);
+
+                	 //Delete the temp folders
+                	 deleteDir(tempClassFile );
+
+                 }
                     progress.setVisible(false);
                     handleSuccess();
                 }catch (Exception e1) {
+                    e1.printStackTrace();
                     progress.setVisible(false);
                     handleError();
                 }
             }
-        }, 1000);
+        }, 5000);
 
     }
 
     protected void doFinishJava2WSDL(){
         handlePragress();
         new java.util.Timer(true).schedule(new TimerTask() {
-            public void run() {
+           public void run() {
                 try {
                     wsdlgenBean.generate();
+                    progress.setVisible(false);
+                    handleSuccess();
+                } catch (Exception e1) {
+                    progress.setVisible(false);
+                    handleError();
+                }
+            }
+       }, 3100);
+    }
+     protected void doFinishServiceArchive(){
+       handlePragress();
+        new java.util.Timer(true).schedule(new TimerTask() {
+            public void run() {
+                 try {
+                    archiveBean.finsh();
                     progress.setVisible(false);
                     handleSuccess();
                 } catch (Exception e1) {

Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ArchiveBean.java Fri Jul 27 15:08:09 2007
@@ -38,20 +38,15 @@
     private File classLoc;
     private ClassLoader classLoader;
     private String ServiceXML;
-
     public String fileSeparator = System.getProperty("file.separator");
-
     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();
-
+    private boolean includeClass=false;
 
     public ArrayList getTempWsdls() {
         return tempWsdls;
@@ -139,8 +134,8 @@
         return wsdls;
     }
 
-    public void addWsdls(ArrayList wsdls) {
-        this.wsdls.addAll(wsdls);
+    public void addWsdls(File wsdl) {
+        this.wsdls.add(wsdl);
     }
 
     public String getOutPath() {
@@ -158,6 +153,13 @@
     public void setArchiveName(String archiveName) {
         this.archiveName = archiveName;
     }
+    public void setIncludeClass(boolean includeClass){
+        this.includeClass=includeClass;
+    }
+    public boolean getIncludeClass(){
+        return this.includeClass;
+    }
+
 
     public void finsh() throws Exception {
         //Creating out File
@@ -181,9 +183,13 @@
 
             //Coping class files
             FileCopier fc = new FileCopier();
-            for (int count=0;count<classLocation.size();count++)
-            fc.copyFiles((File)classLocation.get(count), tempfile, null);
-
+            if(includeClass){
+                for (int count=0;count<classLocation.size();count++)
+                    fc.copyFiles((File)classLocation.get(count), tempfile, ".class");
+            }else{
+                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()) {
@@ -192,16 +198,16 @@
             if (libs!=null)
             {
             for (int i = 0; i < libs.size(); i++) {
-                String libname = (String) libs.get(i);
-                fc.copyFiles(new File(libname), lib, null);
+                      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);
+                File libname = (File)wsdls.get(i);
+                fc.copyFiles(libname, metainf, null);
             }
 
             String arcivename = getArchiveName();
@@ -212,7 +218,6 @@
             jwriter.writeJarFile(outFile, arcivename, tempfile);
             //craeting the jar file
             deleteDir(tempfile);
-//
 
         } catch (Exception e) {
             throw e;

Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/bean/ServiceObj.java Fri Jul 27 15:08:09 2007
@@ -50,18 +50,24 @@
 
     public String toString() {
         String serviceXML = "<service name=\"" + serviceName + "\" >\n" +
-                "<description>\n" +
-                "Please Type your service description here\n" +
-                "</description>\n" +
-                "<parameter name=\"ServiceClass\" locked=\"false\">" + serviceClass + "</parameter>\n";
+                "   <description>\n" +
+                "       Please Type your service description here\n" +
+                "   </description>\n" +
+                "   <messageReceivers>\n"+
+                "       <messageReceiver mep=\"http://www.w3.org/2004/08/wsdl/in-only\" \n"+
+                "       class=\"org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver\" />\n "+
+                "       <messageReceiver mep=\"http://www.w3.org/2004/08/wsdl/in-out\"\n " +
+                "       class=\"org.apache.axis2.rpc.receivers.RPCMessageReceiver\" /> \n" +
+                "   </messageReceivers>\n "+
+                "   <parameter name=\"ServiceClass\" locked=\"false\">" + serviceClass + "</parameter>\n";
         if (operations.size() > 0) {
-            serviceXML = serviceXML + "<excludeOperations>\n";
+            serviceXML = serviceXML + " <excludeOperations>\n";
             for (int i = 0; i < operations.size(); i++) {
                 String s = (String) operations.get(i);
-                String op = "<operation>" + s + "</operation>\n";
+                String op = "       <operation>" + s + "</operation>\n";
                 serviceXML = serviceXML + op;
             }
-            serviceXML = serviceXML + "</excludeOperations>\n";
+            serviceXML = serviceXML + " </excludeOperations>\n";
         }
         serviceXML = serviceXML + "</service>\n";
         return serviceXML;

Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-idea-plugin/src/main/java/org/apache/ideaplugin/plugin/Axis2IdeaPlugin.java Fri Jul 27 15:08:09 2007
@@ -22,13 +22,13 @@
 import com.intellij.openapi.options.Configurable;
 import com.intellij.openapi.options.ConfigurationException;
 import com.intellij.openapi.project.Project;
-import org.apache.ideaplugin.frames.Axi2PluginPage;
+import org.apache.axis2.tools.wizardframe.CodegenFrame;
 
 import javax.swing.*;
 import javax.xml.stream.XMLInputFactory;
 
 public class Axis2IdeaPlugin implements ApplicationComponent, Configurable {
-    private Axi2PluginPage form;
+    private CodegenFrame form;
     private ImageIcon myIcon;
 
     /**
@@ -45,8 +45,8 @@
         }
 
         if (form == null) {
-            form = new Axi2PluginPage();
-            form.setResizable(false);
+            form = new CodegenFrame();
+            form.setResizable(true);
             form.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         }
         if (myIcon == null) {
@@ -85,7 +85,7 @@
 
     public JComponent createComponent() {
         if (form == null) {
-            form = new Axi2PluginPage();
+            form = new CodegenFrame();
         }
         return form.getRootComponent();
     }

Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-java2wsdl-maven-plugin/src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/axis2-java2wsdl-maven-plugin/src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-java2wsdl-maven-plugin/src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-java2wsdl-maven-plugin/src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java Fri Jul 27 15:08:09 2007
@@ -23,6 +23,8 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
+import java.util.Properties;
+import java.util.ArrayList;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.AbstractMojo;
@@ -43,6 +45,10 @@
  * @requiresDependencyResolution compile
  */
 public class Java2WSDLMojo extends AbstractMojo {
+    public static final String OPEN_BRACKET = "[";
+    public static final String CLOSE_BRACKET = "]";
+    public static final String COMMA = ",";
+
     /**
      * The maven project.
      * @parameter expression="${project}"
@@ -95,6 +101,72 @@
      */
     private String outputFileName;
 
+    /**
+     * Style for the wsdl
+     * @parameter expression="${axis2.java2wsdl.style}"
+     */
+    private String style;
+
+    /**
+     * Use for the wsdl
+     * @parameter expression="${axis2.java2wsdl.use}"
+     */
+    private String use;
+
+    /**
+     * Version for the wsdl
+     * @parameter expression="${axis2.java2wsdl.wsdlVersion}"
+     */
+    private String wsdlVersion;
+
+    /**
+     * Namespace Generator
+     * @parameter expression="${axis2.java2wsdl.nsGenClassName}"
+     */
+    private String nsGenClassName;
+
+    /**
+     * Schema Generator
+     * @parameter expression="${axis2.java2wsdl.nsGenClassName}"
+     */
+    private String schemaGenClassName;
+
+    /**
+     * Location URI in the wsdl
+     * @parameter expression="${axis2.java2wsdl.locationUri}"
+     */
+    private String locationUri;
+
+    /**
+     * attrFormDefault setting for the schema
+     * @parameter expression="${axis2.java2wsdl.attrFormDefault}"
+     */
+    private String attrFormDefault;
+
+    /**
+     * elementFormDefault setting for the schema
+     * @parameter expression="${axis2.java2wsdl.elementFormDefault}"
+     */
+    private String elementFormDefault;
+
+    /**
+     * Switch on the Doc/Lit/Bare style schema
+     * @parameter expression="${axis2.java2wsdl.docLitBare}"
+     */
+    private String docLitBare;
+
+    /**
+     * Additional classes for which we need to generate schema
+     * @parameter expression="${axis2.java2wsdl.extraClasses}"
+     */
+    private String[] extraClasses;
+
+    /**
+     * Specify namespaces explicitly for packages
+     * @parameter expression="${axis2.java2wsdl.package2Namespace}"
+     */
+    private Properties package2Namespace;
+
     private void addToOptionMap(Map map, String option, String value) {
         addToOptionMap(map, option, new String[]{value});
     }
@@ -106,6 +178,13 @@
         }
     }
 
+    private void addToOptionMap(Map map, String option, ArrayList values) {
+        if (values != null && !values.isEmpty()) {
+            map.put(option,
+                    new Java2WSDLCommandLineOption(option, values));
+        }
+    }
+
     /**
      * Fills the option map. This map is passed onto
      * the code generation API to generate the code.
@@ -157,6 +236,63 @@
         addToOptionMap( optionMap,
                         Java2WSDLConstants.CLASSPATH_OPTION,
                         artifactFileNames);
+
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.STYLE_OPTION,
+                style);
+
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.USE_OPTION,
+                use);
+
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.WSDL_VERSION_OPTION,
+                wsdlVersion);
+
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.DOC_LIT_BARE,
+                docLitBare);
+
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.LOCATION_OPTION,
+                locationUri);
+
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.NAMESPACE_GENERATOR_OPTION,
+                nsGenClassName);
+
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.SCHEMA_GENERATOR_OPTION,
+                schemaGenClassName);
+
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.ATTR_FORM_DEFAULT_OPTION,
+                attrFormDefault);
+
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.ELEMENT_FORM_DEFAULT_OPTION,
+                elementFormDefault);
+
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.EXTRA_CLASSES_DEFAULT_OPTION,
+                extraClasses);
+
+        ArrayList list = new ArrayList();
+        Iterator iterator = package2Namespace.entrySet().iterator();
+
+        while (iterator.hasNext()) {
+            Map.Entry entry = (Map.Entry) iterator.next();
+            String packageName = (String) entry.getKey();
+            String namespace = (String) entry.getValue();
+            list.add(OPEN_BRACKET +
+                    packageName +
+                    COMMA +
+                    namespace +
+                    CLOSE_BRACKET);
+        }
+        addToOptionMap(optionMap,
+                Java2WSDLConstants.JAVA_PKG_2_NSMAP_OPTION,
+                list);
 
         return optionMap;
     }

Modified: webservices/axis2/branches/java/jaxws21/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java Fri Jul 27 15:08:09 2007
@@ -41,6 +41,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Properties;
 
 
 /**
@@ -180,6 +181,83 @@
      */
     private boolean generateServerSideInterface = false;
 
+    /**
+     * @parameter expression="${axis2.wsdl2code.repositoryPath}"
+     */
+    private String repositoryPath = null;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.externalMapping}"
+     */
+    private String externalMapping = null;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.wsdlVersion}"
+     */
+    private String wsdlVersion = null;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.targetSourceFolderLocation}"
+     */
+    private String targetSourceFolderLocation = null;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.targetResourcesFolderLocation}"
+     */
+    private String targetResourcesFolderLocation = null;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.unwrap}" default-value="false" *
+     */
+    private boolean unwrap = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.allPorts}" default-value="false" *
+     */
+    private boolean allPorts = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.backwardCompatible}" default-value="false" *
+     */
+    private boolean backwardCompatible = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.flattenFiles}" default-value="false" *
+     */
+    private boolean flattenFiles = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.skipMessageReceiver}" default-value="false" *
+     */
+    private boolean skipMessageReceiver = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.skipBuildXML}" default-value="false" *
+     */
+    private boolean skipBuildXML = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.skipWSDL}" default-value="false" *
+     */
+    private boolean skipWSDL = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.overWrite}" default-value="false" *
+     */
+    private boolean overWrite = false;
+
+    /**
+     * @parameter expression="${axis2.wsdl2code.suppressPrefixes}" default-value="false" *
+     */
+    private boolean suppressPrefixes = false;
+
+    /**
+     * Specify databinding specific extra options
+     *
+     * @parameter expression="${axis2.java2wsdl.options}"
+     */
+    private Properties options;
+
     /** @parameter expression="${axis2.wsdl2code.namespaceToPackages}" */
     private String namespaceToPackages = null;
 
@@ -351,6 +429,131 @@
                             CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION,
                             new String[0]));
         }
+
+        if (unwrap) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.UNWRAP_PARAMETERS,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.UNWRAP_PARAMETERS,
+                            new String[0]));
+        }
+
+        if (allPorts) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.All_PORTS_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.All_PORTS_OPTION,
+                            new String[0]));
+        }
+
+        if (backwardCompatible) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.BACKWORD_COMPATIBILITY_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.BACKWORD_COMPATIBILITY_OPTION,
+                            new String[0]));
+        }
+
+        if (flattenFiles) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.FLATTEN_FILES_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.FLATTEN_FILES_OPTION,
+                            new String[0]));
+        }
+
+        if (skipMessageReceiver) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.NO_MESSAGE_RECEIVER_OPTION_LONG,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.NO_MESSAGE_RECEIVER_OPTION_LONG,
+                            new String[0]));
+        }
+
+        if (skipBuildXML) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.NO_BUILD_XML_OPTION_LONG,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.NO_BUILD_XML_OPTION_LONG,
+                            new String[0]));
+        }
+
+        if (skipWSDL) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.NO_WSDLS_OPTION_LONG,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.NO_WSDLS_OPTION_LONG,
+                            new String[0]));
+        }
+
+        if (overWrite) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.OVERRIDE_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.OVERRIDE_OPTION,
+                            new String[0]));
+        }
+
+        if (suppressPrefixes) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.SUPPRESS_PREFIXES_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.SUPPRESS_PREFIXES_OPTION,
+                            new String[0]));
+        }
+
+        if (repositoryPath != null) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.REPOSITORY_PATH_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.REPOSITORY_PATH_OPTION,
+                            new String[]{repositoryPath}));
+        }
+
+        if (externalMapping != null) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION,
+                            new String[]{externalMapping}));
+        }
+
+        if (wsdlVersion != null) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.WSDL_VERSION_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.WSDL_VERSION_OPTION,
+                            new String[]{wsdlVersion}));
+        }
+
+        if (targetSourceFolderLocation != null) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION,
+                            new String[]{targetSourceFolderLocation}));
+        }
+
+        if (targetResourcesFolderLocation != null) {
+            optionMap.put(
+                    CommandLineOptionConstants.WSDL2JavaConstants.RESOURCE_FOLDER_OPTION,
+                    new CommandLineOption(
+                            CommandLineOptionConstants.WSDL2JavaConstants.RESOURCE_FOLDER_OPTION,
+                            new String[]{targetResourcesFolderLocation}));
+        }
+
+        Iterator iterator = options.entrySet().iterator();
+        while (iterator.hasNext()) {
+            Map.Entry entry = (Map.Entry) iterator.next();
+            String key = CommandLineOptionConstants.WSDL2JavaConstants.EXTRA_OPTIONTYPE_PREFIX + entry.getKey();
+            String value = (String) entry.getValue();
+            optionMap.put(
+                    key,
+                    new CommandLineOption(
+                            key,
+                            new String[]{value}));
+        }
+
         optionMap.put(
                 CommandLineOptionConstants.WSDL2JavaConstants.SERVICE_NAME_OPTION,
                 new CommandLineOption(

Modified: webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java (original)
+++ webservices/axis2/branches/java/jaxws21/modules/xmlbeans/src/org/apache/axis2/xmlbeans/CodeGenerationUtility.java Fri Jul 27 15:08:09 2007
@@ -28,6 +28,7 @@
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.axis2.wsdl.WSDLUtil;
 import org.apache.axis2.wsdl.codegen.CodeGenConfiguration;
+import org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension;
 import org.apache.axis2.wsdl.databinding.DefaultTypeMapper;
 import org.apache.axis2.wsdl.databinding.JavaTypeMapper;
 import org.apache.axis2.wsdl.databinding.TypeMapper;
@@ -174,6 +175,7 @@
                     .toArray(new XmlSchema[completeSchemaList.size()]));
             er.setBaseUri(cgconfig.getBaseURI());
 
+            String xsdConfigFile = (String)cgconfig.getProperties().get(XMLBeansExtension.XSDCONFIG_OPTION);
 
             sts = XmlBeans.compileXmlBeans(
                     // set the STS name; defaults to null, which makes the generated class
@@ -182,7 +184,7 @@
                     null,
                     convertToSchemaArray(topLevelSchemaList),
                     new Axis2BindingConfig(cgconfig.getUri2PackageNameMap(),
-                                           cgconfig.getXsdConfigFile()),
+                                           xsdConfigFile),
                     XmlBeans.getContextTypeLoader(),
                     new Axis2Filer(cgconfig),
                     new XmlOptions().setEntityResolver(er));

Modified: webservices/axis2/branches/java/jaxws21/xdocs/articles.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/xdocs/articles.xml?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/xdocs/articles.xml (original)
+++ webservices/axis2/branches/java/jaxws21/xdocs/articles.xml Fri Jul 27 15:08:09 2007
@@ -97,6 +97,19 @@
 Axis2 Session Management</a>- By Deepal Jayasinghe</li>
 <li><a href="http://www.devx.com/Java/Article/33839">Apache Axis2
 with POJO's and Spring</a>- By Ramanujam A. Rao</li>
+
+<li><a href=
+"http://www-128.ibm.com/developerworks/webservices/library/ws-axis2soap/">
+Six ways the Axis2 deployment model is more user friendly</a>- By Deepal Jayasinghe</li>
+<li><a href="http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html">
+Invoking Web Services using Apache Axis2
+</a>- By Deepal Jayasinghe</li>
+<li><a href="http://wso2.org/library/2060">
+Writing Your Own services.xml for Axis2 Web Services</a>- By Deepal Jayasinghe</li>
+<li><a href="http://wso2.org/library/2068">
+ADB Generated Code in Apache Axis2</a>- By Amila Suriarachchi</li>
+
+
 </ul>
 <h2>Tutorials</h2>
 <ul>

Modified: webservices/axis2/branches/java/jaxws21/xdocs/index.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/xdocs/index.xml?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/xdocs/index.xml (original)
+++ webservices/axis2/branches/java/jaxws21/xdocs/index.xml Fri Jul 27 15:08:09 2007
@@ -64,7 +64,7 @@
 Reference Library</a> for a list of technical resources that should
 prove useful on this project.</p>
 <h3><em>Why Apache Axis2:</em></h3>
-<p>A new architecture for Axis was introduced during the August
+<p>A new architecture for Axis2 was introduced during the August
 2004 Summit in Colombo, Sri Lanka. The new architecture on which
 Axis2 is based on is more flexible, efficient and configurable in
 comparison to <a href=

Modified: webservices/axis2/branches/java/jaxws21/xdocs/maven-help.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/xdocs/maven-help.xml?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/xdocs/maven-help.xml (original)
+++ webservices/axis2/branches/java/jaxws21/xdocs/maven-help.xml Fri Jul 27 15:08:09 2007
@@ -31,9 +31,9 @@
 <body lang="en" xml:lang="en">
 <h1 align="center">Quick Guide to Maven for Axis 2.0</h1>
 <h2 align="left">Introduction</h2>
-<p align="left"><a href="http://maven.apache.org">Maven</a> is used
-as the build tool of Axis 2.0. This document will provide a quick
-guide on how to use Maven with your developments.</p>
+<p align="left"><a href="http://maven.apache.org">Maven 2</a> is used
+as the build environment for Axis2. This document will provide a quick
+guide on how to use Maven with our project.</p>
 <h2 align="left">Commands</h2>
 <table border="1" align="center">
 <tbody>
@@ -46,78 +46,37 @@
 </th>
 </tr>
 <tr>
-<td>
-<div align="left">maven</div>
-</td>
-<td>
-<div align="left">Downloads relevant jars if not available, and
-compiles and runs the tests in the system.</div>
-</td>
-</tr>
-<tr>
-<td>maven clean</td>
-<td>Cleans all the content built so far in the target folder. This
-will not clean the jar repository.</td>
-</tr>
-<tr>
-<td>
-<div align="left">maven test</div>
-</td>
-<td>
-<div align="left">Runs only the tests. Performs automatic
-compilation of the changed sources as well. This will not run SOAP
-interop tests</div>
-</td>
-</tr>
-<tr>
-<td>
-<div align="left">maven clean all-tests</div>
-</td>
-<td>
-<div align="left">Cleans up and runs all offline and online
-tests</div>
-</td>
-</tr>
-<tr>
-<td>
-<div align="left">maven itest</div>
-</td>
-<td>
-<div align="left">To run the online-mode tests for say the
-modules/integration, run "maven itest" from
-modules/integration</div>
-</td>
+<td>mvn clean</td>
+<td>Cleans all the content built so far in the target/ folder. This
+will not delete jars from your local repository.</td>
 </tr>
 <tr>
 <td>
-<div align="left">maven test itest</div>
+<div align="left">mvn test</div>
 </td>
 <td>
-<div align="left">To run all the tests for say the
-modules/integration, run "maven test itest" from
-modules/integration</div>
+<div align="left">Builds any changed artifacts, and then runs our basic test suite.</div>
 </td>
 </tr>
 <tr>
 <td>
-<div align="left">maven -g</div>
+<div align="left">mvn clean test</div>
 </td>
 <td>
-<div align="left">Lists down all the commands available with
-Maven.</div>
+<div align="left">Cleans up, rebuilds everything from scratch, and then runs the basic test suite.</div>
 </td>
 </tr>
 <tr>
 <td>
-<div align="left">maven multiproject</div>
+<div align="left">mvn site</div>
 </td>
 <td>
-<div align="left">Generates the site.</div>
+<div align="left">Generates the website in target/site/</div>
 </td>
 </tr>
 <tr>
 <td>
-<div align="left">maven idea:multiproject</div>
+<div align="left">mvn idea:idea</div>
 </td>
 <td>
 <div align="left">Generates IDEA .ipr, .iml and .iws project
@@ -126,7 +85,7 @@
 </tr>
 <tr>
 <td>
-<div align="left">maven -Dmaven.test.skip=true</div>
+<div align="left">mvn -Dtest=false</div>
 </td>
 <td>
 <div align="left"></div>
@@ -134,20 +93,5 @@
 </tr>
 </tbody>
 </table>
-<br />
-<h2 align="left">Maven FAQ</h2>
-<p><i>1. I have problems with Maven 1.1</i></p>
-<p style="text-indent: 10pt">It seems that Maven 1.1 doesn't come
-bundled with the required itest plug-in and artifact plug-in. Run
-the following to get it updated.<br /></p>
-<ol>
-<li>maven plugin:download -DgroupId=maven-itest-plugin
--DartifactId=maven-itest-plugin -Dversion=1.0
--Dmaven.repo.remote=http://www.openejb.org/maven,http://www.ibiblio.org/maven</li>
-<li>maven plugin:Download -DgroupId=maven
--DartifactId=maven-artifact-plugin -Dversion=1.6</li>
-</ol>
-<p align="left"></p>
-<p align="left"></p>
 </body>
 </html>

Modified: webservices/axis2/branches/java/jaxws21/xdocs/overview.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/jaxws21/xdocs/overview.xml?view=diff&rev=560403&r1=560402&r2=560403
==============================================================================
--- webservices/axis2/branches/java/jaxws21/xdocs/overview.xml (original)
+++ webservices/axis2/branches/java/jaxws21/xdocs/overview.xml Fri Jul 27 15:08:09 2007
@@ -34,10 +34,11 @@
 code. If this is the type of role you'd like to play, here are some
 steps (in addition to the ones above) to get you started:</p>
 <ul>
-<li><a href="guidelines.html">Read Guidelines</a></li>
-<li><a href="refLib.html">Review Reference Library</a></li>
+<li>Read our <a href="guidelines.html">developer guidelines</a> and <a
+href="release-process.html">release process</a></li>
+<li>Review the <a href="refLib.html">reference library</a></li>
 <li><a href=
-"http://svn.apache.org/viewcvs.cgi/webservices/axis/trunk/?root=Apache-SVN">
+"http://svn.apache.org/viewvc/webservices/axis2/">
 View the Source Code</a></li>
 <li><a href="svn.html">Access SVN Repository</a></li>
 </ul>



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