Author: veithen Date: Sun Feb 26 12:31:57 2012 New Revision: 1293822 URL: http://svn.apache.org/viewvc?rev=1293822&view=rev Log: Mavenized test.wsdl.choice.
Added: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceSoapImpl.java - copied unchanged from r1293809, axis/axis1/java/trunk/test/wsdl/choice/ChoiceServiceSoapImpl.java axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceTestCase.java - copied, changed from r1293809, axis/axis1/java/trunk/test/wsdl/choice/ChoiceServiceTestCase.java axis/axis1/java/trunk/integration/src/test/wsdd/wsdl/choice/ axis/axis1/java/trunk/integration/src/test/wsdd/wsdl/choice/deploy.wsdd - copied unchanged from r1293809, axis/axis1/java/trunk/test/wsdl/choice/server-deploy.wsdd axis/axis1/java/trunk/integration/src/test/wsdl/choice/ axis/axis1/java/trunk/integration/src/test/wsdl/choice/ChoiceService.wsdl - copied unchanged from r1293809, axis/axis1/java/trunk/test/wsdl/choice/ChoiceService.wsdl Removed: axis/axis1/java/trunk/test/wsdl/choice/ Modified: axis/axis1/java/trunk/integration/pom.xml axis/axis1/java/trunk/maven/maven-wsdl2java-plugin/src/main/java/org/apache/axis/maven/wsdl2java/AbstractWsdl2JavaMojo.java Modified: axis/axis1/java/trunk/integration/pom.xml URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/pom.xml?rev=1293822&r1=1293821&r2=1293822&view=diff ============================================================================== --- axis/axis1/java/trunk/integration/pom.xml (original) +++ axis/axis1/java/trunk/integration/pom.xml Sun Feb 26 12:31:57 2012 @@ -477,6 +477,22 @@ </mappings> </configuration> </execution> + <execution> + <id>choice</id> + <goals> + <goal>wsdl2java-test</goal> + </goals> + <configuration> + <file>src/test/wsdl/choice/ChoiceService.wsdl</file> + <noWrapped>true</noWrapped> + <mappings> + <mapping> + <namespace>http://tempuri.org/</namespace> + <package>test.wsdl.choice</package> + </mapping> + </mappings> + </configuration> + </execution> <!-- This is a DII test with multiple output params --> <execution> <id>dataset</id> Copied: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceTestCase.java (from r1293809, axis/axis1/java/trunk/test/wsdl/choice/ChoiceServiceTestCase.java) URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceTestCase.java?p2=axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceTestCase.java&p1=axis/axis1/java/trunk/test/wsdl/choice/ChoiceServiceTestCase.java&r1=1293809&r2=1293822&rev=1293822&view=diff ============================================================================== --- axis/axis1/java/trunk/test/wsdl/choice/ChoiceServiceTestCase.java (original) +++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceTestCase.java Sun Feb 26 12:31:57 2012 @@ -15,29 +15,9 @@ */ package test.wsdl.choice; -import java.util.Date; -import java.util.Calendar; - -import org.apache.axis.types.URI; -import org.apache.axis.encoding.ser.CalendarSerializer; - import junit.framework.TestCase; import junit.framework.AssertionFailedError; -import org.apache.axis.client.AdminClient; -import org.apache.axis.components.logger.LogFactory; -import org.apache.axis.message.MessageElement; -import org.apache.axis.message.Text; -import org.apache.axis.utils.Options; -import org.apache.commons.logging.Log; -import org.apache.log4j.Logger; - -import javax.xml.namespace.QName; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.util.Calendar; - public class ChoiceServiceTestCase extends TestCase { public ChoiceServiceTestCase(String name) { @@ -49,7 +29,6 @@ public class ChoiceServiceTestCase exten try { ChoiceServiceLocator locator = new ChoiceServiceLocator(); binding = locator.getChoiceServiceSoap(); - deployServer(); } catch (javax.xml.rpc.ServiceException jre) { throw new AssertionFailedError("JAX-RPC ServiceException caught: " + jre); @@ -126,7 +105,6 @@ public class ChoiceServiceTestCase exten try { ChoiceServiceLocator locator = new ChoiceServiceLocator(); binding = locator.getChoiceServiceSoap(); - deployServer(); } catch (javax.xml.rpc.ServiceException jre) { throw new AssertionFailedError("JAX-RPC ServiceException caught: " + jre); @@ -169,29 +147,4 @@ public class ChoiceServiceTestCase exten r2 = binding.get(r1); assertTrue(r2 != null); } - - - private void deployServer() { - final String INPUT_FILE = "server-deploy.wsdd"; - - InputStream is = getClass().getResourceAsStream(INPUT_FILE); - if (is == null) { - // try current directory - try { - is = new FileInputStream(INPUT_FILE); - } catch (FileNotFoundException e) { - is = null; - } - } - assertNotNull("Unable to find " + INPUT_FILE + ". Make sure it is on the classpath or in the current directory.", is); - AdminClient admin = new AdminClient(); - try { - Options opts = new Options( null ); - opts.setDefaultURL("http://localhost:8080/axis/services/AdminService"); - admin.process(opts, is); - } catch (Exception e) { - assertTrue("Unable to deploy " + INPUT_FILE + ". ERROR: " + e, false); - } - } - } Modified: axis/axis1/java/trunk/maven/maven-wsdl2java-plugin/src/main/java/org/apache/axis/maven/wsdl2java/AbstractWsdl2JavaMojo.java URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-wsdl2java-plugin/src/main/java/org/apache/axis/maven/wsdl2java/AbstractWsdl2JavaMojo.java?rev=1293822&r1=1293821&r2=1293822&view=diff ============================================================================== --- axis/axis1/java/trunk/maven/maven-wsdl2java-plugin/src/main/java/org/apache/axis/maven/wsdl2java/AbstractWsdl2JavaMojo.java (original) +++ axis/axis1/java/trunk/maven/maven-wsdl2java-plugin/src/main/java/org/apache/axis/maven/wsdl2java/AbstractWsdl2JavaMojo.java Sun Feb 26 12:31:57 2012 @@ -134,6 +134,13 @@ public abstract class AbstractWsdl2JavaM */ private boolean wrapArrays; + /** + * Set the noWrapped flag. + * + * @parameter default-value="false" + */ + private boolean noWrapped; + public void execute() throws MojoExecutionException, MojoFailureException { String wsdlUrl; if (file != null && url != null) { @@ -182,7 +189,7 @@ public abstract class AbstractWsdl2JavaM // emitter.setDebug(debug); // emitter.setQuiet(quiet); emitter.setTypeMappingVersion(typeMappingVersion); -// emitter.setNowrap(noWrapped); + emitter.setNowrap(noWrapped); // emitter.setAllowInvalidURL(allowInvalidURL); emitter.setWrapArrays(wrapArrays); // if (namespaceMappingFile != null) {