Author: alessio.soldano(a)jboss.com
Date: 2011-12-16 13:45:34 -0500 (Fri, 16 Dec 2011)
New Revision: 15414
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestProvidedScopeHelper.java
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/invoker.properties
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/setup.bsh
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/jboss/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/jboss/test/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/jboss/test/ws/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/jboss/test/ws/plugins/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/jboss/test/ws/plugins/tools/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/jboss/test/ws/plugins/tools/wsprovide/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint.java
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/jboss/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/jboss/test/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/jboss/test/ws/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/jboss/test/ws/plugins/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/jboss/test/ws/plugins/tools/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/test.wsdl
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/verify.bsh
Log:
[JBWS-3402] Adding testcase
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestProvidedScopeHelper.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestProvidedScopeHelper.java
(rev 0)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestProvidedScopeHelper.java 2011-12-16
18:45:34 UTC (rev 15414)
@@ -0,0 +1,180 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.plugins.tools.helpers;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.util.Map;
+
+/**
+ * A helper class for testing the plugin through bsh scripts
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 21-Sep-2010
+ *
+ */
+public class TestProvidedScopeHelper implements VerifyScriptHelper, SetupScriptHelper
+{
+ private Long lastModificationTime = null;
+ private Long lastModificationTime2 = null;
+ private Long wsdlLastModificationTime = null;
+ private Long wsdlLastModificationTime2 = null;
+// private static final String JAXWS_22_ENDPOINT_SERVICE_CONSTRUCTOR = "public
EndpointService(URL wsdlLocation, WebServiceFeature... features)";
+// private static final String JAXWS_22_ENDPOINT_SERVICE_CONSTRUCTOR_CONTENTS =
"super(wsdlLocation, serviceName, features);";
+
+ @Override
+ public boolean verify(File basedir, File localRepositoryPath, Map<?, ?> context)
throws Exception
+ {
+ //fist execution checks
+ File endpointServiceFile = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "wsconsume" + File.separator +
"java" +
+ File.separator + "foo" + File.separator + "bar" +
File.separator + "EndpointService.java");
+ if (!endpointServiceFile.exists())
+ {
+ System.out.println(endpointServiceFile + " not found!");
+ return false;
+ }
+ if (lastModificationTime != null && endpointServiceFile.lastModified() ==
lastModificationTime)
+ {
+ System.out.println(endpointServiceFile + " was not modified by the
plugin!");
+ return false;
+ }
+// if
(!readContents(endpointServiceFile).contains(JAXWS_22_ENDPOINT_SERVICE_CONSTRUCTOR_CONTENTS))
+// {
+// System.out.println("Could not find JAXWS 2.2 constructor '" +
JAXWS_22_ENDPOINT_SERVICE_CONSTRUCTOR + "' in " + endpointServiceFile);
+// return false;
+// }
+
+ //second execution checks
+ File endpointServiceFile2 = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "wsconsume" + File.separator +
"java" +
+ File.separator + "foo" + File.separator + "test" +
File.separator + "bar" + File.separator + "EndpointService.java");
+ if (!endpointServiceFile2.exists())
+ {
+ System.out.println(endpointServiceFile2 + " not found!");
+ return false;
+ }
+ if (lastModificationTime2 != null && endpointServiceFile2.lastModified() ==
lastModificationTime2)
+ {
+ System.out.println(endpointServiceFile2 + " was not modified by the
plugin!");
+ return false;
+ }
+// if
(!readContents(endpointServiceFile2).contains(JAXWS_22_ENDPOINT_SERVICE_CONSTRUCTOR_CONTENTS))
+// {
+// System.out.println("Could not find JAXWS 2.2 constructor '" +
JAXWS_22_ENDPOINT_SERVICE_CONSTRUCTOR + "' in " + endpointServiceFile2);
+// return false;
+// }
+
+ //classes checks
+ File classesFoo = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "classes" + File.separator +
"foo");
+ if (!classesFoo.exists())
+ {
+ System.out.println(classesFoo + " dir not found!");
+ return false;
+ }
+ File classesFooBar = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "classes" + File.separator +
"foo" + File.separator + "bar");
+ if (!classesFooBar.exists())
+ {
+ System.out.println(classesFooBar + " dir not found!");
+ return false;
+ }
+ File classesFooTest = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "test-classes" + File.separator +
"foo" + File.separator + "test");
+ if (!classesFooTest.exists())
+ {
+ System.out.println(classesFooTest + " dir not found!");
+ return false;
+ }
+
+ //wsdl check for wsprovide executions
+ File wsdl = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "wsprovide" + File.separator +
"resources" +
+ File.separator + "TestEndpointService.wsdl");
+ File wsdl2 = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "wsprovide" + File.separator +
"resources" +
+ File.separator + "TestEndpoint2Service.wsdl");
+ boolean wsdlCheck = internalVerify(wsdl, wsdlLastModificationTime);
+ wsdlCheck = wsdlCheck && internalVerify(wsdl2, wsdlLastModificationTime2);
+ if (!wsdlCheck) return false;
+
+ return true;
+ }
+
+ private static boolean internalVerify(File file, Long modificationTime)
+ {
+ if (!file.exists())
+ {
+ System.out.println(file + " not found!");
+ return false;
+ }
+ if (modificationTime != null && file.lastModified() == modificationTime)
+ {
+ System.out.println(file + " was not modified by the plugin!");
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public void setup(File basedir, File localRepositoryPath, Map<?, ?> context)
throws Exception
+ {
+ //first execution
+ File endpointServiceFile = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "wsconsume" + File.separator +
"java" +
+ File.separator + "foo" + File.separator + "bar" +
File.separator + "EndpointService.java");
+ if (endpointServiceFile.exists())
+ {
+ this.lastModificationTime = endpointServiceFile.lastModified();
+ }
+
+ //second execution
+ File endpointServiceFile2 = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "wsconsume" + File.separator +
"java" +
+ File.separator + "foo" + File.separator + "test" +
File.separator + "bar" + File.separator + "EndpointService.java");
+ if (endpointServiceFile2.exists())
+ {
+ this.lastModificationTime2 = endpointServiceFile2.lastModified();
+ }
+
+ //wsprovide executions
+ File wsdl = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "wsprovide" + File.separator +
"resources" +
+ File.separator + "TestEndpointService.wsdl");
+ if (wsdl.exists())
+ {
+ this.wsdlLastModificationTime = wsdl.lastModified();
+ }
+ File wsdl2 = new File(basedir.getAbsolutePath() + File.separator +
"target" + File.separator + "wsprovide" + File.separator +
"resources" +
+ File.separator + "TestEndpointService2.wsdl");
+ if (wsdl2.exists())
+ {
+ this.wsdlLastModificationTime2 = wsdl2.lastModified();
+ }
+ }
+
+// private String readContents(File file) throws Exception
+// {
+// BufferedReader in = new BufferedReader(new FileReader(file));
+// StringBuffer buffer = new StringBuffer();
+// String line;
+// while ((line = in.readLine()) != null)
+// {
+// buffer.append(line);
+// }
+// in.close();
+// return buffer.toString();
+// }
+
+}
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/invoker.properties
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/invoker.properties
(rev 0)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/invoker.properties 2011-12-16
18:45:34 UTC (rev 15414)
@@ -0,0 +1 @@
+invoker.goals = -e clean package
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml
(rev 0)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml 2011-12-16
18:45:34 UTC (rev 15414)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>testProviderScope</name>
+ <groupId>org.jboss.ws.plugins.maven.tests</groupId>
+ <artifactId>testProvidedScope</artifactId>
+ <packaging>jar</packaging>
+ <version>@pom.version(a)</version>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <maxmem>256M</maxmem>
+ <fork>${compiler.fork}</fork>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <version>@pom.version(a)</version>
+ <configuration>
+ <target>2.1</target>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <id>First execution</id>
+ <goals>
+ <goal>wsconsume</goal>
+ </goals>
+ <configuration>
+ <wsdls>
+ <wsdl>${basedir}/test.wsdl</wsdl>
+ </wsdls>
+ <targetPackage>foo.bar</targetPackage>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Second execution</id>
+ <goals>
+ <goal>wsconsume-test</goal>
+ </goals>
+ <configuration>
+ <wsdls>
+ <wsdl>${basedir}/test.wsdl</wsdl>
+ </wsdls>
+ <targetPackage>foo.test.bar</targetPackage>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Third execution</id>
+ <goals>
+ <goal>wsprovide</goal>
+ </goals>
+ <configuration>
+
<endpointClass>org.jboss.test.ws.plugins.tools.wsprovide.TestEndpoint</endpointClass>
+ <generateWsdl>true</generateWsdl>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Fourth execution</id>
+ <goals>
+ <goal>wsprovide-test</goal>
+ </goals>
+ <configuration>
+
<endpointClass>org.jboss.test.ws.plugins.tools.wsprovide.TestEndpoint2</endpointClass>
+ <generateWsdl>true</generateWsdl>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-client</artifactId>
+ <version>4.0.0.CR1</version>
+ <scope>provided</scope>
+ <exclusions> <!-- TODO remove this exclusion when moving to 4.0.0.CR2 (as that
prevents junit from leaking into the dependency tree -->
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-factories</artifactId>
+ <version>4.0.0.CR1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.xml.ws</groupId>
+ <artifactId>jboss-jaxws-api_2.2_spec</artifactId>
+ <version>2.0.0.Final</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom.xml
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom.xml
(rev 0)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom.xml 2011-12-16
18:45:34 UTC (rev 15414)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>testProvidedScope</name>
+ <groupId>org.jboss.ws.plugins.maven.tests</groupId>
+ <artifactId>testProvidedScope</artifactId>
+ <packaging>jar</packaging>
+ <version>@pom.version(a)</version>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <maxmem>256M</maxmem>
+ <fork>${compiler.fork}</fork>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <version>@pom.version(a)</version>
+ <configuration>
+ <target>2.1</target>
+ <verbose>true</verbose>
+ <fork>true</fork>
+ </configuration>
+ <executions>
+ <execution>
+ <id>First execution</id>
+ <goals>
+ <goal>wsconsume</goal>
+ </goals>
+ <configuration>
+ <wsdls>
+ <wsdl>${basedir}/test.wsdl</wsdl>
+ </wsdls>
+ <targetPackage>foo.bar</targetPackage>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Second execution</id>
+ <goals>
+ <goal>wsconsume-test</goal>
+ </goals>
+ <configuration>
+ <wsdls>
+ <wsdl>${basedir}/test.wsdl</wsdl>
+ </wsdls>
+ <targetPackage>foo.test.bar</targetPackage>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Third execution</id>
+ <goals>
+ <goal>wsprovide</goal>
+ </goals>
+ <configuration>
+
<endpointClass>org.jboss.test.ws.plugins.tools.wsprovide.TestEndpoint</endpointClass>
+ <generateWsdl>true</generateWsdl>
+ </configuration>
+ </execution>
+ <execution>
+ <id>Fourth execution</id>
+ <goals>
+ <goal>wsprovide-test</goal>
+ </goals>
+ <configuration>
+
<endpointClass>org.jboss.test.ws.plugins.tools.wsprovide.TestEndpoint2</endpointClass>
+ <generateWsdl>true</generateWsdl>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-client</artifactId>
+ <version>4.0.0.CR2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.xml.ws</groupId>
+ <artifactId>jboss-jaxws-api_2.2_spec</artifactId>
+ <version>2.0.0.Final</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <version>2.0.1.GA</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/setup.bsh
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/setup.bsh
(rev 0)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/setup.bsh 2011-12-16
18:45:34 UTC (rev 15414)
@@ -0,0 +1,7 @@
+import java.io.*;
+import org.jboss.test.ws.plugins.tools.helpers.*;
+import java.util.*;
+import java.util.regex.*;
+
+TestProvidedScopeHelper helper = new TestProvidedScopeHelper();
+helper.setup(basedir, localRepositoryPath, context);
\ No newline at end of file
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint.java
(rev 0)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/main/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint.java 2011-12-16
18:45:34 UTC (rev 15414)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.plugins.tools.wsprovide;
+
+import javax.jws.WebService;
+
+/**
+ * A simple test endpoint service implementation
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 22-Sep-2010
+ *
+ */
+@WebService
+public class TestEndpoint
+{
+ public String test(String s)
+ {
+ return s;
+ }
+}
\ No newline at end of file
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java
(rev 0)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java 2011-12-16
18:45:34 UTC (rev 15414)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.plugins.tools.wsprovide;
+
+import javax.jws.WebService;
+
+/**
+ * A simple test endpoint service implementation
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 22-Sep-2010
+ *
+ */
+@WebService
+public class TestEndpoint2
+{
+ public String test(String s)
+ {
+ return s;
+ }
+}
\ No newline at end of file
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/test.wsdl
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/test.wsdl
(rev 0)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/test.wsdl 2011-12-16
18:45:34 UTC (rev 15414)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://testendorse.samples.jaxws.ws.test.jboss.org/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://testendorse.samples.jaxws.ws.test.jboss.org/...
name="EndpointService">
+<types/>
+<message name="echoString">
+<part name="arg0" type="xsd:string"/>
+</message>
+<message name="echoStringResponse">
+<part name="return" type="xsd:string"/>
+</message>
+<portType name="Endpoint">
+<operation name="echoString">
+<input message="tns:echoString"/>
+<output message="tns:echoStringResponse"/>
+</operation>
+</portType>
+<binding name="EndpointPortBinding" type="tns:Endpoint">
+<soap:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="rpc"/>
+<operation name="echoString">
+<soap:operation soapAction="urn:EchoString"/>
+<input>
+<soap:body use="literal"
namespace="http://testendorse.samples.jaxws.ws.test.jboss.org/"...
+</input>
+<output>
+<soap:body use="literal"
namespace="http://testendorse.samples.jaxws.ws.test.jboss.org/"...
+</output>
+</operation>
+</binding>
+<service name="EndpointService">
+<port name="EndpointPort" binding="tns:EndpointPortBinding">
+<soap:address
location="http://127.0.0.1:8080/jaxws-samples-testendorse"/>
+</port>
+</service>
+</definitions>
\ No newline at end of file
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/verify.bsh
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/verify.bsh
(rev 0)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/verify.bsh 2011-12-16
18:45:34 UTC (rev 15414)
@@ -0,0 +1,16 @@
+import java.io.*;
+import org.jboss.test.ws.plugins.tools.helpers.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+ TestProvidedScopeHelper helper = new TestProvidedScopeHelper();
+ return helper.verify(basedir, localRepositoryPath, context);
+
+}
+catch( Throwable t )
+{
+ t.printStackTrace();
+ return false;
+}