Author: veithen
Date: Mon Jan  2 18:35:04 2012
New Revision: 1226504

URL: http://svn.apache.org/viewvc?rev=1226504&view=rev
Log:
Mavenized the first test that requires server deployment. Also implemented the 
necessary enhancements in the Java emitter and the Maven plugin to make this 
work.

Added:
    
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/AbstractWsdl2JavaMojo.java
      - copied, changed from r1226472, 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaMojo.java
    
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaTestMojo.java
   (with props)
    axis/axis1/java/trunk/integration/src/test/java/test/wsdl/
    axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapped/
      - copied from r1226472, axis/axis1/java/trunk/test/wsdl/wrapped/
    axis/axis1/java/trunk/integration/src/test/wsdl/
    axis/axis1/java/trunk/integration/src/test/wsdl/wrapped/
    axis/axis1/java/trunk/integration/src/test/wsdl/wrapped/CityBBB.wsdl
      - copied unchanged from r1226472, 
axis/axis1/java/trunk/test/wsdl/wrapped/CityBBB.wsdl
Removed:
    
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapped/CityBBB.wsdl
    axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapped/build.xml
    axis/axis1/java/trunk/test/wsdl/wrapped/
Modified:
    
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/DefaultServerManager.java
    
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/ServerManager.java
    
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/StartServerMojo.java
    
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaMojo.java
    
axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/wsdl/toJava/Emitter.java
    
axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/wsdl/toJava/JavaBindingWriter.java
    axis/axis1/java/trunk/integration/pom.xml
    axis/axis1/java/trunk/pom.xml

Copied: 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/AbstractWsdl2JavaMojo.java
 (from r1226472, 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaMojo.java)
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/AbstractWsdl2JavaMojo.java?p2=axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/AbstractWsdl2JavaMojo.java&p1=axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaMojo.java&r1=1226472&r2=1226504&rev=1226504&view=diff
==============================================================================
--- 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaMojo.java
 (original)
+++ 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/AbstractWsdl2JavaMojo.java
 Mon Jan  2 18:35:04 2012
@@ -29,13 +29,7 @@ import org.apache.maven.plugin.MojoExecu
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
 
-/**
- * Create Java classes from local or remote WSDL.
- * 
- * @goal wsdl2java
- * @phase generate-sources
- */
-public class Wsdl2JavaMojo extends AbstractMojo {
+public abstract class AbstractWsdl2JavaMojo extends AbstractMojo {
     /**
      * The maven project.
      *
@@ -90,6 +84,21 @@ public class Wsdl2JavaMojo extends Abstr
      */
     private String typeMappingVersion;
     
+    /**
+     * emit server-side bindings for web service; default=false
+     * 
+     * @parameter default-value="false"
+     */
+    private boolean serverSide;
+    
+    /**
+     * deploy skeleton (true) or implementation (false) in deploy.wsdd.
+     * Default is false.  Assumes server-side="true".
+     * 
+     * @parameter default-value="false"
+     */
+    private boolean skeleton;
+    
     public void execute() throws MojoExecutionException, MojoFailureException {
         String wsdlUrl;
         if (file != null && url != null) {
@@ -136,8 +145,14 @@ public class Wsdl2JavaMojo extends Abstr
 //        emitter.setImports(!noImports);
 //        emitter.setAllWanted(all);
         emitter.setOutputDir(output.getAbsolutePath());
-//        emitter.setServerSide(server);
-//        emitter.setSkeletonWanted(skeletonDeploy);
+        emitter.setServerSide(serverSide);
+        emitter.setSkeletonWanted(skeleton);
+        // In a Maven build, generated sources are always written to a 
directory other than
+        // the source directory. By default, the emitter would generate an 
empty implementation
+        // because it doesn't see the implementation provided by the 
developer. We don't want this
+        // because these two classes would collide. Therefore 
implementationWanted is hardcoded
+        // to false:
+        emitter.setImplementationWanted(false);
 //        emitter.setVerbose(verbose);
 //        emitter.setDebug(debug);
 //        emitter.setQuiet(quiet);
@@ -169,6 +184,8 @@ public class Wsdl2JavaMojo extends Abstr
             throw new MojoFailureException("wsdl2java failed", ex);
         }
         
-        project.addCompileSourceRoot(output.getAbsolutePath());
+        addSourceRoot(project, output.getAbsolutePath());
     }
+    
+    protected abstract void addSourceRoot(MavenProject project, String path);
 }

Modified: 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/DefaultServerManager.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/DefaultServerManager.java?rev=1226504&r1=1226503&r2=1226504&view=diff
==============================================================================
--- 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/DefaultServerManager.java
 (original)
+++ 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/DefaultServerManager.java
 Mon Jan  2 18:35:04 2012
@@ -29,7 +29,7 @@ import org.codehaus.plexus.util.StringUt
 public class DefaultServerManager implements ServerManager {
     private final Map servers = new HashMap();
 
-    public void startServer(String jvm, String[] classpath, int port) throws 
Exception {
+    public void startServer(String jvm, String[] classpath, int port, String[] 
wsddFiles) throws Exception {
         AdminClient adminClient = new AdminClient(true);
         adminClient.setTargetEndpointAddress(new URL("http://localhost:"; + 
port + "/axis/services/AdminService"));
         Process process = Runtime.getRuntime().exec(new String[] {
@@ -44,6 +44,11 @@ public class DefaultServerManager implem
         // TODO: need to set up stdout/stderr forwarding; otherwise the 
process will hang
         // TODO: need to ping the server and wait until it becomes ready
         Thread.sleep(5000);
+        if (wsddFiles != null) {
+            for (int i=0; i<wsddFiles.length; i++) {
+                System.out.println(adminClient.process(wsddFiles[i]));
+            }
+        }
     }
     
     public void stopServer(int port) throws Exception {

Modified: 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/ServerManager.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/ServerManager.java?rev=1226504&r1=1226503&r2=1226504&view=diff
==============================================================================
--- 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/ServerManager.java
 (original)
+++ 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/ServerManager.java
 Mon Jan  2 18:35:04 2012
@@ -19,6 +19,6 @@
 package org.apache.axis.maven;
 
 public interface ServerManager {
-    void startServer(String jvm, String[] classpath, int port) throws 
Exception;
+    void startServer(String jvm, String[] classpath, int port, String[] 
wsddFiles) throws Exception;
     void stopServer(int port) throws Exception;
 }

Modified: 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/StartServerMojo.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/StartServerMojo.java?rev=1226504&r1=1226503&r2=1226504&view=diff
==============================================================================
--- 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/StartServerMojo.java
 (original)
+++ 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/StartServerMojo.java
 Mon Jan  2 18:35:04 2012
@@ -19,6 +19,7 @@
 package org.apache.axis.maven;
 
 import java.io.File;
+import java.util.Arrays;
 import java.util.List;
 
 import org.apache.axis.transport.http.SimpleAxisServer;
@@ -26,9 +27,11 @@ import org.apache.maven.artifact.Depende
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.toolchain.Toolchain;
 import org.apache.maven.toolchain.ToolchainManager;
+import org.codehaus.plexus.util.DirectoryScanner;
 
 /**
  * Start a {@link SimpleAxisServer} instance in a separate JVM.
@@ -61,7 +64,17 @@ public class StartServerMojo extends Abs
      */
     private ToolchainManager toolchainManager;
     
+    /**
+     * Directory with WSDD files for services to deploy.
+     * 
+     * @parameter
+     */
+    private File wsddDir;
+    
     public void execute() throws MojoExecutionException, MojoFailureException {
+        Log log = getLog();
+        
+        // Locate java executable to use
         String executable;
         Toolchain tc = toolchainManager.getToolchainFromBuildContext("jdk", 
session);
         if (tc != null) {
@@ -69,16 +82,43 @@ public class StartServerMojo extends Abs
         } else {
             executable = System.getProperty("java.home") + File.separator + 
"bin" + File.separator + "java";
         }
-        getLog().debug("Java executable: " + executable);
+        if (log.isDebugEnabled()) {
+            log.debug("Java executable: " + executable);
+        }
+        
+        // Get class path
         List classPathElements;
         try {
             classPathElements = project.getTestClasspathElements();
         } catch (DependencyResolutionRequiredException ex) {
             throw new MojoExecutionException("Unexpected exception", ex);
         }
-        getLog().debug("Class path elements: " + classPathElements);
+        if (log.isDebugEnabled()) {
+            log.debug("Class path elements: " + classPathElements);
+        }
+        
+        // Select WSDD files
+        String[] wsddFiles;
+        if (wsddDir != null) {
+            DirectoryScanner scanner = new DirectoryScanner();
+            scanner.setBasedir(wsddDir);
+            scanner.setIncludes(new String[] { "**/deploy.wsdd" });
+            scanner.scan();
+            String[] includedFiles = scanner.getIncludedFiles();
+            wsddFiles = new String[includedFiles.length];
+            for (int i=0; i<includedFiles.length; i++) {
+                wsddFiles[i] = new File(wsddDir, includedFiles[i]).getPath();
+            }
+            if (log.isDebugEnabled()) {
+                log.debug("WSDD files: " + Arrays.asList(wsddFiles));
+            }
+        } else {
+            wsddFiles = null;
+        }
+        
+        // Start the server
         try {
-            getServerManager().startServer(executable, 
(String[])classPathElements.toArray(new String[classPathElements.size()]), 
getPort());
+            getServerManager().startServer(executable, 
(String[])classPathElements.toArray(new String[classPathElements.size()]), 
getPort(), wsddFiles);
         } catch (Exception ex) {
             throw new MojoFailureException("Failed to start server", ex);
         }

Modified: 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaMojo.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaMojo.java?rev=1226504&r1=1226503&r2=1226504&view=diff
==============================================================================
--- 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaMojo.java
 (original)
+++ 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaMojo.java
 Mon Jan  2 18:35:04 2012
@@ -18,15 +18,6 @@
  */
 package org.apache.axis.maven;
 
-import java.io.File;
-import java.net.MalformedURLException;
-import java.util.HashMap;
-
-import org.apache.axis.constants.Scope;
-import org.apache.axis.wsdl.toJava.Emitter;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
 
 /**
@@ -35,140 +26,8 @@ import org.apache.maven.project.MavenPro
  * @goal wsdl2java
  * @phase generate-sources
  */
-public class Wsdl2JavaMojo extends AbstractMojo {
-    /**
-     * The maven project.
-     *
-     * @parameter expression="${project}"
-     * @required
-     * @readonly
-     */
-    private MavenProject project;
-    
-    /**
-     * The WSDL file to process.
-     * 
-     * @parameter
-     */
-    private File file;
-    
-    /**
-     * The URL of the WSDL to process. This should only be used for remote 
WSDLs. For local files,
-     * use the <code>file</code> parameter.
-     * 
-     * @parameter
-     */
-    private String url;
-    
-    /**
-     * Output directory for emitted files.
-     * 
-     * @parameter
-     * @required
-     */
-    private File output;
-
-    /**
-     * Add scope to deploy.xml: "Application", "Request", "Session".
-     * 
-     * @parameter
-     */
-    private String deployScope;
-
-    /**
-     * Mappings of namespaces to packages.
-     * 
-     * @parameter
-     */
-    private Mapping[] mappings;
-    
-    /**
-     * The default type mapping registry to use. Either 1.1 or 1.2.
-     * 
-     * @parameter default-value="1.2"
-     * @required
-     */
-    private String typeMappingVersion;
-    
-    public void execute() throws MojoExecutionException, MojoFailureException {
-        String wsdlUrl;
-        if (file != null && url != null) {
-            throw new MojoFailureException("Invalid plugin configuration: 
either use file or url, but not both!");
-        } else if (file != null) {
-            try {
-                wsdlUrl = file.toURL().toExternalForm();
-            } catch (MalformedURLException ex) {
-                throw new MojoExecutionException("Unexpected exception", ex);
-            }
-        } else if (url != null) {
-            wsdlUrl = url;
-        } else {
-            throw new MojoFailureException("Invalid plugin configuration: file 
or url must be given!");
-        }
-        
-        // Instantiate the emitter
-        Emitter emitter = new Emitter();
-
-        //extract the scope
-        Scope scope = Scope.getScope(deployScope, null);
-        if (scope != null) {
-            emitter.setScope(scope);
-        } else if (deployScope != null) {
-            getLog().warn("Unrecognized scope:  " + deployScope + ".  Ignoring 
it.");
-        }
-
-        //do the mappings, with namespaces mapped as the key
-        if (mappings != null && mappings.length > 0) {
-            HashMap namespaceMap = new HashMap();
-            for (int i=0; i<mappings.length; i++) {
-                namespaceMap.put(mappings[i].getNamespace(), 
mappings[i].getPackage());
-            }
-            emitter.setNamespaceMap(namespaceMap);
-        }
-//        emitter.setTestCaseWanted(testCase);
-//        emitter.setHelperWanted(helperGen);
-//        if (factory != null) {
-//            emitter.setFactory(factory);
-//        }
-//        emitter.setNamespaceIncludes(nsIncludes);
-//        emitter.setNamespaceExcludes(nsExcludes);
-//        emitter.setProperties(properties);
-//        emitter.setImports(!noImports);
-//        emitter.setAllWanted(all);
-        emitter.setOutputDir(output.getAbsolutePath());
-//        emitter.setServerSide(server);
-//        emitter.setSkeletonWanted(skeletonDeploy);
-//        emitter.setVerbose(verbose);
-//        emitter.setDebug(debug);
-//        emitter.setQuiet(quiet);
-        emitter.setTypeMappingVersion(typeMappingVersion);
-//        emitter.setNowrap(noWrapped);
-//        emitter.setAllowInvalidURL(allowInvalidURL);
-//        emitter.setWrapArrays(wrapArrays);
-//        if (namespaceMappingFile != null) {
-//            emitter.setNStoPkg(namespaceMappingFile.toString());
-//        }
-//        emitter.setTimeout(timeout);
-//        emitter.setImplementationClassName(implementationClassName);
-
-//        Authenticator.setDefault(new DefaultAuthenticator(username, 
password));
-//        if (classpath != null) {
-//            AntClassLoader cl = new AntClassLoader(
-//                    getClass().getClassLoader(),
-//                    getProject(),
-//                    classpath,
-//                    false);
-//            log("Using CLASSPATH " + cl.getClasspath(),
-//                    Project.MSG_VERBOSE);
-//            ClassUtils.setDefaultClassLoader(cl);
-//        }
-
-        try {
-            emitter.run(wsdlUrl);
-        } catch (Exception ex) {
-            throw new MojoFailureException("wsdl2java failed", ex);
-        }
-        
-        project.addCompileSourceRoot(output.getAbsolutePath());
+public class Wsdl2JavaMojo extends AbstractWsdl2JavaMojo {
+    protected void addSourceRoot(MavenProject project, String path) {
+        project.addCompileSourceRoot(path);
     }
 }

Added: 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaTestMojo.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaTestMojo.java?rev=1226504&view=auto
==============================================================================
--- 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaTestMojo.java
 (added)
+++ 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaTestMojo.java
 Mon Jan  2 18:35:04 2012
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis.maven;
+
+import org.apache.maven.project.MavenProject;
+
+/**
+ * Create Java classes from local or remote WSDL for usage in test cases.
+ * 
+ * @goal wsdl2java-test
+ * @phase generate-test-sources
+ */
+public class Wsdl2JavaTestMojo extends AbstractWsdl2JavaMojo {
+    protected void addSourceRoot(MavenProject project, String path) {
+        project.addTestCompileSourceRoot(path);
+    }
+}

Propchange: 
axis/axis1/java/trunk/axis-maven-plugin/src/main/java/org/apache/axis/maven/Wsdl2JavaTestMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/wsdl/toJava/Emitter.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/wsdl/toJava/Emitter.java?rev=1226504&r1=1226503&r2=1226504&view=diff
==============================================================================
--- 
axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/wsdl/toJava/Emitter.java
 (original)
+++ 
axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/wsdl/toJava/Emitter.java
 Mon Jan  2 18:35:04 2012
@@ -81,6 +81,8 @@ public class Emitter extends Parser {
     /** Field bDeploySkeleton */
     private boolean bDeploySkeleton = false;
 
+    private boolean bImplementationWanted = true;
+    
     /** Field bEmitTestCase */
     private boolean bEmitTestCase = false;
 
@@ -201,6 +203,24 @@ public class Emitter extends Parser {
     }    // isSkeletonWanted
 
     /**
+     * Turn on/off generation of (empty) implementation classes. Defaults to 
<code>true</code>.
+     * 
+     * @param value
+     */
+    public void setImplementationWanted(boolean value) {
+        bImplementationWanted = value;
+    }
+
+    /**
+     * Indicate if we should be generating implementation classes.
+     * 
+     * @return 
+     */
+    public boolean isImplementationWanted() {
+        return bImplementationWanted;
+    }
+
+    /**
      * Turn on/off Helper class generation
      * 
      * @param value 

Modified: 
axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/wsdl/toJava/JavaBindingWriter.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/wsdl/toJava/JavaBindingWriter.java?rev=1226504&r1=1226503&r2=1226504&view=diff
==============================================================================
--- 
axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/wsdl/toJava/JavaBindingWriter.java
 (original)
+++ 
axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/wsdl/toJava/JavaBindingWriter.java
 Mon Jan  2 18:35:04 2012
@@ -188,30 +188,32 @@ public class JavaBindingWriter implement
                             symbolTable);
                 }
 
-                // Use custom implementation classname if available
-                String fileName = emitter.getImplementationClassName(); 
-                if ( fileName == null)
-                                       fileName = 
Utils.getJavaLocalName(bEntry.getName())
-                           + "Impl.java";
-                               else
-                                       fileName = 
Utils.getJavaLocalName(fileName) + ".java";
-
-                try {
-                    if (Utils.fileExists(fileName,
-                            binding.getQName().getNamespaceURI(),
-                            emitter.getNamespaces())) {
-                        if (!emitter.isQuiet()) {
-                            System.out.println(
-                                 Messages.getMessage("wontOverwrite",
-                                                     fileName));
+                if (emitter.isImplementationWanted()) {
+                    // Use custom implementation classname if available
+                    String fileName = emitter.getImplementationClassName(); 
+                    if ( fileName == null)
+                                       fileName = 
Utils.getJavaLocalName(bEntry.getName())
+                                   + "Impl.java";
+                               else
+                                       fileName = 
Utils.getJavaLocalName(fileName) + ".java";
+    
+                    try {
+                        if (Utils.fileExists(fileName,
+                                binding.getQName().getNamespaceURI(),
+                                emitter.getNamespaces())) {
+                            if (!emitter.isQuiet()) {
+                                System.out.println(
+                                     Messages.getMessage("wontOverwrite",
+                                                         fileName));
+                            }
+                        } else {
+                            implWriter = getJavaImplWriter(emitter, bEntry,
+                                    symbolTable);
                         }
-                    } else {
-                        implWriter = getJavaImplWriter(emitter, bEntry,
-                                symbolTable);
+                    } catch (IOException ioe) {
+                        
System.err.println(Messages.getMessage("fileExistError00",
+                                fileName));
                     }
-                } catch (IOException ioe) {
-                    System.err.println(Messages.getMessage("fileExistError00",
-                            fileName));
                 }
             }
         }

Modified: axis/axis1/java/trunk/integration/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/pom.xml?rev=1226504&r1=1226503&r2=1226504&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/pom.xml (original)
+++ axis/axis1/java/trunk/integration/pom.xml Mon Jan  2 18:35:04 2012
@@ -50,15 +50,17 @@
                 <groupId>${project.groupId}</groupId>
                 <artifactId>axis-maven-plugin</artifactId>
                 <version>${project.version}</version>
+                <configuration>
+                    <output>${project.build.directory}/work</output>
+                </configuration>
                 <executions>
                     <execution>
                         <id>echo</id>
                         <goals>
-                            <goal>wsdl2java</goal>
+                            <goal>wsdl2java-test</goal>
                         </goals>
                         <configuration>
                             <file>../samples/echo/InteropTest.wsdl</file>
-                            <output>${project.build.directory}/work</output>
                             <typeMappingVersion>1.1</typeMappingVersion>
                             <mappings>
                                 <mapping>
@@ -75,11 +77,10 @@
                     <execution>
                         <id>addr</id>
                         <goals>
-                            <goal>wsdl2java</goal>
+                            <goal>wsdl2java-test</goal>
                         </goals>
                         <configuration>
                             <file>../samples/addr/AddressBook.wsdl</file>
-                            <output>${project.build.directory}/work</output>
                             <typeMappingVersion>1.1</typeMappingVersion>
                             <mappings>
                                 <mapping>
@@ -90,10 +91,31 @@
                         </configuration>
                     </execution>
                     <execution>
+                        <id>wrapped</id>
+                        <goals>
+                            <goal>wsdl2java-test</goal>
+                        </goals>
+                        <configuration>
+                            <file>src/test/wsdl/wrapped/CityBBB.wsdl</file>
+                            <deployScope>session</deployScope>
+                            <serverSide>true</serverSide>
+                            <skeleton>true</skeleton>
+                            <mappings>
+                                <mapping>
+                                    <namespace>urn:CityBBB</namespace>
+                                    <package>test.wsdl.wrapped</package>
+                                </mapping>
+                            </mappings>
+                        </configuration>
+                    </execution>
+                    <execution>
                         <id>start-server</id>
                         <goals>
                             <goal>start-server</goal>
                         </goals>
+                        <configuration>
+                            <wsddDir>${project.build.directory}/work</wsddDir>
+                        </configuration>
                     </execution>
                     <execution>
                         <id>stop-server</id>
@@ -142,6 +164,22 @@
                     </excludes>
                 </configuration>
             </plugin>
+            <plugin>
+                <artifactId>maven-failsafe-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>integration-test</goal>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <includes>
+                                <include>test/wsdl/**/*TestCase.java</include>
+                            </includes>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>

Modified: axis/axis1/java/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/trunk/pom.xml?rev=1226504&r1=1226503&r2=1226504&view=diff
==============================================================================
--- axis/axis1/java/trunk/pom.xml (original)
+++ axis/axis1/java/trunk/pom.xml Mon Jan  2 18:35:04 2012
@@ -76,6 +76,14 @@
                         <source>1.4</source>
                     </configuration>
                 </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.11</version>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <version>2.11</version>
+                </plugin>
             </plugins>
         </pluginManagement>
     </build>


Reply via email to