[jboss-cvs] JBossAS SVN: r58467 - in trunk/testsuite: imports imports/sections src/main/org/jboss/test src/main/org/jboss/test/ws src/main/org/jboss/test/ws/jaxws src/main/org/jboss/test/ws/jaxws/webserviceref src/resources src/resources/ws src/resources/ws/jaxws src/resources/ws/jaxws/webserviceref src/resources/ws/jaxws/webserviceref/META-INF src/resources/ws/jaxws/webserviceref/META-INF/wsdl src/resources/ws/jaxws/webserviceref/WEB-INF src/resources/ws/jaxws/webserviceref/servlet-client src/resources/ws/jaxws/webserviceref/servlet-client/WEB-INF

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Nov 16 16:38:04 EST 2006


Author: scott.stark at jboss.org
Date: 2006-11-16 16:37:53 -0500 (Thu, 16 Nov 2006)
New Revision: 58467

Added:
   trunk/testsuite/imports/sections/ws.xml
   trunk/testsuite/src/main/org/jboss/test/ws/
   trunk/testsuite/src/main/org/jboss/test/ws/JBossTestDeployer.java
   trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTest.java
   trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestDeployer.java
   trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestHelper.java
   trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestSetup.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EJB3Client.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EJB3Remote.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/Echo.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ServletClient.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/package-info.java
   trunk/testsuite/src/resources/ws/
   trunk/testsuite/src/resources/ws/jaxws/
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/application-client.xml
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss-client.xml
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss-web.xml
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss.xml
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/wsdl/
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/WEB-INF/
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/WEB-INF/web.xml
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/servlet-client/
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/servlet-client/WEB-INF/
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/servlet-client/WEB-INF/web.xml
Modified:
   trunk/testsuite/imports/test-jars.xml
Log:
Add a basic jaxws integration test

Added: trunk/testsuite/imports/sections/ws.xml
===================================================================
--- trunk/testsuite/imports/sections/ws.xml	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/imports/sections/ws.xml	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.
+
+ $Id$
+-->
+
+<project name="JBossWS">
+  
+  <description>JBossWS test archive builder</description>
+  
+  <!-- ================================================================== -->
+  <!-- Building                                                           -->
+  <!-- ================================================================== -->
+  
+  <target name="_jars-ws" description="Build the org.jboss.test.ws deployments">
+   
+    <!-- jaxws-webserviceref -->
+    <war warfile="${build.lib}/jaxws-webserviceref.war" webxml="${build.resources}/ws/jaxws/webserviceref/WEB-INF/web.xml">
+      <classes dir="${build.classes}">
+        <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
+      </classes>
+    </war>
+    <jar destfile="${build.lib}/jaxws-webserviceref-client.jar">
+      <fileset dir="${build.classes}">
+        <include name="org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/EchoResponse.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/Echo.class"/>
+      </fileset>
+      <metainf dir="${build.resources}/ws/jaxws/webserviceref/META-INF">
+        <include name="application-client.xml"/>
+        <include name="jboss-client.xml"/>
+        <include name="wsdl/**"/>
+      </metainf>
+      <manifest>
+        <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.ApplicationClient"/>
+      </manifest>
+    </jar>
+    <war destfile="${build.lib}/jaxws-webserviceref-servlet-client.war" webxml="${build.resources}/ws/jaxws/webserviceref/servlet-client/WEB-INF/web.xml">
+      <classes dir="${build.classes}">
+        <include name="org/jboss/test/ws/jaxws/webserviceref/ServletClient.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/EchoResponse.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/Echo.class"/>
+      </classes>
+      <webinf dir="${build.resources}/ws/jaxws/webserviceref/META-INF">
+        <include name="jboss-web.xml"/>
+        <include name="wsdl/**"/>
+      </webinf>
+    </war>
+    <jar destfile="${build.lib}/jaxws-webserviceref-ejb3-client.jar">
+      <fileset dir="${build.classes}">
+        <include name="org/jboss/test/ws/jaxws/webserviceref/EJB3Client.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/EJB3Remote.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/EchoResponse.class"/>
+        <include name="org/jboss/test/ws/jaxws/webserviceref/Echo.class"/>
+      </fileset>
+      <metainf dir="${build.resources}/ws/jaxws/webserviceref/META-INF">
+        <include name="jboss.xml"/>
+        <include name="wsdl/**"/>
+      </metainf>
+    </jar>
+    
+  </target>
+  
+</project>


Property changes on: trunk/testsuite/imports/sections/ws.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: trunk/testsuite/imports/test-jars.xml
===================================================================
--- trunk/testsuite/imports/test-jars.xml	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/imports/test-jars.xml	2006-11-16 21:37:53 UTC (rev 58467)
@@ -69,6 +69,7 @@
    <import file="sections/util.xml"/>
    <import file="sections/web.xml"/>
    <import file="sections/webservice.xml"/>
+   <import file="sections/ws.xml"/>
    <import file="sections/xa.xml"/>
    <import file="sections/xslt.xml"/>
    <import file="sections/byvalue.xml"/>
@@ -156,6 +157,7 @@
         _jars-util,
         _jars-web,
         _jars-webservice,
+        _jars-ws,
         _jars-xa,
         _jars-xslt,        
         _jars-byvalue,

Added: trunk/testsuite/src/main/org/jboss/test/ws/JBossTestDeployer.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/JBossTestDeployer.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/JBossTestDeployer.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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;
+
+import java.net.URL;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * A JBossWS test helper that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class JBossTestDeployer implements JBossWSTestDeployer
+{
+   private static final String MAIN_DEPLOYER = "jboss.system:service=MainDeployer";
+
+   public void deploy(URL url) throws Exception
+   {
+      MBeanServerConnection server = getServer();
+      server.invoke(new ObjectName(MAIN_DEPLOYER), "deploy", new Object[] { url }, new String[] { "java.net.URL" });
+   }
+
+   public void undeploy(URL url) throws Exception
+   {
+      MBeanServerConnection server = getServer();
+      server.invoke(new ObjectName(MAIN_DEPLOYER), "undeploy", new Object[] { url }, new String[] { "java.net.URL" });
+   }
+
+   private MBeanServerConnection getServer() throws NamingException
+   {
+      InitialContext iniCtx = new InitialContext();
+      MBeanServerConnection server = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+      return server;
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/JBossTestDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTest.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTest.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,271 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import junit.framework.TestCase;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.utils.DOMWriter;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Base class for JBossWS test cases
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public abstract class JBossWSTest extends TestCase
+{
+   // provide logging
+   protected Logger log = Logger.getLogger(getClass().getName());
+
+   private JBossWSTestHelper delegate = new JBossWSTestHelper();
+
+   /** Get the MBeanServerConnection from JNDI */
+   public MBeanServerConnection getServer() throws NamingException
+   {
+      return delegate.getServer();
+   }
+
+   /** True, if -Djbossws.target.server=jboss */
+   public boolean isTargetServerJBoss()
+   {
+      return delegate.isTargetServerJBoss();
+   }
+
+   /** True, if -Djbossws.target.server=tomcat */
+   public boolean isTargetServerTomcat()
+   {
+      return delegate.isTargetServerTomcat();
+   }
+
+   /** Deploy the given archive
+    */
+   public void deploy(String archive) throws Exception
+   {
+      delegate.deploy(archive);
+   }
+
+   /** Undeploy the given archive
+    */
+   public void undeploy(String archive) throws Exception
+   {
+      delegate.undeploy(archive);
+   }
+
+   /** Get the client's env context for a given name.
+    */
+   protected InitialContext getInitialContext(String clientName) throws NamingException
+   {
+      InitialContext iniCtx = new InitialContext();
+      Hashtable env = iniCtx.getEnvironment();
+      env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
+      env.put("j2ee.clientName", clientName);
+      return new InitialContext(env);
+   }
+
+   /** Get the client's env context
+    */
+   protected InitialContext getInitialContext() throws NamingException
+   {
+      return getInitialContext("jbossws-client");
+   }
+
+   public boolean hasJDK15()
+   {
+      try
+      {
+         Class.forName("java.lang.Enum");
+         return true;
+      }
+      catch (ClassNotFoundException ex)
+      {
+         return false;
+      }
+   }
+
+   /**
+    * Get the JBoss server host from system property "jbosstest.server.host"
+    * This defaults to "" + getServerHost() + ""
+    */
+   public String getServerHost()
+   {
+      String hostName = System.getProperty("jbosstest.server.host", "localhost");
+      return hostName;
+   }
+
+   public static void assertEquals(Element expElement, Element wasElement, boolean ignoreWhitespace)
+   {
+      normalizeWhitspace(expElement, ignoreWhitespace);
+      normalizeWhitspace(wasElement, ignoreWhitespace);
+      String expStr = DOMWriter.printNode(expElement, false);
+      String wasStr = DOMWriter.printNode(wasElement, false);
+      if (expStr.equals(wasStr) == false)
+      {
+         System.out.println("\nExp: " + expStr + "\nWas: " + wasStr);
+         Logger.getLogger(JBossWSTest.class).error("\nExp: " + expStr + "\nWas: " + wasStr);
+      }
+      assertEquals(expStr, wasStr);
+   }
+
+   public static void assertEquals(Element expElement, Element wasElement)
+   {
+      assertEquals(expElement, wasElement, false);
+   }
+
+   public static void assertEquals(Object exp, Object was)
+   {
+      if (exp instanceof Object[] && was instanceof Object[])
+         assertEqualsArray((Object[])exp, (Object[])was);
+      else if (exp instanceof byte[] && was instanceof byte[])
+         assertEqualsArray((byte[])exp, (byte[])was);
+      else if (exp instanceof boolean[] && was instanceof boolean[])
+         assertEqualsArray((boolean[])exp, (boolean[])was);
+      else if (exp instanceof short[] && was instanceof short[])
+         assertEqualsArray((short[])exp, (short[])was);
+      else if (exp instanceof int[] && was instanceof int[])
+         assertEqualsArray((int[])exp, (int[])was);
+      else if (exp instanceof long[] && was instanceof long[])
+         assertEqualsArray((long[])exp, (long[])was);
+      else if (exp instanceof float[] && was instanceof float[])
+         assertEqualsArray((float[])exp, (float[])was);
+      else if (exp instanceof double[] && was instanceof double[])
+         assertEqualsArray((double[])exp, (double[])was);
+      else TestCase.assertEquals(exp, was);
+   }
+
+   private static void assertEqualsArray(Object[] exp, Object[] was)
+   {
+      if (exp == null && was == null)
+         return;
+
+      if (exp != null && was != null)
+      {
+         if (exp.length != was.length)
+         {
+            fail("Expected <" + exp.length + "> array items, but was <" + was.length + ">");
+         }
+         else
+         {
+            for (int i = 0; i < exp.length; i++)
+            {
+
+               Object compExp = exp[i];
+               Object compWas = was[i];
+               assertEquals(compExp, compWas);
+            }
+         }
+      }
+      else if (exp == null)
+      {
+         fail("Expected a null array, but was: " + Arrays.asList(was));
+      }
+      else if (was == null)
+      {
+         fail("Expected " + Arrays.asList(exp) + ", but was: null");
+      }
+   }
+
+   private static void assertEqualsArray(byte[] exp, byte[] was)
+   {
+      assertTrue("Arrays don't match", Arrays.equals(exp, was));
+   }
+
+   private static void assertEqualsArray(boolean[] exp, boolean[] was)
+   {
+      assertTrue("Arrays don't match", Arrays.equals(exp, was));
+   }
+
+   private static void assertEqualsArray(short[] exp, short[] was)
+   {
+      assertTrue("Arrays don't match", Arrays.equals(exp, was));
+   }
+
+   private static void assertEqualsArray(int[] exp, int[] was)
+   {
+      assertTrue("Arrays don't match", Arrays.equals(exp, was));
+   }
+
+   private static void assertEqualsArray(long[] exp, long[] was)
+   {
+      assertTrue("Arrays don't match", Arrays.equals(exp, was));
+   }
+
+   private static void assertEqualsArray(float[] exp, float[] was)
+   {
+      assertTrue("Arrays don't match", Arrays.equals(exp, was));
+   }
+
+   private static void assertEqualsArray(double[] exp, double[] was)
+   {
+      assertTrue("Arrays don't match", Arrays.equals(exp, was));
+   }
+
+   /** Removes whitespace text nodes if they have an element sibling.
+    */
+   private static void normalizeWhitspace(Element element, boolean ignoreWhitespace)
+   {
+      boolean hasChildElement = false;
+      ArrayList toDetach = new ArrayList();
+
+      String nodeName = element.getNodeName();
+      NodeList childNodes = element.getChildNodes();
+      for (int i = 0; i < childNodes.getLength(); i++)
+      {
+         Node node = childNodes.item(i);
+         if (node.getNodeType() == Node.TEXT_NODE)
+         {
+            String nodeValue = node.getNodeValue();
+            if (nodeValue.trim().length() == 0)
+               toDetach.add(node);
+         }
+         if (node.getNodeType() == Node.ELEMENT_NODE)
+         {
+            normalizeWhitspace((Element)node, ignoreWhitespace);
+            hasChildElement = true;
+         }
+      }
+
+      // remove whitespace nodes
+      if (hasChildElement || ignoreWhitespace)
+      {
+         Iterator it = toDetach.iterator();
+         while (it.hasNext())
+         {
+            Node node = (Node)it.next();
+            element.removeChild(node);
+         }
+      }
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestDeployer.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestDeployer.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestDeployer.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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;
+
+import java.net.URL;
+
+/**
+ * WS test deployer 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 16-May-2006
+ */
+public interface JBossWSTestDeployer
+{
+   /** Deploy the given archive
+    */
+   void deploy(URL archive) throws Exception;
+
+   /** Undeploy the given archive
+    */
+   void undeploy(URL archive) throws Exception;
+}
\ No newline at end of file


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestHelper.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestHelper.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestHelper.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.management.MBeanServerConnection;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+/**
+ * A JBossWS test helper that deals with test deployment/undeployment, etc.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class JBossWSTestHelper
+{
+   /** Deploy the given archive
+    */
+   public void deploy(String archive) throws Exception
+   {
+      URL url = getArchiveURL(archive);
+      getDeployer().deploy(url);
+   }
+
+   /** Undeploy the given archive
+    */
+   public void undeploy(String archive) throws Exception
+   {
+      URL url = getArchiveURL(archive);
+      getDeployer().undeploy(url);
+   }
+
+   /** True, if -Djbossws.target.server=jboss */
+   public boolean isTargetServerJBoss()
+   {
+      String targetServer = System.getProperty("jbossws.target.server");
+      return "jboss".equals(targetServer);
+   }
+
+   /** True, if -Djbossws.target.server=tomcat */
+   public boolean isTargetServerTomcat()
+   {
+      String targetServer = System.getProperty("jbossws.target.server");
+      return "tomcat".equals(targetServer);
+   }
+
+   public MBeanServerConnection getServer() throws NamingException
+   {
+      InitialContext iniCtx = new InitialContext();
+      MBeanServerConnection server = (MBeanServerConnection)iniCtx.lookup("jmx/invoker/RMIAdaptor");
+      return server;
+   }
+
+   private JBossWSTestDeployer getDeployer()
+   {
+      return new JBossTestDeployer();
+   }
+
+   /** Try to discover the URL for the deployment archive */
+   public URL getArchiveURL(String archive) throws MalformedURLException
+   {
+      URL url = null;
+      try
+      {
+         url = new URL(archive);
+      }
+      catch (MalformedURLException ignore)
+      {
+         // ignore
+      }
+
+      if (url == null)
+      {
+         File file = new File(archive);
+         if (file.exists())
+            url = file.toURL();
+      }
+
+      if (url == null)
+      {
+         File file = new File("output/lib/" + archive);
+         if (file.exists())
+            url = file.toURL();
+      }
+
+      if (url == null)
+         throw new IllegalArgumentException("Cannot obtain URL for: " + archive);
+
+      return url;
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestHelper.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestSetup.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestSetup.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestSetup.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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;
+
+import junit.extensions.TestSetup;
+import junit.framework.TestSuite;
+
+import java.util.StringTokenizer;
+import java.util.List;
+import java.util.ArrayList;
+import java.net.URLClassLoader;
+import java.net.URL;
+
+/**
+ * A test setup that deploys/undeploys archives
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 14-Oct-2004
+ */
+public class JBossWSTestSetup extends TestSetup
+{
+   private JBossWSTestHelper delegate = new JBossWSTestHelper();
+   private String[] archives;
+
+   protected JBossWSTestSetup(Class testClass, String archiveList)
+   {
+      super(new TestSuite(testClass));
+
+      StringTokenizer st = new StringTokenizer(archiveList, ", ");
+      archives = new String[st.countTokens()];
+
+      for (int i = 0; i < archives.length; i++)
+         archives[i] = st.nextToken();
+   }
+
+   public static JBossWSTestSetup newTestSetup(Class testClass, String archiveList)
+   {
+      return new JBossWSTestSetup(testClass, archiveList);
+   }
+
+   protected void setUp() throws Exception
+   {
+      List clientJars = new ArrayList();
+      for (int i = 0; i < archives.length; i++)
+      {
+         String archive = archives[i];
+         boolean isJ2EEClient = archive.endsWith("-client.jar");
+         if (delegate.isTargetServerJBoss() || isJ2EEClient == false)
+         {
+            try
+            {
+               delegate.deploy(archive);
+            }
+            catch (Exception ex)
+            {
+               ex.printStackTrace();
+               delegate.undeploy(archive);
+            }
+         }
+         if (isJ2EEClient)
+         {
+            URL archiveURL = delegate.getArchiveURL(archive);
+            clientJars.add(archiveURL);
+         }
+      }
+
+      // add the client jars to the classloader
+      if( !clientJars.isEmpty() )
+      {
+         ClassLoader parent = Thread.currentThread().getContextClassLoader();
+         URL[] urls = new URL[clientJars.size()];
+         for(int i=0; i<clientJars.size(); i++)
+         {
+            urls[i] = (URL)clientJars.get(i);
+         }
+         URLClassLoader cl = new URLClassLoader(urls, parent);
+         Thread.currentThread().setContextClassLoader(cl);
+      }
+   }
+
+   protected void tearDown() throws Exception
+   {
+      for (int i = 0; i < archives.length; i++)
+      {
+         String archive = archives[archives.length - i - 1];
+         boolean isJ2EEClient = archive.endsWith("-client.jar");
+         if (delegate.isTargetServerJBoss() || isJ2EEClient == false)
+         {
+            delegate.undeploy(archive);
+         }
+      }
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/JBossWSTestSetup.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import java.util.ArrayList;
+
+import javax.naming.InitialContext;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+
+import org.jboss.logging.Logger;
+
+//Test on type with wsdlLocation
+ at WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
+
+// Test multiple on type
+ at WebServiceRefs( { 
+   @WebServiceRef(name = "service2", value = TestEndpointService.class),
+   @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class) })
+public class ApplicationClient
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(ApplicationClient.class);
+   
+   // Test on field with name
+   @WebServiceRef(name = "TestEndpointService3")
+   public static TestEndpointService service3;
+
+   // Test on field without name
+   @WebServiceRef
+   public static TestEndpointService service4;
+
+   // Test on method with value
+   @WebServiceRef(name = "TestEndpointService5")
+   public static void setServiceSetter5(TestEndpointService service)
+   {
+      ApplicationClient.service5 = service;
+   }
+   private static TestEndpointService service5;
+   
+   // Test on method without name
+   @WebServiceRef
+   public static void setServiceSetter6(TestEndpointService service)
+   {
+      ApplicationClient.service6 = service;
+   }
+   private static TestEndpointService service6;
+   
+   // Test on field with name and value
+   @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+   public static TestEndpoint port2;
+
+   // Test on field with value
+   @WebServiceRef(value = TestEndpointService.class)
+   public static TestEndpoint port3;
+
+   public static InitialContext iniCtx;
+   public static String retStr;
+
+   public static void main(String[] args)
+   {
+      String inStr = args[0];
+      log.info("echo: " + inStr);
+      
+      ArrayList<TestEndpoint> ports = new ArrayList<TestEndpoint>();
+      try
+      {
+         System.out.println("FIXME: EJBTHREE-760");
+         //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service1")).getTestEndpointPort());
+         //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
+         ports.add((TestEndpoint)service3.getPort(TestEndpoint.class));
+         //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService3")).getTestEndpointPort());
+         ports.add((TestEndpoint)service4.getPort(TestEndpoint.class));
+         //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/service4")).getTestEndpointPort());
+         ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
+         //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService5")).getTestEndpointPort());
+         ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
+         //ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/serviceSetter6")).getTestEndpointPort());
+         //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/port1"));
+         ports.add(port2);
+         //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/Port2"));
+         ports.add(port3);
+         //ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/" + ApplicationClient.class.getName() + "/port3"));
+      }
+      catch (Exception ex)
+      {
+         log.error("Cannot add port", ex);
+         throw new WebServiceException(ex);
+      }
+      
+      for (TestEndpoint port : ports)
+      {
+         String outStr = port.echo(inStr);
+         if (inStr.equals(outStr) == false)
+            throw new WebServiceException("Invalid echo return: " + inStr);
+      }
+      
+      retStr = inStr;
+   }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ApplicationClient.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EJB3Client.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EJB3Client.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EJB3Client.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import java.util.ArrayList;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.naming.InitialContext;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+
+import org.jboss.annotation.ejb.RemoteBinding;
+import org.jboss.logging.Logger;
+
+// standard EJB3 annotations
+ at Remote(EJB3Remote.class)
+ at RemoteBinding(jndiBinding = "/ejb3/EJB3Client")
+ at Stateless
+
+// Test on type with wsdlLocation
+ at WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
+
+// Test multiple on type
+ at WebServiceRefs( { 
+   @WebServiceRef(name = "service2", value = TestEndpointService.class),
+   @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class) })
+public class EJB3Client implements EJB3Remote
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(EJB3Client.class);
+
+   // Test on field with name
+   @WebServiceRef(name = "TestEndpointService3")
+   public TestEndpointService service3;
+
+   // Test on field without name
+   @WebServiceRef
+   public TestEndpointService service4;
+
+   // Test on method with value
+   @WebServiceRef(name = "TestEndpointService5")
+   public void setServiceSetter5(TestEndpointService service)
+   {
+      this.service5 = service;
+   }
+   private TestEndpointService service5;
+   
+   // Test on method without name
+   @WebServiceRef
+   public void setServiceSetter6(TestEndpointService service)
+   {
+      this.service6 = service;
+   }
+   private TestEndpointService service6;
+   
+   // Test on field with name and value
+   @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+   public TestEndpoint port2;
+
+   // Test on field with value
+   @WebServiceRef(value = TestEndpointService.class)
+   public TestEndpoint port3;
+
+   public String echo(String inStr)
+   {
+      log.info("echo: " + inStr);
+
+      ArrayList<TestEndpoint> ports = new ArrayList<TestEndpoint>();
+      try
+      {
+         InitialContext iniCtx = new InitialContext();
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp.ejb3/env/service1")).getTestEndpointPort());
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp.ejb3/env/service2")).getTestEndpointPort());
+         ports.add((TestEndpoint)service3.getPort(TestEndpoint.class));
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp.ejb3/env/TestEndpointService3")).getTestEndpointPort());
+         ports.add((TestEndpoint)service4.getPort(TestEndpoint.class));
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp.ejb3/env/" + getClass().getName() + "/service4")).getTestEndpointPort());
+         ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp.ejb3/env/TestEndpointService5")).getTestEndpointPort());
+         ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp.ejb3/env/" + getClass().getName() + "/serviceSetter6")).getTestEndpointPort());
+         ports.add((TestEndpoint)iniCtx.lookup("java:comp.ejb3/env/port1"));
+         ports.add(port2);
+         ports.add((TestEndpoint)iniCtx.lookup("java:comp.ejb3/env/Port2"));
+         ports.add(port3);
+         ports.add((TestEndpoint)iniCtx.lookup("java:comp.ejb3/env/" + getClass().getName() + "/port3"));
+      }
+      catch (Exception ex)
+      {
+         log.error("Cannot add port", ex);
+         throw new WebServiceException(ex);
+      }
+
+      for (TestEndpoint port : ports)
+      {
+         String outStr = port.echo(inStr);
+         if (inStr.equals(outStr) == false)
+            throw new WebServiceException("Invalid echo return: " + inStr);
+      }
+
+      return inStr;
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EJB3Client.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EJB3Remote.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EJB3Remote.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EJB3Remote.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+public interface EJB3Remote
+{
+   String echo(String input);
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EJB3Remote.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/Echo.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/Echo.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/Echo.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for echo complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="echo">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="arg0" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "echo", propOrder = {
+    "arg0"
+})
+public class Echo {
+
+    @XmlElement(namespace = "http://org.jboss.ws/wsref")
+    protected String arg0;
+
+    /**
+     * Gets the value of the arg0 property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getArg0() {
+        return arg0;
+    }
+
+    /**
+     * Sets the value of the arg0 property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setArg0(String value) {
+        this.arg0 = value;
+    }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/Echo.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for echoResponse complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="echoResponse">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "echoResponse", propOrder = {
+    "_return"
+})
+public class EchoResponse {
+
+    @XmlElement(name = "return", namespace = "http://org.jboss.ws/wsref")
+    protected String _return;
+
+    /**
+     * Gets the value of the return property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getReturn() {
+        return _return;
+    }
+
+    /**
+     * Sets the value of the return property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setReturn(String value) {
+        this._return = value;
+    }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/EchoResponse.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.jboss.test.ws.jaxws.webserviceref package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+ at XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _EchoResponse_QNAME = new QName("http://org.jboss.ws/wsref", "echoResponse");
+    private final static QName _Echo_QNAME = new QName("http://org.jboss.ws/wsref", "echo");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.webserviceref
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link EchoResponse }
+     * 
+     */
+    public EchoResponse createEchoResponse() {
+        return new EchoResponse();
+    }
+
+    /**
+     * Create an instance of {@link Echo }
+     * 
+     */
+    public Echo createEcho() {
+        return new Echo();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link EchoResponse }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://org.jboss.ws/wsref", name = "echoResponse")
+    public JAXBElement<EchoResponse> createEchoResponse(EchoResponse value) {
+        return new JAXBElement<EchoResponse>(_EchoResponse_QNAME, EchoResponse.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link Echo }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://org.jboss.ws/wsref", name = "echo")
+    public JAXBElement<Echo> createEcho(Echo value) {
+        return new JAXBElement<Echo>(_Echo_QNAME, Echo.class, null, value);
+    }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ObjectFactory.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ServletClient.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ServletClient.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ServletClient.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+import javax.naming.InitialContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+
+import org.jboss.logging.Logger;
+
+//Test on type with wsdlLocation
+ at WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "WEB-INF/wsdl/TestEndpoint.wsdl")
+
+// Test multiple on type
+ at WebServiceRefs( { 
+   @WebServiceRef(name = "service2", value = TestEndpointService.class),
+   @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class) })
+public class ServletClient extends HttpServlet
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(ServletClient.class);
+   
+   // Test on field with name
+   @WebServiceRef(name = "TestEndpointService3")
+   public TestEndpointService service3;
+
+   // Test on field without name
+   @WebServiceRef
+   public TestEndpointService service4;
+
+   // Test on method with value
+   @WebServiceRef(name = "TestEndpointService5")
+   public void setServiceSetter5(TestEndpointService service)
+   {
+      this.service5 = service;
+   }
+   private TestEndpointService service5;
+   
+   // Test on method without name
+   @WebServiceRef
+   public void setServiceSetter6(TestEndpointService service)
+   {
+      this.service6 = service;
+   }
+   private TestEndpointService service6;
+   
+   // Test on field with name and value
+   @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+   public TestEndpoint port2;
+
+   // Test on field with value
+   @WebServiceRef(value = TestEndpointService.class)
+   public TestEndpoint port3;
+
+   @Override
+   protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+   {
+      String inStr = req.getParameter("echo");
+      log.info("doGet: " + inStr);
+      
+      ArrayList<TestEndpoint> ports = new ArrayList<TestEndpoint>();
+      try
+      {
+         InitialContext iniCtx = new InitialContext();
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service1")).getTestEndpointPort());
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/service2")).getTestEndpointPort());
+         ports.add((TestEndpoint)service3.getPort(TestEndpoint.class));
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService3")).getTestEndpointPort());
+         ports.add((TestEndpoint)service4.getPort(TestEndpoint.class));
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + getClass().getName() + "/service4")).getTestEndpointPort());
+         ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService5")).getTestEndpointPort());
+         ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
+         ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + getClass().getName() + "/serviceSetter6")).getTestEndpointPort());
+         ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/port1"));
+         ports.add(port2);
+         ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/Port2"));
+         ports.add(port3);
+         ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/" + getClass().getName() + "/port3"));
+      }
+      catch (Exception ex)
+      {
+         log.error("Cannot add port", ex);
+         throw new WebServiceException(ex);
+      }
+      
+      for (TestEndpoint port : ports)
+      {
+         String outStr = port.echo(inStr);
+         if (inStr.equals(outStr) == false)
+            throw new WebServiceException("Invalid echo return: " + inStr);
+      }
+      
+      res.getWriter().print(inStr);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/ServletClient.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0_01-b59-fcs
+ * Generated source version: 2.0
+ * 
+ */
+ at WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/wsref")
+public interface TestEndpoint {
+
+
+    /**
+     * 
+     * @param arg0
+     * @return
+     *     returns java.lang.String
+     */
+    @WebMethod
+    @WebResult(targetNamespace = "http://org.jboss.ws/wsref")
+    @RequestWrapper(localName = "echo", targetNamespace = "http://org.jboss.ws/wsref", className = "org.jboss.test.ws.jaxws.webserviceref.Echo")
+    @ResponseWrapper(localName = "echoResponse", targetNamespace = "http://org.jboss.ws/wsref", className = "org.jboss.test.ws.jaxws.webserviceref.EchoResponse")
+    public String echo(
+        @WebParam(name = "arg0", targetNamespace = "http://org.jboss.ws/wsref")
+        String arg0);
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import javax.jws.WebService;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Test the JAXWS annotation: javax.jws.WebServiceRef
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 23-Oct-2006
+ */
+ at WebService(endpointInterface="org.jboss.test.ws.jaxws.webserviceref.TestEndpoint")
+public class TestEndpointImpl implements TestEndpoint
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(TestEndpointImpl.class);
+
+   public String echo(String input)
+   {
+      log.info(input);
+      return input;
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0_01-b59-fcs
+ * Generated source version: 2.0
+ * 
+ */
+ at WebServiceClient(name = "TestEndpointService", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
+public class TestEndpointService
+    extends Service
+{
+
+    private final static URL TESTENDPOINTSERVICE_WSDL_LOCATION;
+
+    static {
+        URL url = null;
+        try {
+            url = new URL("file:./resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl");
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        }
+        TESTENDPOINTSERVICE_WSDL_LOCATION = url;
+    }
+
+    public TestEndpointService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public TestEndpointService() {
+        super(TESTENDPOINTSERVICE_WSDL_LOCATION, new QName("http://org.jboss.ws/wsref", "TestEndpointService"));
+    }
+
+    /**
+     * 
+     * @return
+     *     returns TestEndpoint
+     */
+    @WebEndpoint(name = "TestEndpointPort")
+    public TestEndpoint getTestEndpointPort() {
+        return (TestEndpoint)super.getPort(new QName("http://org.jboss.ws/wsref", "TestEndpointPort"), TestEndpoint.class);
+    }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory;
+
+/**
+ * Test the JAXWS annotation: javax.xml.ws.WebServiceref
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 23-Oct-2005
+ */
+public class WebServiceRefClientTestCase extends JBossWSTest
+{
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-webserviceref";
+   
+   public static Test suite()
+   {
+      return JBossWSTestSetup.newTestSetup(WebServiceRefClientTestCase.class, "jaxws-webserviceref.war, jaxws-webserviceref-client.jar");
+   }
+
+   public void testWSDLAccess() throws MalformedURLException
+   {
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+      WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+      assertNotNull(wsdlDefinitions);
+   }
+   
+   public void testDynamicProxy() throws Exception
+   {
+      URL wsdlURL = new File("resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+      QName qname = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
+      Service service = Service.create(wsdlURL, qname);
+      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+      String helloWorld = "Hello World!";
+      Object retObj = port.echo(helloWorld);
+      assertEquals(helloWorld, retObj);
+   }
+
+   public void testApplicationClient() throws Exception
+   {
+      String helloWorld = "Hello World!";
+      ApplicationClient.iniCtx = getInitialContext();
+      //ClientLauncher.launch(ApplicationClient.class.getName(), "jbossws-client",  new String[]{helloWorld});
+      //assertEquals(helloWorld, ApplicationClient.retStr);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.naming.InitialContext;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory;
+
+/**
+ * Test the JAXWS annotation: javax.xml.ws.WebServiceref
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 23-Oct-2005
+ */
+public class WebServiceRefEJB3TestCase extends JBossWSTest
+{
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-webserviceref";
+   
+   public static Test suite()
+   {
+      return JBossWSTestSetup.newTestSetup(WebServiceRefEJB3TestCase.class, "jaxws-webserviceref.war, jaxws-webserviceref-ejb3-client.jar");
+   }
+
+   public void testWSDLAccess() throws MalformedURLException
+   {
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+      WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+      assertNotNull(wsdlDefinitions);
+   }
+   
+   public void testDynamicProxy() throws Exception
+   {
+      URL wsdlURL = new File("resources/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+      QName qname = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
+      Service service = Service.create(wsdlURL, qname);
+      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+      String helloWorld = "Hello World!";
+      Object retObj = port.echo(helloWorld);
+      assertEquals(helloWorld, retObj);
+   }
+
+   public void testEJB3Client() throws Exception
+   {
+      InitialContext iniCtx = getInitialContext();
+      EJB3Remote ejb3Remote = (EJB3Remote)iniCtx.lookup("/ejb3/EJB3Client");
+
+      String helloWorld = "Hello World!";
+      Object retObj = ejb3Remote.echo(helloWorld);
+      assertEquals(helloWorld, retObj);
+      
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.webserviceref;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory;
+
+/**
+ * Test the JAXWS annotation: javax.xml.ws.WebServiceref
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 23-Oct-2005
+ */
+public class WebServiceRefServletTestCase extends JBossWSTest
+{
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-webserviceref";
+   
+   public static Test suite()
+   {
+      return JBossWSTestSetup.newTestSetup(WebServiceRefServletTestCase.class, "jaxws-webserviceref.war, jaxws-webserviceref-servlet-client.war");
+   }
+
+   public void testWSDLAccess() throws MalformedURLException
+   {
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+      WSDLDefinitions wsdlDefinitions = factory.parse(wsdlURL);
+      assertNotNull(wsdlDefinitions);
+   }
+   
+   public void testDynamicProxy() throws Exception
+   {
+      URL wsdlURL = new File("output/resources/ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
+      QName qname = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
+      Service service = Service.create(wsdlURL, qname);
+      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+      String helloWorld = "Hello World!";
+      Object retObj = port.echo(helloWorld);
+      assertEquals(helloWorld, retObj);
+   }
+
+   public void testServletClient() throws Exception
+   {
+      System.out.println("FIXME: [JBAS-3824] Fix ENC for EJB2.1 and Servlets");
+      if (true) return;
+      
+      URL url = new URL(TARGET_ENDPOINT_ADDRESS + "-servlet-client?echo=HelloWorld");
+      BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+      String retStr = br.readLine();
+      assertEquals("HelloWorld", retStr);
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/package-info.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/package-info.java	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/package-info.java	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,23 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.
+ */
+ at javax.xml.bind.annotation.XmlSchema(namespace = "http://org.jboss.ws/wsref")
+package org.jboss.test.ws.jaxws.webserviceref;


Property changes on: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/webserviceref/package-info.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/application-client.xml
===================================================================
--- trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/application-client.xml	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/application-client.xml	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application-client version="5" xmlns="http://java.sun.com/xml/ns/javaee" 
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd">
+  
+  <display-name>TestEndpointService</display-name>
+  
+</application-client>


Property changes on: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/application-client.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss-client.xml
===================================================================
--- trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss-client.xml	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss-client.xml	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-client PUBLIC "-//JBoss//DTD Application Client 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd">
+
+<jboss-client>
+  <jndi-name>jbossws-client</jndi-name>
+  
+  <!-- 
+  @WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
+  <service-ref>
+    <service-ref-name>service1</service-ref-name>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  -->
+  
+  <!-- 
+  @WebServiceRef(name = "service2", value = TestEndpointService.class)
+  -->
+  <service-ref>
+    <service-ref-name>service2</service-ref-name>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "TestEndpointService3")
+  -->
+  <service-ref>
+    <service-ref-name>TestEndpointService3</service-ref-name>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef
+  -->
+  <service-ref>
+    <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ApplicationClient/service4</service-ref-name>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "TestEndpointService5")
+  -->
+  <service-ref>
+    <service-ref-name>TestEndpointService5</service-ref-name>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef
+  -->
+  <service-ref>
+    <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ApplicationClient/serviceSetter6</service-ref-name>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class)
+  -->
+  <service-ref>
+    <service-ref-name>port1</service-ref-name>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+  -->
+  <service-ref>
+    <service-ref-name>Port2</service-ref-name>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(value = TestEndpointService.class)
+  -->
+  <service-ref>
+    <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ApplicationClient/port3</service-ref-name>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+</jboss-client>
\ No newline at end of file


Property changes on: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss-web.xml
===================================================================
--- trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss-web.xml	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss-web.xml	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
+
+<jboss-web>
+  
+      
+      <!-- 
+      @WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "WEB-INF/wsdl/TestEndpoint.wsdl")
+      <service-ref>
+        <service-ref-name>service1</service-ref-name>
+        <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      -->
+      
+      <!-- 
+      @WebServiceRef(name = "service2", value = TestEndpointService.class)
+      -->
+      <service-ref>
+        <service-ref-name>service2</service-ref-name>
+        <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef(name = "TestEndpointService3")
+      -->
+      <service-ref>
+        <service-ref-name>TestEndpointService3</service-ref-name>
+        <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef
+      -->
+      <service-ref>
+        <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ServletClient/service4</service-ref-name>
+        <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef(name = "TestEndpointService5")
+      -->
+      <service-ref>
+        <service-ref-name>TestEndpointService5</service-ref-name>
+        <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef
+      -->
+      <service-ref>
+        <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ServletClient/serviceSetter6</service-ref-name>
+        <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class)
+      -->
+      <service-ref>
+        <service-ref-name>port1</service-ref-name>
+        <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+      -->
+      <service-ref>
+        <service-ref-name>Port2</service-ref-name>
+        <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef(value = TestEndpointService.class)
+      -->
+      <service-ref>
+        <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.ServletClient/port3</service-ref-name>
+        <wsdl-override>WEB-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+  
+</jboss-web>
\ No newline at end of file


Property changes on: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss.xml
===================================================================
--- trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss.xml	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss.xml	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">
+
+<jboss>
+  
+  <enterprise-beans>
+    <session>
+      <ejb-name>EJB3Client</ejb-name>
+      
+      <!-- 
+      @WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
+      <service-ref>
+        <service-ref-name>service1</service-ref-name>
+        <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      -->
+      
+      <!-- 
+      @WebServiceRef(name = "service2", value = TestEndpointService.class)
+      -->
+      <service-ref>
+        <service-ref-name>service2</service-ref-name>
+        <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef(name = "TestEndpointService3")
+      -->
+      <service-ref>
+        <service-ref-name>TestEndpointService3</service-ref-name>
+        <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef
+      -->
+      <service-ref>
+        <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.EJB3Client/service4</service-ref-name>
+        <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef(name = "TestEndpointService5")
+      -->
+      <service-ref>
+        <service-ref-name>TestEndpointService5</service-ref-name>
+        <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef
+      -->
+      <service-ref>
+        <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.EJB3Client/serviceSetter6</service-ref-name>
+        <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef(name = "port1", value = TestEndpointService.class, type = TestEndpoint.class)
+      -->
+      <service-ref>
+        <service-ref-name>port1</service-ref-name>
+        <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+      -->
+      <service-ref>
+        <service-ref-name>Port2</service-ref-name>
+        <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+      
+      <!-- 
+      @WebServiceRef(value = TestEndpointService.class)
+      -->
+      <service-ref>
+        <service-ref-name>org.jboss.test.ws.jaxws.webserviceref.EJB3Client/port3</service-ref-name>
+        <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+      </service-ref>
+    </session>
+  </enterprise-beans>
+  
+</jboss>
\ No newline at end of file


Property changes on: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/jboss.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
===================================================================
--- trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,50 @@
+<!--
+  wsimport -d ../../../java -keep -p org.jboss.test.ws.jaxws.webserviceref META-INF/wsdl/TestEndpoint.wsdl
+-->
+<definitions name='TestEndpointService' targetNamespace='http://org.jboss.ws/wsref' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/wsref' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+  <xs:schema targetNamespace='http://org.jboss.ws/wsref' version='1.0' xmlns:tns='http://org.jboss.ws/wsref' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+   <xs:element name='echo' type='tns:echo'/>
+   <xs:element name='echoResponse' type='tns:echoResponse'/>
+   <xs:complexType name='echo'>
+    <xs:sequence>
+     <xs:element form='qualified' minOccurs='0' name='arg0' type='xs:string'/>
+    </xs:sequence>
+   </xs:complexType>
+   <xs:complexType name='echoResponse'>
+    <xs:sequence>
+     <xs:element form='qualified' minOccurs='0' name='return' type='xs:string'/>
+    </xs:sequence>
+   </xs:complexType>
+  </xs:schema>
+ </types>
+ <message name='TestEndpoint_echo'>
+  <part element='tns:echo' name='echo'/>
+ </message>
+ <message name='TestEndpoint_echoResponse'>
+  <part element='tns:echoResponse' name='echoResponse'/>
+ </message>
+ <portType name='TestEndpoint'>
+  <operation name='echo' parameterOrder='echo'>
+   <input message='tns:TestEndpoint_echo'/>
+   <output message='tns:TestEndpoint_echoResponse'/>
+  </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+  <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+  <operation name='echo'>
+   <soap:operation soapAction=''/>
+   <input>
+    <soap:body use='literal'/>
+   </input>
+   <output>
+    <soap:body use='literal'/>
+   </output>
+  </operation>
+ </binding>
+ <service name='TestEndpointService'>
+  <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+   <soap:address location='http://@jbosstest.host.name@:8080/jaxws-webserviceref/TestEndpoint'/>
+  </port>
+ </service>
+</definitions>
\ No newline at end of file


Property changes on: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/resources/ws/jaxws/webserviceref/WEB-INF/web.xml
===================================================================
--- trunk/testsuite/src/resources/ws/jaxws/webserviceref/WEB-INF/web.xml	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/resources/ws/jaxws/webserviceref/WEB-INF/web.xml	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+  
+  <servlet>
+    <servlet-name>TestEndpoint</servlet-name>
+    <servlet-class>org.jboss.test.ws.jaxws.webserviceref.TestEndpointImpl</servlet-class>
+  </servlet>
+  
+  <servlet-mapping>
+    <servlet-name>TestEndpoint</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+</web-app>
\ No newline at end of file


Property changes on: trunk/testsuite/src/resources/ws/jaxws/webserviceref/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: trunk/testsuite/src/resources/ws/jaxws/webserviceref/servlet-client/WEB-INF/web.xml
===================================================================
--- trunk/testsuite/src/resources/ws/jaxws/webserviceref/servlet-client/WEB-INF/web.xml	2006-11-16 21:35:27 UTC (rev 58466)
+++ trunk/testsuite/src/resources/ws/jaxws/webserviceref/servlet-client/WEB-INF/web.xml	2006-11-16 21:37:53 UTC (rev 58467)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+  
+  <servlet>
+    <servlet-name>ServletClient</servlet-name>
+    <servlet-class>org.jboss.test.ws.jaxws.webserviceref.ServletClient</servlet-class>
+  </servlet>
+  
+  <servlet-mapping>
+    <servlet-name>ServletClient</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+</web-app>
\ No newline at end of file


Property changes on: trunk/testsuite/src/resources/ws/jaxws/webserviceref/servlet-client/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jboss-cvs-commits mailing list