[jbossws-commits] JBossWS SVN: r9681 - in framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws: jbws1845 and 2 other directories.

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


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

Modified:
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1845/SpamComplaintWS.java
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/SecureEndpointAS5Impl.java
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/SecureEndpointImpl.java
Log:
[JBWS-2565] fixing tests to demonstrate best practices

Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java	2009-03-25 10:05:10 UTC (rev 9680)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java	2009-03-25 10:06:09 UTC (rev 9681)
@@ -25,6 +25,7 @@
 import javax.ejb.TransactionAttribute;
 import javax.jws.WebService;
 
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 
 /**
@@ -37,15 +38,15 @@
 @Stateless
 @WebService
 (
-      targetNamespace="namespace1",
-      serviceName="UserAccountService1.0",
-      endpointInterface="org.jboss.test.ws.jaxws.jbws1799.IUserAccountService"
+   targetNamespace = "namespace1",
+   serviceName = "UserAccountService1.0",
+   endpointInterface = "org.jboss.test.ws.jaxws.jbws1799.IUserAccountService"
 )
 @WebContext
 (
-      transportGuarantee="NONE",
-      contextRoot="/svc-useracctv1.0",
-      urlPattern="/UserAccountService1.0"
+   transportGuarantee = TransportGuarantee.NONE,
+   contextRoot = "/svc-useracctv1.0",
+   urlPattern = "/UserAccountService1.0"
 )
 public class UserAccountService implements IUserAccountService
 {

Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java	2009-03-25 10:05:10 UTC (rev 9680)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java	2009-03-25 10:06:09 UTC (rev 9681)
@@ -27,6 +27,7 @@
 import javax.xml.ws.RequestWrapper;
 import javax.xml.ws.ResponseWrapper;
 
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 
 /**
@@ -39,21 +40,21 @@
 @Stateless
 @WebService
 (
-      targetNamespace="namespaceExt",
-      serviceName="UserAccountServiceExt1.0",
-      endpointInterface="org.jboss.test.ws.jaxws.jbws1799.IUserAccountServiceExt"
+   targetNamespace = "namespaceExt",
+   serviceName = "UserAccountServiceExt1.0",
+   endpointInterface = "org.jboss.test.ws.jaxws.jbws1799.IUserAccountServiceExt"
 )
 @WebContext
 (
-      transportGuarantee="NONE",
-      contextRoot="/svc-useracctv1.0",
-      urlPattern="/UserAccountServiceExt1.0"
+   transportGuarantee = TransportGuarantee.NONE,
+   contextRoot = "/svc-useracctv1.0",
+   urlPattern = "/UserAccountServiceExt1.0"
 )
 public class UserAccountServiceExt implements IUserAccountServiceExt 
 {
    @TransactionAttribute(javax.ejb.TransactionAttributeType.SUPPORTS)
-   @RequestWrapper(className="org.jboss.test.ws.jaxws.jbws1799.jaxws.Authenticate1")
-   @ResponseWrapper(className="org.jboss.test.ws.jaxws.jbws1799.jaxws.Authenticate1Response")
+   @RequestWrapper(className = "org.jboss.test.ws.jaxws.jbws1799.jaxws.Authenticate1")
+   @ResponseWrapper(className = "org.jboss.test.ws.jaxws.jbws1799.jaxws.Authenticate1Response")
    public boolean authenticate(String username, String password)
    {
       return "authorized".equals(username) && "password".equals(password);

Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1845/SpamComplaintWS.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1845/SpamComplaintWS.java	2009-03-25 10:05:10 UTC (rev 9680)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws1845/SpamComplaintWS.java	2009-03-25 10:06:09 UTC (rev 9681)
@@ -25,6 +25,7 @@
 import javax.jws.WebService;
 import javax.xml.ws.ResponseWrapper;
 
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 
 /**
@@ -37,15 +38,15 @@
 @Stateless
 @WebService
 (
-   targetNamespace="http://service.responsys.com/rsystools/ws/SpamComplaintWS/1.0",
-   serviceName="SpamService",
-   endpointInterface="org.jboss.test.ws.jaxws.jbws1845.SpamComplaintWSIface"
+   serviceName = "SpamService",
+   targetNamespace = "http://service.responsys.com/rsystools/ws/SpamComplaintWS/1.0",
+   endpointInterface = "org.jboss.test.ws.jaxws.jbws1845.SpamComplaintWSIface"
 )
 @WebContext
 (
-   transportGuarantee="NONE",
-   contextRoot="/jaxws-jbws1845",
-   urlPattern="/SpamService"
+   transportGuarantee = TransportGuarantee.NONE,
+   contextRoot = "/jaxws-jbws1845",
+   urlPattern = "/SpamService"
 )
 public class SpamComplaintWS implements SpamComplaintWSIface
 {

Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java	2009-03-25 10:05:10 UTC (rev 9680)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java	2009-03-25 10:06:09 UTC (rev 9681)
@@ -38,14 +38,28 @@
 
 import org.jboss.wsf.common.DOMUtils;
 import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.spi.annotation.AuthMethod;
+import org.jboss.wsf.spi.annotation.TransportGuarantee;
 import org.jboss.wsf.spi.annotation.WebContext;
 import org.w3c.dom.Element;
 import org.xml.sax.InputSource;
 
- at WebService(name = "Endpoint", serviceName="EndpointService", targetNamespace = "http://org.jboss.ws/jaxws/context")
+ at Stateless
 @SOAPBinding(style = Style.RPC)
- at Stateless
- at WebContext(contextRoot = "/jaxws-samples-context", urlPattern = "/*", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
+ at WebService
+(
+   name = "Endpoint",
+   serviceName="EndpointService",
+   targetNamespace = "http://org.jboss.ws/jaxws/context"
+)
+ at WebContext
+(
+   contextRoot = "/jaxws-samples-context",
+   urlPattern = "/*",
+   authMethod = AuthMethod.BASIC,
+   transportGuarantee = TransportGuarantee.NONE,
+   secureWSDLAccess = false
+)
 
 // [JBWS-1339] @Security domain vs. <security-domain> 
 //@SecurityDomain("JBossWS")

Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/SecureEndpointAS5Impl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/SecureEndpointAS5Impl.java	2009-03-25 10:05:10 UTC (rev 9680)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/SecureEndpointAS5Impl.java	2009-03-25 10:06:09 UTC (rev 9681)
@@ -30,13 +30,26 @@
 
 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/securityDomain")
 @Stateless(name = "SecureEndpoint")
 @SOAPBinding(style = Style.RPC)
-
- at WebContext(contextRoot="/jaxws-securityDomain", urlPattern="/*", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
+ at WebService
+(
+   name = "SecureEndpoint",
+   serviceName = "SecureEndpointService",
+   targetNamespace = "http://org.jboss.ws/securityDomain"
+)
+ at WebContext
+(
+   contextRoot="/jaxws-securityDomain", 
+   urlPattern="/*",
+   authMethod = AuthMethod.BASIC,
+   transportGuarantee = TransportGuarantee.NONE,
+   secureWSDLAccess = false
+)
 @SecurityDomain("JBossWS")
 @RolesAllowed("friend")
 public class SecureEndpointAS5Impl

Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/SecureEndpointImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/SecureEndpointImpl.java	2009-03-25 10:05:10 UTC (rev 9680)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/SecureEndpointImpl.java	2009-03-25 10:06:09 UTC (rev 9681)
@@ -30,13 +30,26 @@
 
 import org.jboss.annotation.security.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/securityDomain")
 @Stateless(name = "SecureEndpoint")
 @SOAPBinding(style = Style.RPC)
-
- at WebContext(contextRoot="/jaxws-securityDomain", urlPattern="/*", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
+ at WebService
+(
+   name = "SecureEndpoint",
+   serviceName = "SecureEndpointService",
+   targetNamespace = "http://org.jboss.ws/securityDomain"
+)
+ at WebContext
+(
+   contextRoot="/jaxws-securityDomain",
+   urlPattern="/*",
+   authMethod = AuthMethod.BASIC,
+   transportGuarantee = TransportGuarantee.NONE,
+   secureWSDLAccess = false
+)
 @SecurityDomain("JBossWS")
 @RolesAllowed("friend")
 public class SecureEndpointImpl




More information about the jbossws-commits mailing list