[jbossws-commits] JBossWS SVN: r9682 - in stack/native/trunk/modules/testsuite/native-tests: src/test/java/org/jboss/test/ws/jaxws and 10 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Mar 25 06:13:22 EDT 2009


Author: richard.opalka at jboss.com
Date: 2009-03-25 06:13:21 -0400 (Wed, 25 Mar 2009)
New Revision: 9682

Added:
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBean.java
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java
   stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/
   stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/correct/
   stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/correct/META-INF/
   stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/correct/META-INF/application.xml
   stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/correct/META-INF/jboss-app.xml
   stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/wrong/
   stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/wrong/META-INF/
   stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/wrong/META-INF/application.xml
   stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/wrong/META-INF/jboss-app.xml
Modified:
   stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarAddressingEndpoint.java
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarEndpoint.java
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperMTOMAS5Endpoint.java
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperMTOMEndpoint.java
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperSWAAS5Endpoint.java
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperSWAEndpoint.java
   stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
Log:
[JBWS-2565] fixing tests to demonstrate best practices

Modified: stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml	2009-03-25 10:06:09 UTC (rev 9681)
+++ stack/native/trunk/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml	2009-03-25 10:13:21 UTC (rev 9682)
@@ -489,7 +489,37 @@
       </classes>
     </war>    
     
-    <!-- jaxws-webserviceref -->
+    <!-- jaxws-jbws2565 -->
+    <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565.jar">
+      <fileset dir="${tests.output.dir}/test-classes">
+        <include name="org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBean.class"/>
+      </fileset>
+    </jar>
+    <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565.ear">
+      <fileset dir="${tests.output.dir}/test-libs">
+        <include name="jaxws-jbws2565.jar"/>
+      </fileset>
+      <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws2565/correct/META-INF">
+        <include name="application.xml"/>
+        <include name="jboss-app.xml"/>
+      </metainf>
+    </jar>
+    <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565-wrong.jar">
+      <fileset dir="${tests.output.dir}/test-classes">
+        <include name="org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.class"/>
+      </fileset>
+    </jar>
+    <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565-wrong.ear">
+      <fileset dir="${tests.output.dir}/test-libs">
+        <include name="jaxws-jbws2565-wrong.jar"/>
+      </fileset>
+      <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws2565/wrong/META-INF">
+        <include name="application.xml"/>
+        <include name="jboss-app.xml"/>
+      </metainf>
+    </jar>
+
+  	<!-- jaxws-webserviceref -->
     <war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
       <classes dir="${tests.output.dir}/test-classes">
         <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.class"/>

Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java	                        (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java	2009-03-25 10:13:21 UTC (rev 9682)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2565;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2565] Problems with security after moving from AS 4.2.x series to AS 5.0.x series
+ *  
+ * @author richard.opalka at jboss.com
+ */
+public final class JBWS2565TestCase extends JBossWSTest
+{
+   
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(JBWS2565TestCase.class, "jaxws-jbws2565.ear");
+   }
+
+   public void test() throws Exception
+   {
+      final ServiceFactory factory = ServiceFactory.newInstance();
+      final Service service = factory.createService(new QName("http://my.services.web", "MyWebServiceName"));
+      final Call call = service.createCall(new QName("http://my.services.web", "MyWebServicePort"));
+      call.setTargetEndpointAddress("http://" + getServerHost() + ":8080/jaxws-jbws2565/MyWebServiceBean?wsdl");
+      call.setOperationName(new QName("http://my.services.web", "doStuff"));
+      final QName QNAME_TYPE_STRING = new QName("http://www.w3.org/2001/XMLSchema", "string");
+      call.setReturnType(QNAME_TYPE_STRING);
+      final String[] serviceArgs = {};
+      final String result = (String) call.invoke(serviceArgs);
+      assertEquals("i've done stuff", result);
+   }
+   
+   public void testWrongArchiveDeployment() throws Exception
+   {
+      try
+      {
+         this.deploy("jaxws-jbws2565-wrong.ear");
+         fail("Deployment of this archive had to fail.");
+      }
+      catch (Exception ignore)
+      {
+         log.error("Expected exception caught:" + ignore.getMessage(), ignore);
+      }
+   }
+   
+}

Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBean.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBean.java	                        (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBean.java	2009-03-25 10:13:21 UTC (rev 9682)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2565;
+
+import javax.annotation.security.PermitAll;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
+import org.jboss.wsf.spi.annotation.WebContext;
+
+ at Stateless
+ at PermitAll
+ at WebService
+(
+   name = "MyWebService",
+   targetNamespace = "http://my.services.web",
+   serviceName = "MyWebServiceName"
+)
+ at WebContext
+(
+   contextRoot = "/jaxws-jbws2565",
+   transportGuarantee = TransportGuarantee.NONE
+)
+ at SOAPBinding
+(
+   use = SOAPBinding.Use.LITERAL,
+   style = SOAPBinding.Style.DOCUMENT,
+   parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
+)
+public final class MyWebServiceBean
+{
+    @WebMethod
+    @PermitAll
+    public final String doStuff()
+    {
+        return "i've done stuff";
+    }
+}
\ No newline at end of file

Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java	                        (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java	2009-03-25 10:13:21 UTC (rev 9682)
@@ -0,0 +1,43 @@
+/**
+ * 
+ */
+package org.jboss.test.ws.jaxws.jbws2565;
+
+import javax.annotation.security.PermitAll;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
+import org.jboss.wsf.spi.annotation.WebContext;
+
+ at Stateless
+ at PermitAll
+ at WebService
+(
+   name = "MyWebService",
+   targetNamespace = "http://my.services.web",
+   serviceName = "MyWebServiceName"
+)
+ at WebContext
+(
+   contextRoot = "/jaxws-jbws2565-wrong",
+   transportGuarantee = TransportGuarantee.NONE,
+   authMethod = "NONE" // this is wrong value, deployment should be rejected
+)
+ at SOAPBinding
+(
+   use = SOAPBinding.Use.LITERAL,
+   style = SOAPBinding.Style.DOCUMENT,
+   parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
+)
+public final class MyWebServiceBeanWrong
+{
+   @WebMethod
+   @PermitAll
+   public final String doStuff()
+   {
+       return "i've done stuff";
+   }
+}

Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarAddressingEndpoint.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarAddressingEndpoint.java	2009-03-25 10:06:09 UTC (rev 9681)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarAddressingEndpoint.java	2009-03-25 10:13:21 UTC (rev 9682)
@@ -43,6 +43,8 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.wsf.spi.annotation.AuthMethod;
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 
 
@@ -53,16 +55,25 @@
  * @since 31-Jan-2008
  */
 @Stateless
- at WebService(name = "DarEndpoint",
-            targetNamespace = "http://org.jboss.ws/samples/dar",
-            serviceName = "DarService")
- at SOAPBinding(style = SOAPBinding.Style.RPC,
-             use = SOAPBinding.Use.LITERAL)
- at WebContext(contextRoot="/dar",
-            urlPattern="/*",
-            authMethod="BASIC",
-            transportGuarantee="NONE",
-            secureWSDLAccess=false)
+ at SOAPBinding
+(
+   style = SOAPBinding.Style.RPC,
+   use = SOAPBinding.Use.LITERAL
+)
+ at WebService
+(
+   name = "DarEndpoint",
+   serviceName = "DarService",
+   targetNamespace = "http://org.jboss.ws/samples/dar"
+)
+ at WebContext
+(
+   contextRoot = "/dar",
+   urlPattern = "/*",
+   authMethod = AuthMethod.BASIC,
+   transportGuarantee = TransportGuarantee.NONE,
+   secureWSDLAccess = false
+)
 @EndpointConfig(configName = "Standard WSAddressing Endpoint")
 public class DarAddressingEndpoint
 {

Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarEndpoint.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarEndpoint.java	2009-03-25 10:06:09 UTC (rev 9681)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/DarEndpoint.java	2009-03-25 10:13:21 UTC (rev 9682)
@@ -26,6 +26,8 @@
 import javax.jws.WebService;
 import javax.jws.soap.SOAPBinding;
 
+import org.jboss.wsf.spi.annotation.AuthMethod;
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 
 /**
@@ -35,16 +37,25 @@
  * @since 31-Jan-2008
  */
 @Stateless
- at WebService(name = "DarEndpoint",
-            targetNamespace = "http://org.jboss.ws/samples/dar",
-            serviceName = "DarService")
- at SOAPBinding(style = SOAPBinding.Style.RPC,
-             use = SOAPBinding.Use.LITERAL)
- at WebContext(contextRoot="/dar",
-            urlPattern="/*",
-            authMethod="BASIC",
-            transportGuarantee="NONE",
-            secureWSDLAccess=false)
+ at SOAPBinding
+(
+   style = SOAPBinding.Style.RPC,
+   use = SOAPBinding.Use.LITERAL
+)
+ at WebService
+(
+   name = "DarEndpoint",
+   serviceName = "DarService",
+   targetNamespace = "http://org.jboss.ws/samples/dar"
+)
+ at WebContext
+(
+   contextRoot = "/dar",
+   urlPattern = "/*",
+   authMethod = AuthMethod.BASIC,
+   transportGuarantee = TransportGuarantee.NONE,
+   secureWSDLAccess = false
+)
 public class DarEndpoint
 {
    @WebMethod(operationName = "process", action = "http://org.jboss.test.ws.jaxws.samples.dar/action/processIn")

Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperMTOMAS5Endpoint.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperMTOMAS5Endpoint.java	2009-03-25 10:06:09 UTC (rev 9681)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperMTOMAS5Endpoint.java	2009-03-25 10:13:21 UTC (rev 9682)
@@ -27,22 +27,32 @@
 import javax.xml.ws.BindingType;
 
 import org.jboss.ejb3.annotation.SecurityDomain;
+import org.jboss.wsf.spi.annotation.AuthMethod;
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 
-
 @Stateless
- at WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.news.NewspaperMTOM",
-      name = "NewspaperMTOMEndpoint",
-      targetNamespace = "http://org.jboss.ws/samples/news",
-      serviceName = "NewspaperMTOMService")
- at SOAPBinding(style = SOAPBinding.Style.RPC,
-       use = SOAPBinding.Use.LITERAL)
 @SecurityDomain("JBossWS")
- at WebContext(contextRoot="/news",
-      urlPattern="/newspaper/mtom",
-      authMethod="BASIC",
-      transportGuarantee="CONFIDENTIAL",
-      secureWSDLAccess=false)
+ at SOAPBinding
+(
+   style = SOAPBinding.Style.RPC,
+   use = SOAPBinding.Use.LITERAL
+)
+ at WebService
+(
+   name = "NewspaperMTOMEndpoint",
+   serviceName = "NewspaperMTOMService",
+   targetNamespace = "http://org.jboss.ws/samples/news",
+   endpointInterface = "org.jboss.test.ws.jaxws.samples.news.NewspaperMTOM"
+)
+ at WebContext
+(
+   contextRoot = "/news",
+   urlPattern = "/newspaper/mtom",
+   authMethod = AuthMethod.BASIC,
+   transportGuarantee = TransportGuarantee.CONFIDENTIAL,
+   secureWSDLAccess = false
+)
 @BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
 public class SecureNewspaperMTOMAS5Endpoint extends AbstractNewspaperMTOMEndpoint implements NewspaperMTOM
 {

Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperMTOMEndpoint.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperMTOMEndpoint.java	2009-03-25 10:06:09 UTC (rev 9681)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperMTOMEndpoint.java	2009-03-25 10:13:21 UTC (rev 9682)
@@ -27,22 +27,32 @@
 import javax.xml.ws.BindingType;
 
 import org.jboss.annotation.security.SecurityDomain;
+import org.jboss.wsf.spi.annotation.AuthMethod;
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 
-
 @Stateless
- at WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.news.NewspaperMTOM",
-      name = "NewspaperMTOMEndpoint",
-      targetNamespace = "http://org.jboss.ws/samples/news",
-      serviceName = "NewspaperMTOMService")
- at SOAPBinding(style = SOAPBinding.Style.RPC,
-       use = SOAPBinding.Use.LITERAL)
 @SecurityDomain("JBossWS")
- at WebContext(contextRoot="/news",
-      urlPattern="/newspaper/mtom",
-      authMethod="BASIC",
-      transportGuarantee="CONFIDENTIAL",
-      secureWSDLAccess=false)
+ at SOAPBinding
+(
+   style = SOAPBinding.Style.RPC,
+   use = SOAPBinding.Use.LITERAL
+)
+ at WebService
+(
+   name = "NewspaperMTOMEndpoint",
+   serviceName = "NewspaperMTOMService",
+   targetNamespace = "http://org.jboss.ws/samples/news",
+   endpointInterface = "org.jboss.test.ws.jaxws.samples.news.NewspaperMTOM"
+)
+ at WebContext
+(
+   contextRoot = "/news",
+   urlPattern = "/newspaper/mtom",
+   authMethod = AuthMethod.BASIC,
+   transportGuarantee = TransportGuarantee.CONFIDENTIAL,
+   secureWSDLAccess = false
+)
 @BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
 public class SecureNewspaperMTOMEndpoint extends AbstractNewspaperMTOMEndpoint implements NewspaperMTOM
 {

Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperSWAAS5Endpoint.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperSWAAS5Endpoint.java	2009-03-25 10:06:09 UTC (rev 9681)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperSWAAS5Endpoint.java	2009-03-25 10:13:21 UTC (rev 9682)
@@ -25,23 +25,33 @@
 import javax.jws.WebService;
 import javax.jws.soap.SOAPBinding;
 
+import org.jboss.wsf.spi.annotation.AuthMethod;
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 import org.jboss.ejb3.annotation.SecurityDomain;
 
-
 @Stateless
- at WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.news.NewspaperSWA",
-      name = "NewspaperSWAEndpoint",
-      targetNamespace = "http://org.jboss.ws/samples/news",
-      serviceName = "NewspaperSWAService")
- at SOAPBinding(style = SOAPBinding.Style.RPC,
-       use = SOAPBinding.Use.LITERAL)
 @SecurityDomain("JBossWS")
- at WebContext(contextRoot="/news",
-      urlPattern="/newspaper/swa",
-      authMethod="BASIC",
-      transportGuarantee="CONFIDENTIAL",
-      secureWSDLAccess=false)
+ at SOAPBinding
+(
+   style = SOAPBinding.Style.RPC,
+   use = SOAPBinding.Use.LITERAL
+)
+ at WebService
+(
+   name = "NewspaperSWAEndpoint",
+   serviceName = "NewspaperSWAService",
+   targetNamespace = "http://org.jboss.ws/samples/news",
+   endpointInterface = "org.jboss.test.ws.jaxws.samples.news.NewspaperSWA"
+)
+ at WebContext
+(
+   contextRoot = "/news",
+   urlPattern = "/newspaper/swa",
+   authMethod = AuthMethod.BASIC,
+   transportGuarantee = TransportGuarantee.CONFIDENTIAL,
+   secureWSDLAccess = false
+)
 public class SecureNewspaperSWAAS5Endpoint extends AbstractNewspaperSWAEndpoint implements NewspaperSWA
 {
    

Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperSWAEndpoint.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperSWAEndpoint.java	2009-03-25 10:06:09 UTC (rev 9681)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/news/SecureNewspaperSWAEndpoint.java	2009-03-25 10:13:21 UTC (rev 9682)
@@ -25,23 +25,33 @@
 import javax.jws.WebService;
 import javax.jws.soap.SOAPBinding;
 
+import org.jboss.wsf.spi.annotation.AuthMethod;
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 import org.jboss.annotation.security.SecurityDomain;
 
-
 @Stateless
- at WebService(endpointInterface = "org.jboss.test.ws.jaxws.samples.news.NewspaperSWA",
-      name = "NewspaperSWAEndpoint",
-      targetNamespace = "http://org.jboss.ws/samples/news",
-      serviceName = "NewspaperSWAService")
- at SOAPBinding(style = SOAPBinding.Style.RPC,
-       use = SOAPBinding.Use.LITERAL)
 @SecurityDomain("JBossWS")
- at WebContext(contextRoot="/news",
-      urlPattern="/newspaper/swa",
-      authMethod="BASIC",
-      transportGuarantee="CONFIDENTIAL",
-      secureWSDLAccess=false)
+ at SOAPBinding
+(
+   style = SOAPBinding.Style.RPC,
+   use = SOAPBinding.Use.LITERAL
+)
+ at WebService
+(
+   name = "NewspaperSWAEndpoint",
+   serviceName = "NewspaperSWAService",
+   targetNamespace = "http://org.jboss.ws/samples/news",
+   endpointInterface = "org.jboss.test.ws.jaxws.samples.news.NewspaperSWA"
+)
+ at WebContext
+(
+   contextRoot = "/news",
+   urlPattern = "/newspaper/swa",
+   authMethod = AuthMethod.BASIC,
+   transportGuarantee = TransportGuarantee.CONFIDENTIAL,
+   secureWSDLAccess = false
+)
 public class SecureNewspaperSWAEndpoint extends AbstractNewspaperSWAEndpoint implements NewspaperSWA
 {
    

Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java	2009-03-25 10:06:09 UTC (rev 9681)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.java	2009-03-25 10:13:21 UTC (rev 9682)
@@ -30,15 +30,28 @@
 
 import org.jboss.ejb3.annotation.SecurityDomain;
 import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.annotation.AuthMethod;
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 
- at WebService(name = "SecureEndpoint", serviceName = "SecureEndpointService", targetNamespace = "http://org.jboss.ws/wsref")
 @Stateless(name = "SecureEndpoint")
 @SOAPBinding(style = Style.RPC)
-
- at WebContext(contextRoot="/jaxws-webserviceref-secure", urlPattern="/*", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
 @SecurityDomain("JBossWS")
 @RolesAllowed("friend")
+ at WebService
+(
+   name = "SecureEndpoint", 
+   serviceName = "SecureEndpointService", 
+   targetNamespace = "http://org.jboss.ws/wsref"
+)
+ at WebContext
+(
+   contextRoot="/jaxws-webserviceref-secure",
+   urlPattern="/*",
+   authMethod = AuthMethod.BASIC,
+   transportGuarantee = TransportGuarantee.NONE,
+   secureWSDLAccess = false
+)
 public class SecureEndpointImpl
 {
    // Provide logging

Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/correct/META-INF/application.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/correct/META-INF/application.xml	                        (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/correct/META-INF/application.xml	2009-03-25 10:13:21 UTC (rev 9682)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application 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_5.xsd"
+  version="5">
+  <display-name>JBWS-2565</display-name>
+  <module>
+    <ejb>jaxws-jbws2565.jar</ejb>
+  </module>
+</application>

Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/correct/META-INF/jboss-app.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/correct/META-INF/jboss-app.xml	                        (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/correct/META-INF/jboss-app.xml	2009-03-25 10:13:21 UTC (rev 9682)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss-app
+    PUBLIC "-//JBoss//DTD J2EE Application 4.2//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd">
+<jboss-app>
+</jboss-app>
\ No newline at end of file

Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/wrong/META-INF/application.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/wrong/META-INF/application.xml	                        (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/wrong/META-INF/application.xml	2009-03-25 10:13:21 UTC (rev 9682)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application 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_5.xsd"
+  version="5">
+  <display-name>JBWS-2565</display-name>
+  <module>
+    <ejb>jaxws-jbws2565-wrong.jar</ejb>
+  </module>
+</application>

Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/wrong/META-INF/jboss-app.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/wrong/META-INF/jboss-app.xml	                        (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2565/wrong/META-INF/jboss-app.xml	2009-03-25 10:13:21 UTC (rev 9682)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss-app
+    PUBLIC "-//JBoss//DTD J2EE Application 4.2//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd">
+<jboss-app>
+</jboss-app>
\ No newline at end of file




More information about the jbossws-commits mailing list