[jbossws-commits] JBossWS SVN: r10815 - in stack/native/branches/ropalka/modules: core/src/main/java/org/jboss/ws/core/jaxws/spi/http and 3 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Thu Oct 1 08:48:19 EDT 2009


Author: richard.opalka at jboss.com
Date: 2009-10-01 08:48:18 -0400 (Thu, 01 Oct 2009)
New Revision: 10815

Added:
   stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/
   stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java
   stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/endpoints/
   stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/endpoints/Endpoint1Iface.java
   stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/endpoints/Endpoint1Impl.java
Modified:
   stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
   stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServer.java
   stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyInvocationHandler.java
   stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/RealNettyHttpServer.java
Log:
[JBWS-2674][JBWS-2754] providing test cases (WIP)

Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java	2009-09-30 21:19:04 UTC (rev 10814)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java	2009-10-01 12:48:18 UTC (rev 10815)
@@ -45,6 +45,7 @@
 import org.jboss.ws.core.jaxws.wsaddressing.EndpointReferenceUtil;
 import org.jboss.wsf.spi.SPIProvider;
 import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
 import org.jboss.wsf.spi.http.HttpContext;
 import org.jboss.wsf.spi.http.HttpServer;
 import org.jboss.wsf.spi.http.HttpServerFactory;
@@ -76,6 +77,7 @@
    private boolean isPublished;
    private boolean isDestroyed;
    private URI address;
+   private ArchiveDeployment dep;
 
    public EndpointImpl(String bindingId, Object implementor, WebServiceFeature[] features)
    {
@@ -175,7 +177,7 @@
       if (context instanceof HttpContext)
       {
          serverContext = (HttpContext)context;
-         address = getAddressFromConfigAndContext(serverContext);
+         //address = getAddressFromConfigAndContext(serverContext); // TODO: is it necessary?
          HttpServer httpServer = serverContext.getHttpServer();
          httpServer.publish(serverContext, this);
          isPublished = true;
@@ -326,4 +328,29 @@
       return this.address.getPort();
    }
    
+   public String getName()
+   {
+      StringTokenizer st = new StringTokenizer(this.getPath(), "/");
+      st.nextToken();
+      StringBuilder sb = new StringBuilder();
+      while (st.hasMoreTokens())
+      {
+         sb.append('/');
+         sb.append(st.nextToken());
+      }
+      sb.append('/');
+      
+      return sb.toString();
+   }
+   
+   public void setDeployment(ArchiveDeployment dep)
+   {
+      this.dep = dep;
+   }
+   
+   public ArchiveDeployment getDeployment()
+   {
+      return this.dep;
+   }
+   
 }

Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServer.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServer.java	2009-09-30 21:19:04 UTC (rev 10814)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServer.java	2009-10-01 12:48:18 UTC (rev 10815)
@@ -83,18 +83,27 @@
 
    public void destroy(HttpContext context, Endpoint endpoint)
    {
-      throw new UnsupportedOperationException();
+      EndpointImpl epImpl = (EndpointImpl)endpoint;
+      RealNettyHttpServer server = RealNettyHttpServer.getInstance("http", "localhost", epImpl.getPort());
+      NettyCallbackHandler callback = server.getCallback(epImpl.getPath());
+      server.unregisterCallback(callback);
+      
+      DeploymentAspectManagerImpl daManager = new DeploymentAspectManagerImpl(); 
+      daManager.setDeploymentAspects(getDeploymentAspects());
+      daManager.undeploy(epImpl.getDeployment());
    }
 
    public void publish(HttpContext context, Endpoint ep)
    {
+      EndpointImpl epImpl = (EndpointImpl)ep;
       Class<?> endpointClass = this.getEndpointClass(ep);
       String contextRoot = context.getContextRoot();
       ClassLoader loader = endpointClass.getClassLoader();
       // TODO: should we use archive deployment - see META-INF/services ???
       final ArchiveDeployment dep = (ArchiveDeployment) this.deploymentModelFactory.newDeployment(contextRoot, loader);
       final org.jboss.wsf.spi.deployment.Endpoint endpoint = this.deploymentModelFactory.newEndpoint(endpointClass.getName());
-      endpoint.setShortName("jaxws-dynamic-endpoint");
+      endpoint.setShortName(epImpl.getName());
+      endpoint.setURLPattern(epImpl.getName()); // TODO: rename method
       dep.getService().addEndpoint(endpoint);
       dep.setRootFile(new ResourceLoaderAdapter(loader));
       dep.setRuntimeClassLoader(loader);
@@ -104,8 +113,9 @@
       DeploymentAspectManagerImpl daManager = new DeploymentAspectManagerImpl(); 
       daManager.setDeploymentAspects(getDeploymentAspects());
       daManager.deploy(dep);
+      epImpl.setDeployment(dep);
+      // TODO: call DAManager.undeploy()
 
-      EndpointImpl epImpl = (EndpointImpl)ep;
       RealNettyHttpServer server = RealNettyHttpServer.getInstance("http", "localhost", epImpl.getPort());
       NettyCallbackHandler callback = new NettyCallbackHandler(epImpl.getPath(), contextRoot, endpoint.getShortName());
       server.registerCallback(callback);
@@ -115,6 +125,7 @@
    {
       List<DeploymentAspect> retVal = new LinkedList<DeploymentAspect>();
       
+      // TODO: native stack can't use framework classes directly
       retVal.add(new EndpointHandlerDeploymentAspect()); // 13
       retVal.add(new BackwardCompatibleContextRootDeploymentAspect()); // 14
       retVal.add(new URLPatternDeploymentAspect()); // 15

Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyInvocationHandler.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyInvocationHandler.java	2009-09-30 21:19:04 UTC (rev 10814)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyInvocationHandler.java	2009-10-01 12:48:18 UTC (rev 10815)
@@ -110,7 +110,6 @@
          {
             requestPath = requestPath.substring(0, paramIndex);
          }
-         System.out.println("Request path: " + requestPath); // TODO: remove this line
          String httpMethod = request.getMethod().getName();
          handle(requestPath, httpMethod, getInputStream(content), outputStream, requestHeaders);
       }
@@ -133,11 +132,15 @@
    private void handle(String requestPath, String httpMethod, InputStream inputStream, OutputStream outputStream, Map<String, Object> requestHeaders) throws IOException
    {
       boolean handlerExists = false;
+      String handledPath = null;
+      requestPath = truncateHostName(requestPath);
       for (NettyCallbackHandler handler : this.callbacks)
       {
-         requestPath = truncateHostName(requestPath);
+         handledPath = truncateHostName(handler.getHandledPath());
+         System.out.println("---");
          System.out.println("Request path 2: " + requestPath);
-         if (requestPath.startsWith(handler.getHandledPath()))
+         System.out.println("Handled path 2: " + handledPath);
+         if (requestPath.equals(handledPath))
          {
             handlerExists = true;
             if (LOG.isDebugEnabled())
@@ -152,11 +155,12 @@
    
    private String truncateHostName(String s)
    {
+      String retVal = s;
       if (s.startsWith("http"))
       {
          try
          {
-            return new URL(s).getPath();
+            retVal = new URL(s).getPath();
          }
          catch (MalformedURLException mue)
          {
@@ -164,7 +168,11 @@
          }
       }
       
-      return s;
+      while (retVal.endsWith("/"))
+      {
+         retVal = retVal.substring(0, retVal.length() - 1);
+      }
+      return retVal;
    }
    
    private void writeResponse(MessageEvent e, HttpRequest request, boolean error, String content)

Modified: stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/RealNettyHttpServer.java
===================================================================
--- stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/RealNettyHttpServer.java	2009-09-30 21:19:04 UTC (rev 10814)
+++ stack/native/branches/ropalka/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/RealNettyHttpServer.java	2009-10-01 12:48:18 UTC (rev 10815)
@@ -22,12 +22,14 @@
 package org.jboss.ws.core.jaxws.spi.http;
 
 import java.net.InetSocketAddress;
-import java.util.LinkedList;
-import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.concurrent.Executors;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
+import javax.xml.ws.WebServiceException;
+
 import org.jboss.logging.Logger;
 import org.jboss.netty.bootstrap.ServerBootstrap;
 import org.jboss.netty.channel.Channel;
@@ -36,8 +38,6 @@
 import org.jboss.netty.channel.group.DefaultChannelGroup;
 import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
 import org.jboss.ws.core.client.transport.WSServerPipelineFactory;
-import org.jboss.ws.extensions.wsrm.api.RMException;
-import org.jboss.ws.extensions.wsrm.transport.backchannel.RMCallbackHandler;
 
 /**
  * TODO: javadoc
@@ -50,7 +50,7 @@
    private static final Logger LOG = Logger.getLogger(RealNettyHttpServer.class);
    private static final Lock CLASS_LOCK = new ReentrantLock();
    private static final long WAIT_PERIOD = 100;
-   private static RealNettyHttpServer INSTANCE;
+   private static Map<String, RealNettyHttpServer> SERVERS = new HashMap<String, RealNettyHttpServer>();
    static final ChannelGroup channelGroup = new DefaultChannelGroup("rmBackPortsServer");
 
    private final Object instanceLock = new Object();
@@ -63,7 +63,7 @@
    private ChannelFactory factory;
    private NettyInvocationHandler handler;
    
-   private RealNettyHttpServer(String scheme, String host, int port) throws RMException
+   private RealNettyHttpServer(String scheme, String host, int port)
    {
       super();
       this.scheme = scheme;
@@ -84,12 +84,12 @@
          Channel c = bootstrap.bind(new InetSocketAddress(this.port));
          channelGroup.add(c);
          if (LOG.isDebugEnabled())
-            LOG.debug("WS-RM Backports Server started on port: " + this.port);
+            LOG.debug("Netty http server started on port: " + this.port);
       }
       catch (Exception e)
       {
          LOG.warn(e.getMessage(), e);
-         throw new RMException(e.getMessage(), e);
+         throw new WebServiceException(e.getMessage(), e);
       }
    }
    
@@ -101,6 +101,10 @@
    public final void unregisterCallback(NettyCallbackHandler callbackHandler)
    {
       this.handler.unregisterCallback(callbackHandler);
+      if (!this.hasMoreCallbacks())
+      {
+         this.terminate();
+      }
    }
    
    public final NettyCallbackHandler getCallback(String requestPath)
@@ -176,6 +180,7 @@
          
          this.stopped = true;
          LOG.debug("termination forced");
+         SERVERS.remove(scheme + "://" + host + ":" + port + "/");
          while (this.terminated == false)
          {
             try
@@ -196,39 +201,41 @@
     * @param scheme protocol
     * @param host hostname
     * @param port port
-    * @return WS-RM back ports server
-    * @throws RMException
+    * @return netty http server
     */
-   public static RealNettyHttpServer getInstance(String scheme, String host, int port) throws RMException
+   public static RealNettyHttpServer getInstance(String scheme, String host, int port)
    {
       CLASS_LOCK.lock();
       try
       {
-         if (INSTANCE == null)
+         String key = scheme + "://" + host + ":" + port + "/";
+         RealNettyHttpServer server = SERVERS.get(key);
+         if (server == null)
          {
-            INSTANCE = new RealNettyHttpServer(scheme, host, (port == -1) ? 80 : port);
+            server = new RealNettyHttpServer(scheme, host, (port == -1) ? 80 : port); 
+            SERVERS.put(key, server);
             // forking back ports server
-            Thread t  = new Thread(INSTANCE, "NettyHttpServer");
+            Thread t  = new Thread(server, "NettyHttpServer listening on " + key);
             t.setDaemon(true);
             t.start();
             // registering shutdown hook
-            final RealNettyHttpServer server = INSTANCE;
+            final RealNettyHttpServer s = server;
             Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
                public void run()
                {
-                  server.terminate();
+                  s.terminate();
                }
-            }, "RMBackPortsServerShutdownHook"));
+            }, "NettyHttpServerShutdownHook(" + key + ")"));
          }
          else
          {
-            boolean schemeEquals = INSTANCE.getScheme().equals(scheme);
-            boolean hostEquals = INSTANCE.getHost().equals(host);
-            boolean portEquals = INSTANCE.getPort() == ((port == -1) ? 80 : port);
+            boolean schemeEquals = server.getScheme().equals(scheme);
+            boolean hostEquals = server.getHost().equals(host);
+            boolean portEquals = server.getPort() == ((port == -1) ? 80 : port);
             if ((schemeEquals == false) || (hostEquals == false) || (portEquals == false))
                throw new IllegalArgumentException();
          }
-         return INSTANCE;
+         return server;
       }
       finally
       {

Added: stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java
===================================================================
--- stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java	                        (rev 0)
+++ stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/UsecasesTestCase.java	2009-10-01 12:48:18 UTC (rev 10815)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.jaxws.endpoint.jse;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPBinding;
+
+import org.jboss.test.ws.jaxws.endpoint.jse.endpoints.Endpoint1Iface;
+import org.jboss.test.ws.jaxws.endpoint.jse.endpoints.Endpoint1Impl;
+import org.jboss.ws.Constants;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class UsecasesTestCase extends JBossWSTest
+{
+   
+   @Override
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+      
+      System.setProperty(Constants.HTTP_KEEP_ALIVE, Boolean.FALSE.toString());
+   }
+
+   @Override
+   protected void tearDown() throws Exception
+   {
+      System.getProperties().remove(Constants.HTTP_KEEP_ALIVE);
+
+      super.tearDown();
+   }
+
+   private int port1 = 8878; // 8878
+   private int port2 = 8878; // 8878
+
+   public void testTwoPorts() throws Exception
+   {
+      String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint1";
+      Endpoint endpoint1 = publishEndpoint(Endpoint1Impl.class, publishURL1);
+
+      String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint2";
+      Endpoint endpoint2 = publishEndpoint(new Endpoint1Impl(), publishURL2);
+
+      invokeEndpoint1(publishURL1);
+      invokeEndpoint1(publishURL2);
+
+      endpoint1.stop();
+      endpoint2.stop();
+   }
+
+   public void testTwoPortsAndLongPaths() throws Exception
+   {
+      String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
+      Endpoint endpoint1 = publishEndpoint(Endpoint1Impl.class, publishURL1);
+
+      String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint/endpoint/number2";
+      Endpoint endpoint2 = publishEndpoint(new Endpoint1Impl(), publishURL2);
+
+      invokeEndpoint1(publishURL1);
+      invokeEndpoint1(publishURL2);
+
+      endpoint1.stop();
+      endpoint2.stop();
+   }
+
+   public void testTwoPortsAndAlmostIdenticalLongPaths() throws Exception
+   {
+      String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1";
+      Endpoint endpoint1 = publishEndpoint(Endpoint1Impl.class, publishURL1);
+
+      String publishURL2 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number11";
+      Endpoint endpoint2 = publishEndpoint(new Endpoint1Impl(), publishURL2);
+
+      invokeEndpoint2(publishURL1);
+      invokeEndpoint2(publishURL2);
+
+      endpoint1.stop();
+      endpoint2.stop();
+   }
+   
+   public void testTwoPortsAndIdenticalPaths() throws Exception
+   {
+      // TODO: provide test port1/service1 vs. port2/service1
+   }
+
+   private Endpoint publishEndpoint(Object epImpl, String publishURL)
+   {
+      Endpoint endpoint = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, epImpl);
+      endpoint.publish(publishURL);
+      return endpoint;
+   }
+
+   private void invokeEndpoint1(String publishURL) throws Exception
+   {
+      URL wsdlURL = new URL(publishURL + "?wsdl");
+      QName qname = new QName("http://org.jboss.ws/jaxws/endpoint/jse/endpoints/", "Endpoint1Impl");
+      Service service = Service.create(wsdlURL, qname);
+      Endpoint1Iface port = (Endpoint1Iface)service.getPort(Endpoint1Iface.class);
+
+      String helloWorld = "Hello world!";
+      Object retObj = port.echo(helloWorld);
+      assertEquals(helloWorld, retObj);
+   }
+   
+   private void invokeEndpoint2(String publishURL) throws Exception
+   {
+      URL wsdlURL = new URL(publishURL + "?wsdl");
+      QName qname = new QName("http://org.jboss.ws/jaxws/endpoint/jse/endpoints/", "Endpoint1Impl");
+      Service service = Service.create(wsdlURL, qname);
+      Endpoint1Iface port = (Endpoint1Iface)service.getPort(Endpoint1Iface.class);
+
+      // Invoke the endpoint
+      String helloWorld = "Hello world!";
+      assertEquals(0, port.getCount());
+      Object retObj = port.echo(helloWorld);
+      assertEquals(helloWorld, retObj);
+      assertEquals(1, port.getCount());
+      port.echo(helloWorld);
+      assertEquals(2, port.getCount());
+   }
+
+}

Added: stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/endpoints/Endpoint1Iface.java
===================================================================
--- stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/endpoints/Endpoint1Iface.java	                        (rev 0)
+++ stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/endpoints/Endpoint1Iface.java	2009-10-01 12:48:18 UTC (rev 10815)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.jaxws.endpoint.jse.endpoints;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * Service interface.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+ at WebService(targetNamespace = "http://org.jboss.ws/jaxws/endpoint/jse/endpoints/")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Endpoint1Iface
+{
+   String echo(String input);
+   int getCount();
+}

Added: stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/endpoints/Endpoint1Impl.java
===================================================================
--- stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/endpoints/Endpoint1Impl.java	                        (rev 0)
+++ stack/native/branches/ropalka/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/endpoint/jse/endpoints/Endpoint1Impl.java	2009-10-01 12:48:18 UTC (rev 10815)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.jaxws.endpoint.jse.endpoints;
+
+import javax.jws.WebService;
+
+/**
+ * Service implementation.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+ at WebService
+(
+   serviceName = "Endpoint1Impl",
+   targetNamespace = "http://org.jboss.ws/jaxws/endpoint/jse/endpoints/",
+   endpointInterface = "org.jboss.test.ws.jaxws.endpoint.jse.endpoints.Endpoint1Iface"
+)
+public class Endpoint1Impl implements Endpoint1Iface
+{
+
+   private int count;
+
+   public String echo(String input)
+   {
+      count++;
+      return input;
+   }
+
+   public int getCount()
+   {
+      return count;
+   }
+
+}



More information about the jbossws-commits mailing list