[jbossws-commits] JBossWS SVN: r3874 - in branches/hbraun/trunk: jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples and 12 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri Jul 13 06:13:31 EDT 2007


Author: heiko.braun at jboss.com
Date: 2007-07-13 06:13:30 -0400 (Fri, 13 Jul 2007)
New Revision: 3874

Added:
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Remote.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpoint.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointClient.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointImpl.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointService.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServiceRefOverridesTestCase.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/StubPropertyTestCase.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientTwo.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointImpl.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java
   branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefServletTestCase.java
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/application-client.xml
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/jbossws-client-config.xml
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-secure/
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-secure/application-client.xml
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/application-client.xml
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/wsdl/
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/web.xml
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF/
   branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF/web.xml
Removed:
   branches/hbraun/trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/
   branches/hbraun/trunk/jbossws-core/src/test/resources/jaxws/samples/webserviceref/
Modified:
   branches/hbraun/trunk/jbossws-core/ant-import-tests/build-samples-jaxws.xml
   branches/hbraun/trunk/testsuite/ant-import/build-jars-jaxws.xml
Log:
Move webserviceref samples to global test suite

Modified: branches/hbraun/trunk/jbossws-core/ant-import-tests/build-samples-jaxws.xml
===================================================================
--- branches/hbraun/trunk/jbossws-core/ant-import-tests/build-samples-jaxws.xml	2007-07-13 10:05:26 UTC (rev 3873)
+++ branches/hbraun/trunk/jbossws-core/ant-import-tests/build-samples-jaxws.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -18,95 +18,6 @@
     
     <mkdir dir="${tests.output.dir}/libs"/>
     
-    <!-- jaxws-webserviceref -->
-    <war warfile="${tests.output.dir}/libs/jaxws-samples-webserviceref.war" webxml="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF/web.xml">
-      <classes dir="${tests.output.dir}/classes">
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointImpl.class"/>
-      </classes>
-    </war>
-    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-client.jar">
-      <fileset dir="${tests.output.dir}/classes">
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
-      </fileset>
-      <metainf dir="${tests.output.dir}/resources/jaxws/samples/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.samples.webserviceref.TestEndpointClientOne"/>
-      </manifest>
-    </jar>
-    <war destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-servlet-client.war"
-      webxml="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client/web.xml">
-      <classes dir="${tests.output.dir}/classes">
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
-      </classes>
-      <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
-        <include name="wsdl/**"/>
-      </webinf>
-      <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client">
-        <include name="jboss-web.xml"/>
-      </webinf>
-    </war>
-    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-ejb3-client.jar">
-      <fileset dir="${tests.output.dir}/classes">
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Remote.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
-      </fileset>
-      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
-        <include name="jboss.xml"/>
-        <include name="wsdl/**"/>
-      </metainf>
-    </jar>
-    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure.jar">
-      <fileset dir="${tests.output.dir}/classes">
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointImpl.class"/>
-      </fileset>
-    </jar>
-    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure-client.jar">
-      <fileset dir="${tests.output.dir}/classes">
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointClient.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointService.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpoint.class"/>
-      </fileset>
-      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF-secure">
-        <include name="application-client.xml"/>
-        <include name="jboss-client.xml"/>
-      </metainf>
-      <manifest>
-        <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointClient"/>
-      </manifest>
-    </jar>
-    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-override-client.jar">
-      <fileset dir="${tests.output.dir}/classes">
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientTwo.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
-        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
-      </fileset>
-      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF-override">
-        <include name="jbossws-client-config.xml"/>
-        <include name="application-client.xml"/>
-        <include name="jboss-client.xml"/>
-      </metainf>
-      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
-        <include name="wsdl/**"/>
-      </metainf>
-      <manifest>
-        <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientTwo"/>
-      </manifest>
-    </jar>
-    
     <!-- jaxws-samples-wsaddressing -->
     <war warfile="${tests.output.dir}/libs/jaxws-samples-wsaddressing.war" webxml="${tests.output.dir}/resources/jaxws/samples/wsaddressing/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">

Modified: branches/hbraun/trunk/testsuite/ant-import/build-jars-jaxws.xml
===================================================================
--- branches/hbraun/trunk/testsuite/ant-import/build-jars-jaxws.xml	2007-07-13 10:05:26 UTC (rev 3873)
+++ branches/hbraun/trunk/testsuite/ant-import/build-jars-jaxws.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -347,6 +347,95 @@
       </fileset>
     </jar>
 
+     <!-- jaxws-webserviceref -->
+    <war warfile="${tests.output.dir}/libs/jaxws-samples-webserviceref.war" webxml="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF/web.xml">
+      <classes dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointImpl.class"/>
+      </classes>
+    </war>
+    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-client.jar">
+      <fileset dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
+      </fileset>
+      <metainf dir="${tests.output.dir}/resources/jaxws/samples/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.samples.webserviceref.TestEndpointClientOne"/>
+      </manifest>
+    </jar>
+    <war destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-servlet-client.war"
+      webxml="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client/web.xml">
+      <classes dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
+      </classes>
+      <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
+        <include name="wsdl/**"/>
+      </webinf>
+      <webinf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/WEB-INF-client">
+        <include name="jboss-web.xml"/>
+      </webinf>
+    </war>
+    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-ejb3-client.jar">
+      <fileset dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Remote.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
+      </fileset>
+      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
+        <include name="jboss.xml"/>
+        <include name="wsdl/**"/>
+      </metainf>
+    </jar>
+    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure.jar">
+      <fileset dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointImpl.class"/>
+      </fileset>
+    </jar>
+    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-secure-client.jar">
+      <fileset dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointClient.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointService.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpoint.class"/>
+      </fileset>
+      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF-secure">
+        <include name="application-client.xml"/>
+        <include name="jboss-client.xml"/>
+      </metainf>
+      <manifest>
+        <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointClient"/>
+      </manifest>
+    </jar>
+    <jar destfile="${tests.output.dir}/libs/jaxws-samples-webserviceref-override-client.jar">
+      <fileset dir="${tests.output.dir}/classes">
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientTwo.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.class"/>
+        <include name="org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.class"/>
+      </fileset>
+      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF-override">
+        <include name="jbossws-client-config.xml"/>
+        <include name="application-client.xml"/>
+        <include name="jboss-client.xml"/>
+      </metainf>
+      <metainf dir="${tests.output.dir}/resources/jaxws/samples/webserviceref/META-INF">
+        <include name="wsdl/**"/>
+      </metainf>
+      <manifest>
+        <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientTwo"/>
+      </manifest>
+    </jar>
+     
     <!-- jaxws-samples-xop-doclit -->
     <war jarfile="${tests.output.dir}/libs/jaxws-samples-xop-doclit.war" webxml="${tests.output.dir}/resources/jaxws/samples/xop/doclit/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/classes">

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.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 setService5(TestEndpointService service)
+   {
+      this.service5 = service;
+   }
+   private TestEndpointService service5;
+   
+   // Test on method without name
+   @WebServiceRef
+   public void setService6(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() + "/service6")).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: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Remote.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Remote.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Remote.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,27 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * 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.samples.webserviceref;
+
+public interface EJB3Remote
+{
+   String echo(String input);
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpoint.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpoint.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpoint.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,35 @@
+
+package org.jboss.test.ws.jaxws.samples.webserviceref;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ * 
+ */
+ at WebService(name = "SecureEndpoint", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "http://localhost.localdomain:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl")
+ at SOAPBinding(style = Style.RPC)
+public interface SecureEndpoint {
+
+
+    /**
+     * 
+     * @param arg0
+     * @return
+     *     returns java.lang.String
+     */
+    @WebMethod
+    @WebResult(targetNamespace = "http://org.jboss.ws/wsref", partName = "return")
+    public String echo(
+        @WebParam(name = "arg0", partName = "arg0")
+        String arg0);
+
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointClient.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointClient.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointClient.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.webserviceref;
+
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+
+import org.jboss.logging.Logger;
+
+public class SecureEndpointClient
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(SecureEndpointClient.class);
+
+   @WebServiceRef(name = "SecureService1")
+   static SecureEndpointService secureService1;
+
+   @WebServiceRef(name = "SecureService2")
+   static Service secureService2;
+
+   @WebServiceRef(name = "SecurePort1")
+   static SecureEndpoint securePort1;
+
+   static String retStr;
+
+   public static void main(String[] args)
+   {
+      String reqMsg = args[0];
+      log.info("echo: " + reqMsg);
+
+      String username = null;
+      if (args.length > 1)
+         username = args[1];
+
+      String password = null;
+      if (args.length > 2)
+         password = args[2];
+
+      SecureEndpoint port = secureService1.getSecureEndpointPort();
+      String retMsg = invokeEndpoint(port, reqMsg, username, password);
+      
+      port = secureService2.getPort(SecureEndpoint.class);
+      retMsg += "|" + invokeEndpoint(port, reqMsg, username, password);
+      
+      port = securePort1;
+      retMsg += "|" + invokeEndpoint(port, reqMsg, username, password);
+      
+      retStr = retMsg;
+   }
+
+   private static String invokeEndpoint(SecureEndpoint port, String inStr, String username, String password)
+   {
+      if (username != null && password != null)
+      {
+         BindingProvider bindingProvider = (BindingProvider)port;
+         bindingProvider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, username);
+         bindingProvider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
+      }
+
+      return port.echo(inStr);
+   }
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointImpl.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointImpl.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointImpl.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.webserviceref;
+
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+import org.jboss.annotation.security.SecurityDomain;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.annotation.WebContext;
+
+ at WebService(name = "SecureEndpoint", serviceName = "SecureEndpointService", targetNamespace = "http://org.jboss.ws/wsref")
+ at Stateless(name = "SecureEndpoint")
+ at SOAPBinding(style = Style.RPC)
+
+ at WebContext(contextRoot="/jaxws-samples-webserviceref-secure", urlPattern="/*", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
+ at SecurityDomain("JBossWS")
+ at RolesAllowed("friend")
+public class SecureEndpointImpl
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(SecureEndpointImpl.class);
+
+   @WebMethod
+   public String echo(String input)
+   {
+      log.info(input);
+      return input;
+   }
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointService.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointService.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/SecureEndpointService.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,55 @@
+
+package org.jboss.test.ws.jaxws.samples.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-b26-ea3
+ * Generated source version: 2.0
+ * 
+ */
+ at WebServiceClient(name = "SecureEndpointService", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "http://localhost.localdomain:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl")
+public class SecureEndpointService
+    extends Service
+{
+
+    private final static URL WSDL_LOCATION;
+    private final static QName SECUREENDPOINTSERVICE = new QName("http://org.jboss.ws/wsref", "SecureEndpointService");
+    private final static QName SECUREENDPOINTPORT = new QName("http://org.jboss.ws/wsref", "SecureEndpointPort");
+
+    static {
+        URL url = null;
+        try {
+            url = new URL("http://localhost.localdomain:8080/jaxws-samples-webserviceref-secure/SecureEndpoint?wsdl");
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        }
+        WSDL_LOCATION = url;
+    }
+
+    public SecureEndpointService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public SecureEndpointService() {
+        super(WSDL_LOCATION, SECUREENDPOINTSERVICE);
+    }
+
+    /**
+     * 
+     * @return
+     *     returns SecureEndpoint
+     */
+    @WebEndpoint(name = "SecureEndpointPort")
+    public SecureEndpoint getSecureEndpointPort() {
+        return (SecureEndpoint)super.getPort(SECUREENDPOINTPORT, SecureEndpoint.class);
+    }
+
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServiceRefOverridesTestCase.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServiceRefOverridesTestCase.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServiceRefOverridesTestCase.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.webserviceref;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.client.ClientLauncher;
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
+/**
+ * Test @WebServiceRef overrides in jboss-client.xml
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 18-Jan-2007
+ */
+public class ServiceRefOverridesTestCase extends JBossWSTest
+{
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-samples-webserviceref";
+
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(ServiceRefOverridesTestCase.class, "jaxws-samples-webserviceref.war, jaxws-samples-webserviceref-override-client.jar");
+   }
+
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+
+      if (TestEndpointClientTwo.iniCtx == null)
+         TestEndpointClientTwo.iniCtx = getInitialContext();
+   }
+
+   public void testService1() throws Throwable
+   {
+      String resStr = invokeTest(getName());
+      assertEquals(getName(), resStr);
+   }
+
+   public void testService2() throws Throwable
+   {
+      String resStr = invokeTest(getName());
+      assertEquals(getName(), resStr);
+   }
+
+   public void testService3() throws Throwable
+   {
+      String resStr = invokeTest(getName());
+      assertEquals(getName() + getName(), resStr);
+   }
+
+   public void testService4() throws Throwable
+   {
+      String resStr = invokeTest(getName());
+      assertEquals(getName() + getName(), resStr);
+   }
+
+   public void testPort1() throws Throwable
+   {
+      String resStr = invokeTest(getName());
+      assertEquals(getName(), resStr);
+   }
+
+   public void testPort2() throws Throwable
+   {
+      String resStr = invokeTest(getName());
+      assertEquals(getName() + getName(), resStr);
+   }
+
+   public void testPort3() throws Throwable
+   {
+      String resStr = invokeTest(getName());
+      assertEquals(getName() + getName(), resStr);
+   }
+
+   private String invokeTest(String reqStr) throws Throwable
+   {
+      new ClientLauncher().launch(TestEndpointClientTwo.class.getName(), "jbossws-client", new String[] { reqStr });
+      return TestEndpointClientTwo.testResult.get(reqStr);
+   }
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.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 setService5(TestEndpointService service)
+   {
+      this.service5 = service;
+   }
+   private TestEndpointService service5;
+   
+   // Test on method without name
+   @WebServiceRef
+   public void setService6(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() + "/service6")).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: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/StubPropertyTestCase.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/StubPropertyTestCase.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/StubPropertyTestCase.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.webserviceref;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.client.ClientLauncher;
+import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
+/**
+ * Test the JAXWS annotation: javax.xml.ws.WebServiceRef
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 23-Oct-2005
+ */
+public class StubPropertyTestCase extends JBossWSTest
+{
+   public final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-samples-webserviceref-secure";
+
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(StubPropertyTestCase.class, "jaxws-samples-webserviceref-secure.jar, jaxws-samples-webserviceref-secure-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 URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      QName qname = new QName("http://org.jboss.ws/wsref", "SecureEndpointService");
+      Service service = Service.create(wsdlURL, qname);
+      SecureEndpoint port = (SecureEndpoint)service.getPort(SecureEndpoint.class);
+
+      BindingProvider bindingProvider = (BindingProvider)port;
+      bindingProvider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
+      bindingProvider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+
+      String helloWorld = "Hello World";
+      Object retObj = port.echo(helloWorld);
+      assertEquals(helloWorld, retObj);
+   }
+
+   public void testUnconfiguredStub() throws Throwable
+   {
+      String reqMsg = "Hello World";
+      new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg, "kermit", "thefrog" });
+      assertEquals("Hello World|Hello World|Hello World", SecureEndpointClient.retStr);
+   }
+
+   public void testConfiguredStub() throws Throwable
+   {
+      String reqMsg = "Hello World";
+      new ClientLauncher().launch(SecureEndpointClient.class.getName(), "jbossws-client", new String[] { reqMsg });
+      assertEquals("Hello World|Hello World|Hello World", SecureEndpointClient.retStr);
+   }
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpoint.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,35 @@
+
+package org.jboss.test.ws.jaxws.samples.webserviceref;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ * 
+ */
+ at WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "http://localhost.localdomain:8080/jaxws-samples-webserviceref?wsdl")
+ at SOAPBinding(style = Style.RPC)
+public interface TestEndpoint {
+
+
+    /**
+     * 
+     * @param arg0
+     * @return
+     *     returns java.lang.String
+     */
+    @WebMethod
+    @WebResult(targetNamespace = "http://org.jboss.ws/wsref", partName = "return")
+    public String echo(
+        @WebParam(name = "arg0", partName = "arg0")
+        String arg0);
+
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.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 TestEndpointClientOne
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(TestEndpointClientOne.class);
+
+   // Test on field with name
+   @WebServiceRef(name = "TestEndpointService3")
+   static TestEndpointService service3;
+
+   // Test on field without name
+   @WebServiceRef
+   static TestEndpointService service4;
+
+   // Test on method with name
+   @WebServiceRef(name = "TestEndpointService5")
+   static void setService5(TestEndpointService service)
+   {
+      TestEndpointClientOne.service5 = service;
+   }
+   private static TestEndpointService service5;
+
+   // Test on method without name
+   @WebServiceRef
+   static void setService6(TestEndpointService service)
+   {
+      TestEndpointClientOne.service6 = service;
+   }
+   private static TestEndpointService service6;
+
+   // Test on field with name and value
+   @WebServiceRef(name = "Port2", value = TestEndpointService.class)
+   static TestEndpoint port2;
+
+   // Test on field with value
+   @WebServiceRef(value = TestEndpointService.class)
+   static TestEndpoint port3;
+
+   // Test on field
+   @WebServiceRef
+   static TestEndpoint port4;
+
+   // Test on field with name
+   @WebServiceRef (name = "Port5")
+   static TestEndpoint port5;
+
+   static InitialContext iniCtx;
+   static String retStr;
+
+   public static void main(String[] args)
+   {
+      String inStr = args[0];
+      log.info("echo: " + inStr);
+
+      ArrayList<TestEndpoint> ports = new ArrayList<TestEndpoint>();
+      try
+      {
+         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/" + TestEndpointClientOne.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/" + TestEndpointClientOne.class.getName() + "/service6")).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/" + TestEndpointClientOne.class.getName() + "/port3"));
+         ports.add(port4);
+         ports.add(port5);
+      }
+      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: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientTwo.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientTwo.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientTwo.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,207 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.webserviceref;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.naming.InitialContext;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.ConfigProvider;
+
+//Test on type
+ at WebServiceRef(name = "Service1")
+// Test multiple on type
+ at WebServiceRefs( { @WebServiceRef(name = "Service2"), @WebServiceRef(name = "Port1", type = TestEndpoint.class) })
+public class TestEndpointClientTwo
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(TestEndpointClientTwo.class);
+   
+   // Test on field
+   @WebServiceRef(name = "Service3")
+   static Service service3;
+
+   // Test on field
+   @WebServiceRef(name = "Service4")
+   static TestEndpointService service4;
+
+   // Test on field
+   @WebServiceRef(name = "Port2")
+   static TestEndpoint port2;
+
+   // Test on field
+   @WebServiceRef(name = "Port3")
+   static TestEndpoint port3;
+
+   static InitialContext iniCtx;
+   static Map<String, String> testResult = new HashMap<String, String>();
+
+   public static void main(String[] args) throws Exception
+   {
+      String testName = args[0];
+      TestEndpointClientTwo client = new TestEndpointClientTwo();
+      Method method = TestEndpointClientTwo.class.getMethod(testName, new Class[] { String.class });
+      try
+      {
+         String retStr = (String)method.invoke(client, testName);
+         testResult.put(testName, retStr);
+      }
+      catch (InvocationTargetException ex)
+      {
+         log.error("Invocation error", ex);
+         testResult.put(testName, ex.getTargetException().toString());
+      }
+      catch (Exception ex)
+      {
+         log.error("Error", ex);
+         testResult.put(testName, ex.toString());
+      }
+   }
+
+   /**
+    * Customize service-class-name, service-qname
+    */
+   public String testService1(String reqStr) throws Exception
+   {
+      TestEndpointService service = (TestEndpointService)iniCtx.lookup("java:comp/env/Service1");
+      TestEndpoint port = service.getTestEndpointPort();
+      return port.echo(reqStr);
+   }
+
+   /**
+    * Customize config-name, config-file
+    */
+   public String testService2(String reqStr) throws Exception
+   {
+      Service service = (Service)iniCtx.lookup("java:comp/env/Service2");
+
+      TestEndpoint port = service.getPort(TestEndpoint.class);
+      verifyConfig((ConfigProvider)port);
+      
+      return port.echo(reqStr);
+   }
+
+   /**
+    * Customize service-class-name, service-qname
+    */
+   public String testService3(String reqStr) throws Exception
+   {
+      TestEndpoint port = ((TestEndpointService)service3).getTestEndpointPort();
+      String resStr1 = port.echo(reqStr);
+      
+      TestEndpointService service = (TestEndpointService)iniCtx.lookup("java:comp/env/Service3");
+      port = service.getTestEndpointPort();
+      
+      String resStr2 = port.echo(reqStr);
+      
+      return resStr1 + resStr2; 
+   }
+
+   /**
+    * Customize config-name, config-file
+    */
+   public String testService4(String reqStr) throws Exception
+   {
+      TestEndpoint port = service4.getTestEndpointPort();
+      String resStr1 = port.echo(reqStr);
+      verifyConfig((ConfigProvider)port);
+      
+      TestEndpointService service = (TestEndpointService)iniCtx.lookup("java:comp/env/Service4");
+      port = service.getTestEndpointPort();
+      verifyConfig((ConfigProvider)port);
+      
+      String resStr2 = port.echo(reqStr);
+      
+      return resStr1 + resStr2; 
+   }
+
+   /**
+    * Customize port-info: port-qname, config-name, config-file 
+    */
+   public String testPort1(String reqStr) throws Exception
+   {
+      TestEndpoint port = (TestEndpoint)iniCtx.lookup("java:comp/env/Port1");
+      verifyConfig((ConfigProvider)port);
+      
+      return port.echo(reqStr);
+   }
+
+   /**
+    * Customize port-info: service-endpoint-interface, config-name, config-file 
+    */
+   public String testPort2(String reqStr) throws Exception
+   {
+      verifyConfig((ConfigProvider)port2);
+      String resStr1 = port2.echo(reqStr);
+
+      TestEndpoint port = (TestEndpoint)iniCtx.lookup("java:comp/env/Port2");
+      verifyConfig((ConfigProvider)port);
+      
+      String resStr2 = port.echo(reqStr);
+      
+      return resStr1 + resStr2; 
+   }
+
+   /**
+    * Customize port-info: service-endpoint-interface, port-qname, stub-property 
+    */
+   public String testPort3(String reqStr) throws Exception
+   {
+      String resStr1 = port3.echo(reqStr);
+      
+      BindingProvider bp = (BindingProvider)port3;
+      verifyProperties(bp.getRequestContext());
+
+      TestEndpoint port = (TestEndpoint)iniCtx.lookup("java:comp/env/Port3");
+      String resStr2 = port.echo(reqStr);
+      
+      return resStr1 + resStr2; 
+   }
+
+   private void verifyProperties(Map<String, Object> ctx)
+   {
+      String username = (String)ctx.get(BindingProvider.USERNAME_PROPERTY);
+      if ("kermit".equals(username) == false) 
+         throw new RuntimeException("Invalid username: " + username);
+      
+      String password = (String)ctx.get(BindingProvider.PASSWORD_PROPERTY);
+      if ("thefrog".equals(password) == false) 
+         throw new RuntimeException("Invalid password: " + password);
+   }
+
+   private void verifyConfig(ConfigProvider cp)
+   {
+      if ("Custom Client".equals(cp.getConfigName()) == false)
+         throw new RuntimeException("Invalid config name: " + cp.getConfigName());
+
+      if ("META-INF/jbossws-client-config.xml".equals(cp.getConfigFile()) == false)
+         throw new RuntimeException("Invalid config file: " + cp.getConfigFile());
+   }
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointImpl.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointImpl.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointImpl.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.webserviceref;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+import org.jboss.logging.Logger;
+
+ at WebService(name = "TestEndpoint", serviceName = "TestEndpointService", targetNamespace = "http://org.jboss.ws/wsref")
+ at SOAPBinding(style = Style.RPC)
+public class TestEndpointImpl
+{
+   // Provide logging
+   private static Logger log = Logger.getLogger(TestEndpointImpl.class);
+
+   @WebMethod
+   public String echo(String input)
+   {
+      log.info(input);
+      return input;
+   }
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointService.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,55 @@
+
+package org.jboss.test.ws.jaxws.samples.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-b26-ea3
+ * Generated source version: 2.0
+ * 
+ */
+ at WebServiceClient(name = "TestEndpointService", targetNamespace = "http://org.jboss.ws/wsref", wsdlLocation = "file://bogus-location/jaxws-samples-webserviceref?wsdl")
+public class TestEndpointService
+    extends Service
+{
+
+    private final static URL WSDL_LOCATION;
+    private final static QName TESTENDPOINTSERVICE = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
+    private final static QName TESTENDPOINTPORT = new QName("http://org.jboss.ws/wsref", "TestEndpointPort");
+
+    static {
+        URL url = null;
+        try {
+            url = new URL("file://bogus-location/jaxws-samples-webserviceref?wsdl");
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        }
+        WSDL_LOCATION = url;
+    }
+
+    public TestEndpointService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public TestEndpointService() {
+        super(WSDL_LOCATION, TESTENDPOINTSERVICE);
+    }
+
+    /**
+     * 
+     * @return
+     *     returns TestEndpoint
+     */
+    @WebEndpoint(name = "TestEndpointPort")
+    public TestEndpoint getTestEndpointPort() {
+        return (TestEndpoint)super.getPort(TESTENDPOINTPORT, TestEndpoint.class);
+    }
+
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefClientTestCase.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.webserviceref;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.client.ClientLauncher;
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
+/**
+ * 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-samples-webserviceref";
+
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(WebServiceRefClientTestCase.class, "jaxws-samples-webserviceref.war, jaxws-samples-webserviceref-client.jar");
+   }
+
+   public void testGeneratedService() throws Exception
+   {
+      TestEndpointService service = new TestEndpointService();
+      TestEndpoint port = service.getTestEndpointPort();
+      
+      // Set the target endpoint address, since the service could not be created from wsdl 
+      BindingProvider provider = (BindingProvider)port;
+      provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, TARGET_ENDPOINT_ADDRESS);
+
+      String helloWorld = "Hello World!";
+      Object retObj = port.echo(helloWorld);
+      assertEquals(helloWorld, retObj);
+   }
+
+   public void testDynamicProxy() throws Exception
+   {
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      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 Throwable
+   {
+      String helloWorld = "Hello World!";
+      TestEndpointClientOne.iniCtx = getInitialContext();
+
+      new ClientLauncher().launch(TestEndpointClientOne.class.getName(), "jbossws-client", new String[] { helloWorld });
+      assertEquals(helloWorld, TestEndpointClientOne.retStr);
+   }
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefEJB3TestCase.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.webserviceref;
+
+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.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
+/**
+ * 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-samples-webserviceref";
+
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(WebServiceRefEJB3TestCase.class, "jaxws-samples-webserviceref.war");
+   }
+
+   public void testDynamicProxy() throws Exception
+   {
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      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
+   {
+      deploy("jaxws-samples-webserviceref-ejb3-client.jar");
+      try
+      {
+         InitialContext iniCtx = getInitialContext();
+         EJB3Remote ejb3Remote = (EJB3Remote)iniCtx.lookup("/ejb3/EJB3Client");
+
+         String helloWorld = "Hello World!";
+         Object retObj = ejb3Remote.echo(helloWorld);
+         assertEquals(helloWorld, retObj);
+      }
+      finally
+      {
+         undeploy("jaxws-samples-webserviceref-ejb3-client.jar");
+      }
+   }
+}


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

Added: branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefServletTestCase.java
===================================================================
--- branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefServletTestCase.java	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/webserviceref/WebServiceRefServletTestCase.java	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * 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.samples.webserviceref;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
+/**
+ * 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-samples-webserviceref";
+
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(WebServiceRefServletTestCase.class, "jaxws-samples-webserviceref.war");
+   }
+
+   public void testDynamicProxy() throws Exception
+   {
+      URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+      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
+   {
+      deploy("jaxws-samples-webserviceref-servlet-client.war");
+      try
+      {
+         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);
+      }
+      finally
+      {
+         undeploy("jaxws-samples-webserviceref-servlet-client.war");
+      }
+   }
+}


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

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/application-client.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/application-client.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/application-client.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -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: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/application-client.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,96 @@
+<?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.samples.webserviceref.TestEndpointClientOne/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.samples.webserviceref.TestEndpointClientOne/service6</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.samples.webserviceref.TestEndpointClientOne/port3</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.samples.webserviceref.TestEndpointClientOne/port4</service-ref-name>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "Port5")
+  -->
+  <service-ref>
+    <service-ref-name>Port5</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: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/jboss-client.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,88 @@
+<?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>
+  
+  <!-- [JBWS-1339] @Security domain vs. <security-domain> -->
+  <security-domain>java:/jaas/JBossWS</security-domain>
+  
+  <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.samples.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.samples.webserviceref.EJB3Client/service6</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.samples.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: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/wsdl/TestEndpoint.wsdl	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF/wsdl/TestEndpoint.wsdl	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,39 @@
+<!--
+  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'>
+ 
+ <message name='TestEndpoint_echo'>
+  <part name='arg0' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoResponse'>
+  <part name='return' type='xsd:string'/>
+ </message>
+ 
+ <portType name='TestEndpoint'>
+  <operation name='echo' parameterOrder='arg0'>
+   <input message='tns:TestEndpoint_echo'/>
+   <output message='tns:TestEndpoint_echoResponse'/>
+  </operation>
+ </portType>
+ 
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+  <operation name='echo'>
+   <soap:operation soapAction=''/>
+   <input>
+    <soap:body namespace='http://org.jboss.ws/wsref' use='literal'/>
+   </input>
+   <output>
+    <soap:body namespace='http://org.jboss.ws/wsref' use='literal'/>
+   </output>
+  </operation>
+ </binding>
+ 
+ <service name='TestEndpointService'>
+  <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+   <soap:address location='http://@jboss.bind.address@:8080/jaxws-samples-webserviceref'/>
+  </port>
+ </service>
+ 
+</definitions>


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

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/application-client.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/application-client.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/application-client.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -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: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/application-client.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/jboss-client.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,97 @@
+<?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")
+  -->
+  <service-ref>
+    <service-ref-name>Service1</service-ref-name>
+    <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-impl-class>
+    <service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "Service2")
+  -->
+  <service-ref>
+    <service-ref-name>Service2</service-ref-name>
+    <config-name>Custom Client</config-name>
+    <config-file>META-INF/jbossws-client-config.xml</config-file>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "Service3")
+  -->
+  <service-ref>
+    <service-ref-name>Service3</service-ref-name>
+    <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointService</service-impl-class>
+    <service-qname>{http://org.jboss.ws/wsref}TestEndpointService</service-qname>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "Service4")
+  -->
+  <service-ref>
+    <service-ref-name>Service4</service-ref-name>
+    <port-component-ref>
+      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
+      <config-name>Custom Client</config-name>
+      <config-file>META-INF/jbossws-client-config.xml</config-file>
+    </port-component-ref>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "Port1", type = TestEndpoint.class)
+  -->
+  <service-ref>
+    <service-ref-name>Port1</service-ref-name>
+    <port-component-ref>
+      <port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
+      <config-name>Custom Client</config-name>
+      <config-file>META-INF/jbossws-client-config.xml</config-file>
+    </port-component-ref>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "Port2")
+  -->
+  <service-ref>
+    <service-ref-name>Port2</service-ref-name>
+    <port-component-ref>
+      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
+      <config-name>Custom Client</config-name>
+      <config-file>META-INF/jbossws-client-config.xml</config-file>
+    </port-component-ref>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+  <!-- 
+  @WebServiceRef(name = "Port3")
+  -->
+  <service-ref>
+    <service-ref-name>Port3</service-ref-name>
+    <port-component-ref>
+      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpoint</service-endpoint-interface>
+      <port-qname>{http://org.jboss.ws/wsref}TestEndpointPort</port-qname>
+      <stub-property>
+        <prop-name>javax.xml.ws.security.auth.username</prop-name>
+        <prop-value>kermit</prop-value>
+      </stub-property>
+      <stub-property>
+        <prop-name>javax.xml.ws.security.auth.password</prop-name>
+        <prop-value>thefrog</prop-value>
+      </stub-property>
+    </port-component-ref>
+    <wsdl-override>META-INF/wsdl/TestEndpoint.wsdl</wsdl-override>
+  </service-ref>
+  
+</jboss-client>
\ No newline at end of file


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

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/jbossws-client-config.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/jbossws-client-config.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/jbossws-client-config.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<jaxrpc-config xmlns="urn:jboss:jaxrpc-config:2.0" 
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+  xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
+  xsi:schemaLocation="urn:jboss:jaxrpc-config:2.0 jaxrpc-config_2_0.xsd">
+  
+  <client-config>
+    <config-name>Custom Client</config-name>
+  </client-config>
+  
+</jaxrpc-config>
\ No newline at end of file


Property changes on: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-override/jbossws-client-config.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-secure/application-client.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-secure/application-client.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-secure/application-client.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -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>SecureEndpointService</display-name>
+  
+</application-client>


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

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/META-INF-secure/jboss-client.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -0,0 +1,59 @@
+<?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>
+  
+  <service-ref>
+    <service-ref-name>SecureService1</service-ref-name>
+    <service-impl-class>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpointService</service-impl-class>
+    <service-qname>{http://org.jboss.ws/wsref}SecureEndpointService</service-qname>
+    <port-component-ref>
+      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpoint</service-endpoint-interface>
+      <port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-qname>
+      <stub-property>
+        <prop-name>javax.xml.ws.security.auth.username</prop-name>
+        <prop-value>kermit</prop-value>
+      </stub-property>
+      <stub-property>
+        <prop-name>javax.xml.ws.security.auth.password</prop-name>
+        <prop-value>thefrog</prop-value>
+      </stub-property>
+    </port-component-ref>
+    <wsdl-override>http://@jboss.bind.address@:8080/jaxws-samples-webserviceref-secure/SecureEndpointImpl?wsdl</wsdl-override>
+  </service-ref>
+  
+  <service-ref>
+    <service-ref-name>SecureService2</service-ref-name>
+    <port-component-ref>
+      <port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-qname>
+      <stub-property>
+        <prop-name>javax.xml.ws.security.auth.username</prop-name>
+        <prop-value>kermit</prop-value>
+      </stub-property>
+      <stub-property>
+        <prop-name>javax.xml.ws.security.auth.password</prop-name>
+        <prop-value>thefrog</prop-value>
+      </stub-property>
+    </port-component-ref>
+    <wsdl-override>http://@jboss.bind.address@:8080/jaxws-samples-webserviceref-secure/SecureEndpointImpl?wsdl</wsdl-override>
+  </service-ref>
+  
+  <service-ref>
+    <service-ref-name>SecurePort1</service-ref-name>
+    <port-component-ref>
+      <service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.SecureEndpoint</service-endpoint-interface>
+      <stub-property>
+        <prop-name>javax.xml.ws.security.auth.username</prop-name>
+        <prop-value>kermit</prop-value>
+      </stub-property>
+      <stub-property>
+        <prop-name>javax.xml.ws.security.auth.password</prop-name>
+        <prop-value>thefrog</prop-value>
+      </stub-property>
+    </port-component-ref>
+    <wsdl-override>http://@jboss.bind.address@:8080/jaxws-samples-webserviceref-secure/SecureEndpointImpl?wsdl</wsdl-override>
+  </service-ref>
+  
+</jboss-client>
\ No newline at end of file


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

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF/web.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF/web.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF/web.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -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.samples.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: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -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.samples.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.samples.webserviceref.ServletClient/service6</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.samples.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: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/web.xml
===================================================================
--- branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/web.xml	                        (rev 0)
+++ branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/web.xml	2007-07-13 10:13:30 UTC (rev 3874)
@@ -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.samples.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: branches/hbraun/trunk/testsuite/src/resources/jaxws/samples/webserviceref/WEB-INF-client/web.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbossws-commits mailing list