Author: mmerz
Date: Fri Apr 29 15:27:08 2005
New Revision: 165349

URL: http://svn.apache.org/viewcvs?rev=165349&view=rev
Log:
Removed the api classes, 
Got the latest jsr181 from the distribution and added it to the lib
Removed all references to the sercurity annotation (they are no longer 
supported in JSR181)
Updated the test cases

Contributor: Daryoush Mehrtash

Added:
    incubator/beehive/trunk/wsm/lib/jsr181.jar   (with props)
Removed:
    
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/fakeAnnotations/FakeSecurityIdentityAnnotation.java
    
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/fakeAnnotations/FakeSecurityRoleAnnotation.java
    incubator/beehive/trunk/wsm/src/api/
    
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/handlers/AuthenticationHandler.java
    
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/SecurityRolesInfo.java
Modified:
    incubator/beehive/trunk/wsm/build.xml
    incubator/beehive/trunk/wsm/drt/build.xml
    
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java
    
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java
    incubator/beehive/trunk/wsm/drt/tests/schemas/starwars.wsdl
    
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsMethodMetadata.java
    
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsTypeMetadata.java
    
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181MethodMetadataImpl.java
    
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181TypeMetadataImpl.java
    
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/processor/apt/WebServiceMetadataViewer.java

Modified: incubator/beehive/trunk/wsm/build.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/build.xml?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/build.xml (original)
+++ incubator/beehive/trunk/wsm/build.xml Fri Apr 29 15:27:08 2005
@@ -53,6 +53,7 @@
         <pathelement location="${api.classes}"/>
         <pathelement location="${lib.dir}/beehive-wsdltypes.jar"/>
         <pathelement location="${lib.dir}/schematypes.jar"/>
+        <pathelement location="${lib.dir}/jsr181.jar"/>
         <pathelement location="${ext.lib.dir}/jaxrpc.jar"/>
        <path refid="xbean.dependency.path"/>
     </path>
@@ -130,7 +131,7 @@
     <!-- ==================================================================== 
-->
     <!-- Compiles the source code of the project. -->
     <!-- ==================================================================== 
-->
-    <target name="classes" depends="api, runtime">
+    <target name="classes" depends=" runtime">
         <!-- Copy template files into the build -->
         <copy todir="${runtime.classes}" overwrite="true">
             <fileset dir="${runtime.dir}" 
includes="**/*.template,**/*.vm,META-INF/**"/>
@@ -141,16 +142,9 @@
         </copy>
     </target>
     
+   
     
-    <target name="api" depends="dirs">
-        <!-- Build the API classes -->
-        <javac destdir="${api.classes}" debug="on">
-            <src path="${api.dir}"/>
-        </javac>
-    </target>
-    
-    
-    <target name="runtime" depends="api">
+    <target name="runtime" depends="dirs">
         <!-- Build the runtime classes -->
         <javac destdir="${runtime.classes}" classpathref="runtime.classpath" 
debug="on">
             <src path="${runtime.dir}"/>

Modified: incubator/beehive/trunk/wsm/drt/build.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/build.xml?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/build.xml (original)
+++ incubator/beehive/trunk/wsm/drt/build.xml Fri Apr 29 15:27:08 2005
@@ -41,6 +41,7 @@
         <path refid="commons-logging.dependency.path"/>
 
         <pathelement location="${lib.dir}/beehive-wsdltypes.jar"/>
+        <pathelement location="${lib.dir}/jsr181.jar"/>
         <pathelement location="${lib.dir}/schematypes.jar"/>
         <pathelement location="../build/jars/beehive-wsm.jar"/>
         <pathelement location="../build/jars/beehive-wsm-axis.jar"/>

Modified: 
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- 
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java
 (original)
+++ 
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java
 Fri Apr 29 15:27:08 2005
@@ -58,7 +58,7 @@
         assertNotNull("Cannot find WebMethod GoLocoCheetorama();", method);
         assertEquals("Invalid wmAction;", "LocoActionCheetorama", 
method.getWmAction());
         assertFalse("Unexpected @Oneway;", method.isOneWay());
-        assertEquals("Invalid wrName;", "result", method.getWrName());
+        assertEquals("Invalid wrName;", "return", method.getWrName());
         assertEquals("Invalid return type;",
                 boolean.class,
                 method.getJavaReturnType());
@@ -69,7 +69,7 @@
         assertNotNull("Cannot find WebMethod goHome();", method);
         assertEquals("Invalid wmAction;", "", method.getWmAction());
         assertTrue("Cannot find @Oneway;", method.isOneWay());
-        assertEquals("Unexpected @WebResult;", "result", method.getWrName());
+        assertEquals("Unexpected @WebResult;", "return", method.getWrName());
         assertEquals("Unexpected return type;",
                 void.class,
                 method.getJavaReturnType());
@@ -80,7 +80,7 @@
         assertNotNull("Cannot find WebMethod dropMoney();", method);
         assertEquals("Invalid wmAction;", "", method.getWmAction());
         assertFalse("Unexpected @Oneway;", method.isOneWay());
-        assertEquals("Unexpected @WebResult;", "result", method.getWrName());
+        assertEquals("Unexpected @WebResult;", "return", method.getWrName());
         assertEquals("Unexpected return type;",
                 int.class,
                 method.getJavaReturnType());

Modified: 
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- 
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java
 (original)
+++ 
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java
 Fri Apr 29 15:27:08 2005
@@ -56,7 +56,7 @@
         assertNotNull("Cannot find WebMethod GoLoco();", method);
         assertEquals("Invalid wmAction;", "LocoAction", method.getWmAction());
         assertFalse("Unexpected @Oneway;", method.isOneWay());
-        assertEquals("Invalid wrName;", "result", method.getWrName());
+        assertEquals("Invalid wrName;", "return", method.getWrName());
         assertEquals("Invalid return type;",
                 boolean.class,
                 method.getJavaReturnType());
@@ -67,7 +67,7 @@
         assertNotNull("Cannot find WebMethod goHome();", method);
         assertEquals("Invalid wmAction;", "", method.getWmAction());
         assertTrue("Cannot find @Oneway;", method.isOneWay());
-        assertEquals("Unexpected @WebResult;", "result", method.getWrName());
+        assertEquals("Unexpected @WebResult;", "return", method.getWrName());
         assertEquals("Unexpected return type;",
                 void.class,
                 method.getJavaReturnType());

Modified: incubator/beehive/trunk/wsm/drt/tests/schemas/starwars.wsdl
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/schemas/starwars.wsdl?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/schemas/starwars.wsdl (original)
+++ incubator/beehive/trunk/wsm/drt/tests/schemas/starwars.wsdl Fri Apr 29 
15:27:08 2005
@@ -17,7 +17,7 @@
    <element name="changeNameResponse">
     <complexType>
      <sequence>
-      <element name="result" type="tns1:character"/>
+      <element name="return" type="tns1:character"/>
      </sequence>
     </complexType>
    </element>
@@ -27,7 +27,7 @@
    <element name="getChewieResponse">
     <complexType>
      <sequence>
-      <element name="result" type="tns1:character"/>
+      <element name="return" type="tns1:character"/>
      </sequence>
     </complexType>
    </element>
@@ -37,7 +37,7 @@
    <element name="viewCharNameResponse">
     <complexType>
      <sequence>
-      <element name="result" type="xsd:string"/>
+      <element name="return" type="xsd:string"/>
      </sequence>
     </complexType>
    </element>
@@ -47,7 +47,7 @@
    <element name="viewCharSystemResponse">
     <complexType>
      <sequence>
-      <element name="result" type="tns1:system"/>
+      <element name="return" type="tns1:system"/>
      </sequence>
     </complexType>
    </element>
@@ -57,7 +57,7 @@
    <element name="viewCharResponse">
     <complexType>
      <sequence>
-      <element name="result" type="tns1:character"/>
+      <element name="return" type="tns1:character"/>
      </sequence>
     </complexType>
    </element>
@@ -71,7 +71,7 @@
    <element name="stashCharResponse">
     <complexType>
      <sequence>
-      <element name="result" type="tns1:character"/>
+      <element name="return" type="tns1:character"/>
      </sequence>
     </complexType>
    </element>

Added: incubator/beehive/trunk/wsm/lib/jsr181.jar
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/lib/jsr181.jar?rev=165349&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/beehive/trunk/wsm/lib/jsr181.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsMethodMetadata.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsMethodMetadata.java?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsMethodMetadata.java
 (original)
+++ 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsMethodMetadata.java
 Fri Apr 29 15:27:08 2005
@@ -30,8 +30,6 @@
     boolean isOneWay();
     void setOneWay(boolean oneway);
     
-    BeehiveWsSecurityRolesInfo getSecurityRoles();
-    void setSecurityRoles(BeehiveWsSecurityRolesInfo securityRoles);
     
     String getWmAction();
     void setWmAction(String wmAction);

Modified: 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsTypeMetadata.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsTypeMetadata.java?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsTypeMetadata.java
 (original)
+++ 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/BeehiveWsTypeMetadata.java
 Fri Apr 29 15:27:08 2005
@@ -36,10 +36,7 @@
     
     public String getHcName();
     public void setHcName(String hcName);
-    
-    BeehiveWsSecurityRolesInfo getSecurityRoles();
-    void setSecurityRoles(BeehiveWsSecurityRolesInfo securityRoles);
-    
+        
     String getSiValue();
     void setSiValue(String siValue);
     

Modified: 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181MethodMetadataImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181MethodMetadataImpl.java?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181MethodMetadataImpl.java
 (original)
+++ 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181MethodMetadataImpl.java
 Fri Apr 29 15:27:08 2005
@@ -28,13 +28,11 @@
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
 import javax.jws.WebResult;
-import javax.jws.security.SecurityRoles;
 
 import javax.xml.namespace.QName; // todo ([EMAIL PROTECTED], 01/25/05): this 
needs to go...
 
 import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
 import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
-import org.apache.beehive.wsm.model.BeehiveWsSecurityRolesInfo;
 import org.apache.beehive.wsm.model.ValidationException;
 import org.apache.beehive.wsm.model.java.JavaMethodInfo;
 import org.apache.beehive.wsm.model.java.JavaParameterInfo;
@@ -42,7 +40,7 @@
 public class Jsr181MethodMetadataImpl implements BeehiveWsMethodMetadata, 
java.io.Serializable {
 
     private static final long serialVersionUID = 1L;
-    private static final String DEFAULT_WRNAME = "result";
+    private static final String DEFAULT_WRNAME = "return";
     
     private String wmOperationName;
     private String wmAction;
@@ -51,7 +49,6 @@
             new ArrayList<BeehiveWsParameterMetadata>();
     private String wrName;
     private String wrTargetNamespace;
-    private BeehiveWsSecurityRolesInfo securityRoles;
     private String javaMethodName;
     private Class javaReturnType;
 
@@ -141,9 +138,6 @@
                 else if (a.annotationType() == javax.jws.Oneway.class) {
                     initFromAnnotation((javax.jws.Oneway) a);
                 }
-                else if (a.annotationType() == 
javax.jws.security.SecurityRoles.class) {
-                    initFromAnnotation((javax.jws.security.SecurityRoles) a);
-                }
                 else if (a.annotationType() == javax.jws.WebResult.class) {
                     initFromAnnotation((javax.jws.WebResult) a);
                 }
@@ -165,11 +159,6 @@
         addParams(webParams);
     }
 
-    private void initFromAnnotation(SecurityRoles annotation) {
-        if (null != annotation) {
-            setSecurityRoles(new SecurityRolesInfo(annotation));
-        }
-    }
 
     private void initFromAnnotation(WebResult annotation) {
         if (null != annotation) {
@@ -197,13 +186,6 @@
         this.oneway = oneway;
     }
 
-    public BeehiveWsSecurityRolesInfo getSecurityRoles() {
-        return securityRoles;
-    }
-
-    public void setSecurityRoles(BeehiveWsSecurityRolesInfo securityRoles) {
-        this.securityRoles = securityRoles;
-    }
 
     public String getWmAction() {
         return wmAction;

Modified: 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181TypeMetadataImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181TypeMetadataImpl.java?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181TypeMetadataImpl.java
 (original)
+++ 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/model/jsr181/Jsr181TypeMetadataImpl.java
 Fri Apr 29 15:27:08 2005
@@ -28,8 +28,6 @@
 import javax.jws.HandlerChain;
 import javax.jws.WebMethod;
 import javax.jws.WebService;
-import javax.jws.security.SecurityIdentity;
-import javax.jws.security.SecurityRoles;
 import javax.jws.soap.SOAPBinding;
 import javax.jws.soap.SOAPMessageHandler;
 import javax.jws.soap.SOAPMessageHandlers;
@@ -60,7 +58,6 @@
     private String hcName;
     private List<BeehiveWsSOAPMessageHandlerInfo> soapHandlers =
             new ArrayList<BeehiveWsSOAPMessageHandlerInfo>();
-    private BeehiveWsSecurityRolesInfo securityRoles;
     private String siValue;
     private String className;
     private File baseLocation;
@@ -177,16 +174,6 @@
                 initFromAnnotation((javax.jws.HandlerChain) a);
             }
 
-            // @SecurityIdentity
-            else if (a.annotationType() == 
javax.jws.security.SecurityIdentity.class) {
-                initFromAnnotation((javax.jws.security.SecurityIdentity) a);
-            }
-
-            // @SecurityRoles
-            else if (a.annotationType() == 
javax.jws.security.SecurityRoles.class) {
-                initFromAnnotation((javax.jws.security.SecurityRoles) a);
-            }
-
             // @SOAPBinding
             else if (a.annotationType() == javax.jws.soap.SOAPBinding.class) {
                 initFromAnnotation((javax.jws.soap.SOAPBinding) a);
@@ -337,21 +324,6 @@
         }
     }
 
-    private void initFromAnnotation(SecurityRoles annotation) {
-        if (null != annotation) {
-            setSecurityRoles(new SecurityRolesInfo(annotation));
-        }
-
-        // no defaults to handle
-    }
-
-    private void initFromAnnotation(SecurityIdentity annotation) {
-        if (null != annotation) {
-            setSiValue(annotation.value());
-        }
-
-        // no defaults to handle
-    }
 
     private void configureHandlerChain(String handlerChainConfigPath, String 
handlerChainName)
         throws Exception
@@ -564,19 +536,6 @@
         this.hcName = hcName;
     }
 
-    /**
-     * @return Returns the securityRoles.
-     */
-    public BeehiveWsSecurityRolesInfo getSecurityRoles() {
-        return securityRoles;
-    }
-
-    /**
-     * @param securityRoles The securityRoles to set.
-     */
-    public void setSecurityRoles(BeehiveWsSecurityRolesInfo securityRoles) {
-        this.securityRoles = securityRoles;
-    }
 
     /**
      * @return Returns the siRunAs.

Modified: 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/processor/apt/WebServiceMetadataViewer.java
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/processor/apt/WebServiceMetadataViewer.java?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/processor/apt/WebServiceMetadataViewer.java
 (original)
+++ 
incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/processor/apt/WebServiceMetadataViewer.java
 Fri Apr 29 15:27:08 2005
@@ -21,7 +21,6 @@
 import java.util.Collection;
 
 import org.apache.beehive.wsm.model.BeehiveWsSOAPBindingInfo;
-import org.apache.beehive.wsm.model.BeehiveWsSecurityRolesInfo;
 import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
 import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
 import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
@@ -57,7 +56,6 @@
         tab++;
         print(tab, webServiceTYPEMetadata.getMethods());
         print(tab, webServiceTYPEMetadata.getSoapBinding());
-        print(tab, webServiceTYPEMetadata.getSecurityRoles());
     }
 
     public static void print(Collection collection) {
@@ -99,8 +97,7 @@
 
         //print( tab, "DwResponseElement");
         //print( tab, webServiceMETHODMetadata.getSoapBinding() );
-        //print( tab, webServiceMETHODMetadata.getSecurityRoles() );
-
+ 
         print("");
         tab++;
         print(tab, webServiceMETHODMetadata.getParams());
@@ -136,23 +133,7 @@
         print(tab, "style", soapBindingInfo.getParameterStyle());
     }
 
-    public static void print(BeehiveWsSecurityRolesInfo securityRolesInfo) {
-        print(0, securityRolesInfo);
-    }
 
-    public static void print(int tab, BeehiveWsSecurityRolesInfo 
securityRolesInfo) {
-        if (securityRolesInfo == null)
-            return;
-        print(tab, ">SecurityRolesInfo");
-        print(tab, "rolesAllowed");
-        for (String role : securityRolesInfo.getRolesAllowed()) {
-            print(tab, " " + role);
-        }
-        print(tab, "rolesReferenced");
-        for (String role : securityRolesInfo.getRolesReferenced()) {
-            print(tab, " " + role);
-        }
-    }
 
     public static void print(int tab, String msg, Object data) {
         print(tab, msg + " : " + data);


Reply via email to