Author: alessio.soldano(a)jboss.com
Date: 2010-09-22 04:58:12 -0400 (Wed, 22 Sep 2010)
New Revision: 13002
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/java/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/java/org/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/java/org/jboss/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/java/org/jboss/test/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/java/org/jboss/test/ws/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/java/org/jboss/test/ws/plugins/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/java/org/jboss/test/ws/plugins/tools/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/java/org/jboss/test/ws/plugins/tools/wsprovide/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint.java
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/test/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/test/java/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/test/java/org/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/test/java/org/jboss/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/test/java/org/jboss/test/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/test/java/org/jboss/test/ws/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/test/java/org/jboss/test/ws/plugins/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/test/java/org/jboss/test/ws/plugins/tools/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsConsumeMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractProviderParams.java
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestEndorseHelper.java
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom.xml
Log:
[JBWS-3130] Adding fork mode support to wsprovide maven plugin too
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java 2010-09-22
06:42:01 UTC (rev 13001)
+++
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java 2010-09-22
08:58:12 UTC (rev 13002)
@@ -86,7 +86,7 @@
*/
protected abstract void updateProjectSourceRoots();
- protected ClassLoader getMavenClasspathAwareClassLoader(ClassLoader parent)
+ protected URLClassLoader getMavenClasspathAwareClassLoader()
{
List<String> classpath = getClasspathElements();
final int size = classpath.size();
@@ -102,7 +102,7 @@
getLog().warn("Skipping invalid classpath element: " +
classpath.get(i));
}
}
- return new URLClassLoader(urls, parent);
+ return new URLClassLoader(urls, null);
}
public Boolean getExtension()
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsConsumeMojo.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsConsumeMojo.java 2010-09-22
06:42:01 UTC (rev 13001)
+++
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsConsumeMojo.java 2010-09-22
08:58:12 UTC (rev 13002)
@@ -23,6 +23,7 @@
import java.io.File;
import java.net.MalformedURLException;
+import java.net.URLClassLoader;
import java.util.LinkedList;
import java.util.List;
@@ -112,7 +113,7 @@
ClassLoader origLoader = Thread.currentThread().getContextClassLoader();
try
{
- ClassLoader loader = getMavenClasspathAwareClassLoader(null);
+ URLClassLoader loader = getMavenClasspathAwareClassLoader();
Thread.currentThread().setContextClassLoader(loader);
WSContractConsumerParams params = new WSContractConsumerParams();
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java 2010-09-22
06:42:01 UTC (rev 13001)
+++
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java 2010-09-22
08:58:12 UTC (rev 13002)
@@ -22,6 +22,7 @@
package org.jboss.ws.plugins.tools;
import java.io.File;
+import java.net.URLClassLoader;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
@@ -85,7 +86,7 @@
}
ClassLoader origLoader = Thread.currentThread().getContextClassLoader();
- ClassLoader loader = getMavenClasspathAwareClassLoader(null);
+ URLClassLoader loader = getMavenClasspathAwareClassLoader();
Thread.currentThread().setContextClassLoader(loader);
try
{
@@ -98,6 +99,8 @@
params.setOutputDirectory(getOutputDirectory());
params.setResourceDirectory(resourceDirectory);
params.setSourceDirectory(sourceDirectory);
+ params.setFork(fork);
+ params.setArgLine(argLine);
WSContractDelegate delegate = new WSContractDelegate();
delegate.runProvider(params);
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java 2010-09-22
06:42:01 UTC (rev 13001)
+++
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java 2010-09-22
08:58:12 UTC (rev 13002)
@@ -24,6 +24,7 @@
import java.io.File;
import java.io.PrintStream;
import java.lang.reflect.Method;
+import java.net.URL;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@@ -36,6 +37,18 @@
public void runProvider(WSContractProviderParams params) throws Exception
{
+ if (params.isFork())
+ {
+ runProviderOutOfProcess(params);
+ }
+ else
+ {
+ runProviderInProcess(params);
+ }
+ }
+
+ private void runProviderInProcess(WSContractProviderParams params) throws Exception
+ {
ClassLoader loader = params.getLoader();
Class<?> providerClass =
loader.loadClass("org.jboss.wsf.spi.tools.WSContractProvider");
Object provider = providerClass.getMethod("newInstance").invoke(null);
@@ -44,6 +57,26 @@
m.invoke(provider, new Object[]{params.getEndpointClass()});
}
+ private void runProviderOutOfProcess(WSContractProviderParams params) throws
Exception
+ {
+ List<String> classpath = new LinkedList<String>();
+ URL[] urls = params.getLoader().getURLs();
+ for (URL url : urls)
+ {
+ classpath.add(url.getFile());
+ }
+ List<String> commandList = initCommandList(params.getArgLine(), classpath,
"org.jboss.wsf.spi.tools.cmd.WSProvide");
+ String commandLine = getProviderCommandLine(commandList, params);
+
+ System.out.println("*oooooooooooooooooooooooooo* commandline: ***" +
commandLine +"*oooooooooooooooooooo*");
+ Process p = Runtime.getRuntime().exec(commandLine);
+ int result = p.waitFor();
+ if (result != 0)
+ {
+ throw new Exception("Process terminated with code " + result);
+ }
+ }
+
public void runConsumer(WSContractConsumerParams params, String wsdl) throws
Exception
{
if (params.isFork())
@@ -68,6 +101,20 @@
private void runConsumerOutOfProcess(WSContractConsumerParams params, String wsdl)
throws Exception
{
+ List<String> commandList = initCommandList(params.getArgLine(),
params.getAdditionalCompilerClassPath(),
"org.jboss.wsf.spi.tools.cmd.WSConsume");
+ String commandLine = getConsumerCommandLine(commandList, params, wsdl);
+
+ System.out.println("************** commandline: ***" + commandLine
+"***");
+ Process p = Runtime.getRuntime().exec(commandLine);
+ int result = p.waitFor();
+ if (result != 0)
+ {
+ throw new Exception("Process terminated with code " + result);
+ }
+ }
+
+ private static List<String> initCommandList(String argLine, List<String>
classpath, String toolClass)
+ {
List<String> commandList = new ArrayList<String>();
if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
{
@@ -81,11 +128,11 @@
}
}
commandList.add("java");
- if (params.getArgLine() != null)
+ if (argLine != null)
{
- commandList.add(params.getArgLine());
+ commandList.add(argLine);
}
- List<String> cp = params.getAdditionalCompilerClassPath();
+ List<String> cp = classpath;
if (cp != null && !cp.isEmpty())
{
commandList.add("-classpath ");
@@ -98,7 +145,12 @@
additionalClasspath.deleteCharAt(additionalClasspath.length() - 1);
commandList.add(additionalClasspath.toString());
}
- commandList.add("org.jboss.wsf.spi.tools.cmd.WSConsume");
+ commandList.add(toolClass);
+ return commandList;
+ }
+
+ private static String getConsumerCommandLine(List<String> commandList,
WSContractConsumerParams params, String wsdl)
+ {
List<String> bindingFiles = params.getBindingFiles();
if (bindingFiles != null && !bindingFiles.isEmpty())
{
@@ -154,13 +206,46 @@
command.append(s);
command.append(" ");
}
- System.out.println("************** commandline: ***" +
command.toString()+"***");
- Process p = Runtime.getRuntime().exec(command.toString());
- int result = p.waitFor();
- if (result != 0)
+ return command.toString();
+ }
+
+ private static String getProviderCommandLine(List<String> commandList,
WSContractProviderParams params)
+ {
+ if (params.isGenerateSource())
{
- throw new Exception("Process terminated with code " + result);
+ commandList.add("-k");
}
+ if (params.isGenerateWsdl())
+ {
+ commandList.add("-w");
+ }
+ if (params.getOutputDirectory() != null)
+ {
+ commandList.add("-o");
+ commandList.add(params.getOutputDirectory().getAbsolutePath());
+ }
+ if (params.getSourceDirectory() != null)
+ {
+ commandList.add("-s");
+ commandList.add(params.getSourceDirectory().getAbsolutePath());
+ }
+ if (params.getResourceDirectory() != null)
+ {
+ commandList.add("-r");
+ commandList.add(params.getResourceDirectory().getAbsolutePath());
+ }
+ if (params.isExtension())
+ {
+ commandList.add("-e");
+ }
+ commandList.add(params.getEndpointClass());
+ StringBuilder command = new StringBuilder();
+ for (String s : commandList)
+ {
+ command.append(s);
+ command.append(" ");
+ }
+ return command.toString();
}
private static void setupConsumer(Class<?> consumerClass, Object consumer,
WSContractConsumerParams params) throws Exception
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractProviderParams.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractProviderParams.java 2010-09-22
06:42:01 UTC (rev 13001)
+++
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/WSContractProviderParams.java 2010-09-22
08:58:12 UTC (rev 13002)
@@ -22,18 +22,37 @@
package org.jboss.ws.plugins.tools;
import java.io.File;
+import java.net.URLClassLoader;
public class WSContractProviderParams
{
+ private boolean fork;
private String endpointClass;
- private ClassLoader loader;
+ private URLClassLoader loader;
private boolean extension;
private boolean generateSource;
private boolean generateWsdl;
private File outputDirectory;
private File resourceDirectory;
private File sourceDirectory;
+ private String argLine;
+ public boolean isFork()
+ {
+ return fork;
+ }
+ public void setFork(boolean fork)
+ {
+ this.fork = fork;
+ }
+ public String getArgLine()
+ {
+ return argLine;
+ }
+ public void setArgLine(String argLine)
+ {
+ this.argLine = argLine;
+ }
public String getEndpointClass()
{
return endpointClass;
@@ -42,11 +61,11 @@
{
this.endpointClass = endpointClass;
}
- public ClassLoader getLoader()
+ public URLClassLoader getLoader()
{
return loader;
}
- public void setLoader(ClassLoader loader)
+ public void setLoader(URLClassLoader loader)
{
this.loader = loader;
}
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestEndorseHelper.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestEndorseHelper.java 2010-09-22
06:42:01 UTC (rev 13001)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/java/org/jboss/test/ws/plugins/tools/helpers/TestEndorseHelper.java 2010-09-22
08:58:12 UTC (rev 13002)
@@ -37,6 +37,8 @@
{
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);";
@@ -101,8 +103,32 @@
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
@@ -122,6 +148,20 @@
{
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
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml 2010-09-22
06:42:01 UTC (rev 13001)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml 2010-09-22
08:58:12 UTC (rev 13002)
@@ -64,6 +64,26 @@
<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>
<plugin>
Modified:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom.xml
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom.xml 2010-09-22
06:42:01 UTC (rev 13001)
+++
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom.xml 2010-09-22
08:58:12 UTC (rev 13002)
@@ -64,6 +64,26 @@
<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>
<plugin>
Added:
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/src/main/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/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/testEndorse/src/main/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint.java 2010-09-22
08:58:12 UTC (rev 13002)
@@ -0,0 +1,43 @@
+/*
+ * 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;
+import javax.xml.ws.soap.Addressing;
+import javax.xml.ws.soap.AddressingFeature.Responses;
+
+/**
+ * A simple test endpoint service implementation
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 22-Sep-2010
+ *
+ */
+@WebService
+@Addressing(responses = Responses.ALL) //this requires JAXWS 2.2
+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/testEndorse/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java
===================================================================
---
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/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/testEndorse/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide/TestEndpoint2.java 2010-09-22
08:58:12 UTC (rev 13002)
@@ -0,0 +1,43 @@
+/*
+ * 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;
+import javax.xml.ws.soap.Addressing;
+import javax.xml.ws.soap.AddressingFeature.Responses;
+
+/**
+ * A simple test endpoint service implementation
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 22-Sep-2010
+ *
+ */
+@WebService
+@Addressing(responses = Responses.ALL) //this requires JAXWS 2.2
+public class TestEndpoint2
+{
+ public String test(String s)
+ {
+ return s;
+ }
+}
\ No newline at end of file