tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlmonte...@apache.org
Subject svn commit: r919019 - in /openejb/trunk/openejb3: container/openejb-core/src/main/java/org/apache/openejb/config/ container/openejb-core/src/test/java/org/apache/openejb/config/ container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb3/ examples...
Date Thu, 04 Mar 2010 15:23:44 GMT
Author: jlmonteiro
Date: Thu Mar  4 15:23:44 2010
New Revision: 919019

URL: http://svn.apache.org/viewvc?rev=919019&view=rev
Log:
WS-Security refactoring: add support for WS-Security properties in openejb-jar.xml v3 as well
as in openejb-jar.xml v2 (ie. geronimo) (throughout the OpenEjb2Conversion). One point has
been to remove OpenejbJarType dependency in AppInfoBuilder cause it's an old descriptor.

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java
    openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/AppInfoBuilderTest.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb3/EjbDeployment.java
    openejb/trunk/openejb3/examples/webservice-ws-security/src/main/resources/META-INF/ejb-jar.xml
    openejb/trunk/openejb3/examples/webservice-ws-security/src/main/resources/META-INF/openejb-jar.xml

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java?rev=919019&r1=919018&r2=919019&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java
Thu Mar  4 15:23:44 2010
@@ -42,6 +42,7 @@
 import org.apache.openejb.util.References;
 import org.apache.openejb.util.CircularReferencesException;
 import org.apache.openejb.jee.oejb3.EjbDeployment;
+import org.apache.openejb.jee.oejb3.OpenejbJar;
 import org.apache.openejb.jee.jpa.unit.Persistence;
 import org.apache.openejb.jee.jpa.unit.PersistenceUnit;
 import org.apache.openejb.jee.jpa.unit.Property;
@@ -63,20 +64,15 @@
 import org.apache.openejb.jee.WebserviceDescription;
 import org.apache.openejb.jee.PortComponent;
 import org.apache.openejb.jee.ServiceImplBean;
-import org.apache.openejb.jee.oejb2.OpenejbJarType;
-import org.apache.openejb.jee.oejb2.SessionBeanType;
-import org.apache.openejb.jee.oejb2.WebServiceSecurityType;
 
 import javax.xml.bind.JAXBException;
 import java.util.Map;
 import java.util.TreeMap;
 import java.util.List;
 import java.util.Properties;
-import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.Set;
 import java.util.LinkedHashSet;
-import java.util.HashMap;
 import java.net.URL;
 import java.io.File;
 import java.io.IOException;
@@ -629,64 +625,45 @@
     }
 
     void configureWebserviceSecurity(WebAppInfo info, WebModule module) {
-	Object altDD = module.getAltDDs().get("openejb-jar.xml");
-	List<PortInfo> infoList = info.portInfos;
-	
-	configureWebserviceScurity(infoList, altDD);
+        // no security to configure for WebModule 
+        // --> this method should be removed
     }
     
     /*
      * left package-local for a unit test
      */
     void configureWebserviceSecurity(EjbJarInfo ejbJarInfo, EjbModule ejbModule) {
-	Object altDD = ejbModule.getAltDDs().get("openejb-jar.xml");
+        Object altDD = ejbModule.getOpenejbJar();
 	List<PortInfo> infoList = ejbJarInfo.portInfos;
 	
 	configureWebserviceScurity(infoList, altDD);
     }
     
     private void configureWebserviceScurity(List<PortInfo> infoList, Object altDD)
{
-	if (altDD == null || (! (altDD instanceof OpenejbJarType))) return;
-        
-        OpenejbJarType openejbJarType = (OpenejbJarType) altDD;
+        if (altDD == null || (! (altDD instanceof OpenejbJar))) return;
         
-        Map<String, org.apache.openejb.jee.oejb2.EnterpriseBean> beans = new HashMap<String,
org.apache.openejb.jee.oejb2.EnterpriseBean>();
-        for (org.apache.openejb.jee.oejb2.EnterpriseBean enterpriseBean : openejbJarType.getEnterpriseBeans())
{
-            beans.put(enterpriseBean.getEjbName(), enterpriseBean);
-        }
+        OpenejbJar openejbJar = (OpenejbJar) altDD;
+        Map<String, EjbDeployment> deploymentsByEjbName = openejbJar.getDeploymentsByEjbName();
         
         for (PortInfo portInfo : infoList) {
-
-            org.apache.openejb.jee.oejb2.EnterpriseBean bean = beans.get(portInfo.serviceLink);
-            
-            if (bean == null) continue; /* TODO: throw something? */
-            if (!(bean instanceof SessionBeanType)) continue; /* TODO: throw something? */

+            EjbDeployment deployment = deploymentsByEjbName.get(portInfo.serviceLink);
             
-            SessionBeanType sessionBean = (SessionBeanType) bean;
-            WebServiceSecurityType webServiceSecurityType = sessionBean.getWebServiceSecurity();
-
-            if (webServiceSecurityType == null) {
-                //TODO: this ok?
-                continue;
-            }
-
-            portInfo.realmName = webServiceSecurityType.getRealmName();
-            portInfo.securityRealmName = webServiceSecurityType.getSecurityRealmName();
-            if (webServiceSecurityType.getTransportGuarantee() != null) {
-                portInfo.transportGuarantee = webServiceSecurityType.getTransportGuarantee().value();
+            if (deployment == null) continue;
+            portInfo.realmName = deployment.getProperties().getProperty("webservice.security.realm");
+            portInfo.securityRealmName = deployment.getProperties().getProperty("webservice.security.securityRealm");
+            if (deployment.getProperties().getProperty("webservice.security.transportGarantee")
!= null) {
+                portInfo.transportGuarantee = deployment.getProperties().getProperty("webservice.security.transportGarantee");
             } else {
                 portInfo.transportGuarantee = "NONE";
             }
 
-            if (webServiceSecurityType.getAuthMethod() != null) {
-                portInfo.authMethod = webServiceSecurityType.getAuthMethod().value();
+            if (deployment.getProperties().getProperty("webservice.security.authMethod")
!= null) {
+                portInfo.authMethod = deployment.getProperties().getProperty("webservice.security.authMethod");
             } else {
                 portInfo.authMethod = "NONE";
             }
-            portInfo.properties = webServiceSecurityType.getProperties();
-            
+            portInfo.properties = deployment.getProperties();
         }
-
     }
     
     private static boolean skipMdb(EnterpriseBeanInfo bean) {

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java?rev=919019&r1=919018&r2=919019&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/OpenEjb2Conversion.java
Thu Mar  4 15:23:44 2010
@@ -55,6 +55,8 @@
 import org.apache.openejb.jee.oejb2.PatternType;
 import org.apache.openejb.jee.oejb2.EjbLocalRefType;
 import org.apache.openejb.jee.oejb2.Jndi;
+import org.apache.openejb.jee.oejb2.SessionBeanType;
+import org.apache.openejb.jee.oejb2.WebServiceSecurityType;
 import org.apache.openejb.jee.oejb3.OpenejbJar;
 import org.apache.openejb.jee.oejb3.EjbDeployment;
 import org.apache.openejb.jee.oejb3.EjbLink;
@@ -123,6 +125,37 @@
                 // todo warn no such ejb in the ejb-jar.xml
                 continue;
             }
+            
+            // Add WS Security
+            if (enterpriseBean instanceof SessionBeanType) {
+                SessionBeanType sessionBean = (SessionBeanType) enterpriseBean;
+                WebServiceSecurityType webServiceSecurityType = sessionBean.getWebServiceSecurity();
+                
+                if (webServiceSecurityType == null) break;
+                
+                if (webServiceSecurityType.getRealmName() != null) {
+                    deployment.addProperty("webservice.security.realm", webServiceSecurityType.getRealmName());
+                }
+
+                if (webServiceSecurityType.getSecurityRealmName() != null) {
+                    deployment.addProperty("webservice.security.securityRealm", webServiceSecurityType.getSecurityRealmName());
+                }
+                
+                if (webServiceSecurityType.getTransportGuarantee() != null) {
+                    deployment.addProperty("webservice.security.transportGarantee", webServiceSecurityType.getTransportGuarantee().value());
+                } else {
+                    deployment.addProperty("webservice.security.transportGarantee", "NONE");
+                }
+                
+                if (webServiceSecurityType.getAuthMethod() != null) {
+                    deployment.addProperty("webservice.security.authMethod", webServiceSecurityType.getAuthMethod().value());
+                } else {
+                    deployment.addProperty("webservice.security.authMethod", "NONE");
+                }
+                
+                deployment.getProperties().putAll(webServiceSecurityType.getProperties());
+                
+            }
 
             deployment.getProperties().putAll(enterpriseBean.getProperties());
             

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/AppInfoBuilderTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/AppInfoBuilderTest.java?rev=919019&r1=919018&r2=919019&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/AppInfoBuilderTest.java
(original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/AppInfoBuilderTest.java
Thu Mar  4 15:23:44 2010
@@ -22,12 +22,14 @@
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.SessionBean;
 import org.apache.openejb.jee.oejb2.*;
+import org.apache.openejb.jee.oejb3.EjbDeployment;
 import org.apache.openejb.jee.oejb3.OpenejbJar;
 
 import java.util.List;
 import java.util.Properties;
 
 public class AppInfoBuilderTest extends TestCase {
+    
     public void testShouldAddSecurityDetailsToPortInfo() throws Exception {
         EjbJar ejbJar = new EjbJar();
         SessionBean sessionBean = new SessionBean();
@@ -35,27 +37,20 @@
         sessionBean.setEjbClass("org.superbiz.MySessionBean");
         sessionBean.setRemote("org.superbiz.MySession");
         ejbJar.addEnterpriseBean(sessionBean);
-
-        OpenejbJarType openejbJarType = new OpenejbJarType();
-        SessionBeanType openejbSessionBean = new SessionBeanType();
-        openejbSessionBean.setEjbName("MySessionBean");
-
-        WebServiceSecurityType serviceSecurityType = new WebServiceSecurityType();
-        serviceSecurityType.setAuthMethod(AuthMethodType.BASIC);
-        serviceSecurityType.setRealmName("MyRealm");
-        serviceSecurityType.setSecurityRealmName("MySecurityRealm");
-        serviceSecurityType.setTransportGuarantee(TransportGuaranteeType.NONE);
         
-        Properties props = new Properties();
-        props.put("wss4j.in.action", "Timestamp");
-        props.put("wss4j.out.action", "Timestamp");
-        serviceSecurityType.setProperties(props);
-
-        openejbSessionBean.setWebServiceSecurity(serviceSecurityType);
-        openejbJarType.getEnterpriseBeans().add(openejbSessionBean);
+        OpenejbJar openejbJar = new OpenejbJar();
+        EjbDeployment ejbDeployment = new EjbDeployment();
+        openejbJar.addEjbDeployment(ejbDeployment);
+        
+        ejbDeployment.setEjbName("MySessionBean");
+        ejbDeployment.addProperty("webservice.security.realm", "MyRealm");
+        ejbDeployment.addProperty("webservice.security.securityRealm", "MySecurityRealm");
+        ejbDeployment.addProperty("webservice.security.transportGarantee", TransportGuaranteeType.NONE.value());
+        ejbDeployment.addProperty("webservice.security.authMethod", AuthMethodType.BASIC.value());
+        ejbDeployment.addProperty("wss4j.in.action", "Timestamp");
+        ejbDeployment.addProperty("wss4j.out.action", "Timestamp");
 
-        EjbModule ejbModule =  new EjbModule(ejbJar, new OpenejbJar());
-        ejbModule.getAltDDs().put("openejb-jar.xml", openejbJarType);
+        EjbModule ejbModule =  new EjbModule(ejbJar, openejbJar);
 
         EjbJarInfo ejbJarInfo = new EjbJarInfo();
         PortInfo portInfo = new PortInfo();
@@ -82,23 +77,14 @@
         sessionBean.setEjbClass("org.superbiz.MySessionBean");
         sessionBean.setRemote("org.superbiz.MySession");
         ejbJar.addEnterpriseBean(sessionBean);
+        
+        OpenejbJar openejbJar = new OpenejbJar();
+        EjbDeployment ejbDeployment = new EjbDeployment();
+        openejbJar.addEjbDeployment(ejbDeployment);
+        
+        ejbDeployment.setEjbName("MySessionBean");
 
-        OpenejbJarType openejbJarType = new OpenejbJarType();
-        SessionBeanType openejbSessionBean = new SessionBeanType();
-        openejbSessionBean.setEjbName("MySessionBean");
-
-        WebServiceSecurityType serviceSecurityType = new WebServiceSecurityType();
-        serviceSecurityType.setAuthMethod(null);
-        serviceSecurityType.setRealmName(null);
-        serviceSecurityType.setSecurityRealmName(null);
-        serviceSecurityType.setTransportGuarantee(null);
-        serviceSecurityType.setProperties(null);
-
-        openejbSessionBean.setWebServiceSecurity(serviceSecurityType);
-        openejbJarType.getEnterpriseBeans().add(openejbSessionBean);
-
-        EjbModule ejbModule =  new EjbModule(ejbJar, new OpenejbJar());
-        ejbModule.getAltDDs().put("openejb-jar.xml", openejbJarType);
+        EjbModule ejbModule =  new EjbModule(ejbJar, openejbJar);
 
         EjbJarInfo ejbJarInfo = new EjbJarInfo();
         PortInfo portInfo = new PortInfo();
@@ -125,22 +111,13 @@
         sessionBean.setRemote("org.superbiz.MySession");
         ejbJar.addEnterpriseBean(sessionBean);
 
-        OpenejbJarType openejbJarType = new OpenejbJarType();
-        SessionBeanType openejbSessionBean = new SessionBeanType();
-        openejbSessionBean.setEjbName("MySessionBean");
-
-        WebServiceSecurityType serviceSecurityType = new WebServiceSecurityType();
-        serviceSecurityType.setAuthMethod(null);
-        serviceSecurityType.setRealmName(null);
-        serviceSecurityType.setSecurityRealmName(null);
-        serviceSecurityType.setTransportGuarantee(null);
-        serviceSecurityType.setProperties(null);
-
-        openejbSessionBean.setWebServiceSecurity(serviceSecurityType);
-        openejbJarType.getEnterpriseBeans().add(openejbSessionBean);
+        OpenejbJar openejbJar = new OpenejbJar();
+        EjbDeployment ejbDeployment = new EjbDeployment();
+        openejbJar.addEjbDeployment(ejbDeployment);
+        
+        ejbDeployment.setEjbName("MySessionBean");
 
-        EjbModule ejbModule =  new EjbModule(ejbJar, new OpenejbJar());
-        ejbModule.getAltDDs().put("openejb-jar.xml", openejbJarType);
+        EjbModule ejbModule =  new EjbModule(ejbJar, openejbJar);
 
         EjbJarInfo ejbJarInfo = new EjbJarInfo();
         PortInfo portInfo = new PortInfo();

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb3/EjbDeployment.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb3/EjbDeployment.java?rev=919019&r1=919018&r2=919019&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb3/EjbDeployment.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb3/EjbDeployment.java
Thu Mar  4 15:23:44 2010
@@ -184,4 +184,8 @@
         }
         return properties;
     }
+    
+    public void addProperty(String key, String value) {
+        getProperties().setProperty(key, value);
+    }
 }

Modified: openejb/trunk/openejb3/examples/webservice-ws-security/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webservice-ws-security/src/main/resources/META-INF/ejb-jar.xml?rev=919019&r1=919018&r2=919019&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/webservice-ws-security/src/main/resources/META-INF/ejb-jar.xml
(original)
+++ openejb/trunk/openejb3/examples/webservice-ws-security/src/main/resources/META-INF/ejb-jar.xml
Thu Mar  4 15:23:44 2010
@@ -26,54 +26,72 @@
             <ejb-name>CalculatorImplTimestamp1way</ejb-name>
             <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
             <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
         </session>
 
         <session>
             <ejb-name>CalculatorImplTimestamp2ways</ejb-name>
             <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
             <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
         </session>
 
         <session>
             <ejb-name>CalculatorImplUsernameTokenPlainPassword</ejb-name>
             <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
             <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
         </session>
 
         <session>
             <ejb-name>CalculatorImplUsernameTokenHashedPassword</ejb-name>
             <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
             <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
         </session>
 
         <session>
             <ejb-name>CalculatorImplUsernameTokenPlainPasswordEncrypt</ejb-name>
             <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
             <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
         </session>
 
         <session>
             <ejb-name>CalculatorImplSign</ejb-name>
             <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
             <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
         </session>
 
         <session>
             <ejb-name>CalculatorImplEncrypt2ways</ejb-name>
             <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
             <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
         </session>
 
         <session>
             <ejb-name>CalculatorImplSign2ways</ejb-name>
             <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
             <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
         </session>
 
         <session>
             <ejb-name>CalculatorImplEncryptAndSign2ways</ejb-name>
             <service-endpoint>org.superbiz.calculator.CalculatorWs</service-endpoint>
             <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb-class>
+            <session-type>Stateless</session-type>
+            <transaction-type>Container</transaction-type>
         </session>
 
     </enterprise-beans>

Modified: openejb/trunk/openejb3/examples/webservice-ws-security/src/main/resources/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webservice-ws-security/src/main/resources/META-INF/openejb-jar.xml?rev=919019&r1=919018&r2=919019&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/webservice-ws-security/src/main/resources/META-INF/openejb-jar.xml
(original)
+++ openejb/trunk/openejb3/examples/webservice-ws-security/src/main/resources/META-INF/openejb-jar.xml
Thu Mar  4 15:23:44 2010
@@ -14,100 +14,63 @@
     KIND, either express or implied. See the License for the specific
     language governing permissions and limitations under the License.
 -->
-<openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2">
-    <enterprise-beans>
-        <session>
-            <ejb-name>CalculatorImpl</ejb-name>
-            <web-service-security>
-                <security-realm-name/>
-                <transport-guarantee>NONE</transport-guarantee>
-                <auth-method>WS-SECURITY</auth-method>
-                <properties>
-                    wss4j.in.action = UsernameToken
-                    wss4j.in.passwordType = PasswordText
-                </properties>
-            </web-service-security>
-        </session>
-        
-        <session>
-            <ejb-name>CalculatorImplTimestamp1way</ejb-name>
-            <web-service-security>
-                <security-realm-name/>
-                <transport-guarantee>NONE</transport-guarantee>
-                <auth-method>WS-SECURITY</auth-method>
-                <properties>
-                    wss4j.in.action = Timestamp
-                </properties>
-            </web-service-security>
-        </session>
 
-        <session>
-            <ejb-name>CalculatorImplTimestamp2ways</ejb-name>
-            <web-service-security>
-                <security-realm-name/>
-                <transport-guarantee>NONE</transport-guarantee>
-                <auth-method>WS-SECURITY</auth-method>
-                <properties>
-                    wss4j.in.action = Timestamp
-                    wss4j.out.action = Timestamp
-                </properties>
-            </web-service-security>
-        </session>
+<openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1">
 
-        <session>
-            <ejb-name>CalculatorImplUsernameTokenPlainPassword</ejb-name>
-            <web-service-security>
-                <security-realm-name/>
-                <transport-guarantee>NONE</transport-guarantee>
-                <auth-method>WS-SECURITY</auth-method>
-                <properties>
-                    wss4j.in.action = UsernameToken
-                    wss4j.in.passwordType = PasswordText
-                </properties>
-            </web-service-security>
-        </session>
+    <ejb-deployment ejb-name="CalculatorImpl">
+        <properties>
+            # webservice.security.realm
+            # webservice.security.securityRealm
+            # webservice.security.transportGarantee = NONE
+            webservice.security.authMethod = WS-SECURITY
+            wss4j.in.action = UsernameToken
+            wss4j.in.passwordType = PasswordText
+        </properties>
+    </ejb-deployment>
+    <ejb-deployment ejb-name="CalculatorImplTimestamp1way"> 
+        <properties>
+            webservice.security.authMethod = WS-SECURITY
+            wss4j.in.action = Timestamp
+        </properties>
+    </ejb-deployment>
+    <ejb-deployment ejb-name="CalculatorImplTimestamp2ways"> 
+        <properties>
+            webservice.security.authMethod = WS-SECURITY
+            wss4j.in.action = Timestamp
+            wss4j.out.action = Timestamp
+        </properties>
+    </ejb-deployment>
+    <ejb-deployment ejb-name="CalculatorImplUsernameTokenPlainPassword"> 
+        <properties>
+            webservice.security.authMethod = WS-SECURITY
+            wss4j.in.action = UsernameToken
+            wss4j.in.passwordType = PasswordText
+        </properties>
+    </ejb-deployment>
+    <ejb-deployment ejb-name="CalculatorImplUsernameTokenHashedPassword"> 
+        <properties>
+            webservice.security.authMethod = WS-SECURITY
+            wss4j.in.action = UsernameToken
+            wss4j.in.passwordType = PasswordDigest
+            wss4j.in.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
+        </properties>
+    </ejb-deployment>
+    <ejb-deployment ejb-name="CalculatorImplUsernameTokenPlainPasswordEncrypt"> 
+        <properties>
+            webservice.security.authMethod = WS-SECURITY
+            wss4j.in.action = UsernameToken Encrypt
+            wss4j.in.passwordType = PasswordText
+            wss4j.in.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
+            wss4j.in.decryptionPropFile = META-INF/CalculatorImplUsernameTokenPlainPasswordEncrypt-server.properties
+        </properties>
+    </ejb-deployment>
+    <ejb-deployment ejb-name="CalculatorImplSign"> 
+        <properties>
+            webservice.security.authMethod = WS-SECURITY
+            wss4j.in.action = Signature
+            wss4j.in.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
+            wss4j.in.signaturePropFile = META-INF/CalculatorImplSign-server.properties
+        </properties>
+    </ejb-deployment>
 
-        <session>
-            <ejb-name>CalculatorImplUsernameTokenHashedPassword</ejb-name>
-            <web-service-security>
-                <security-realm-name/>
-                <transport-guarantee>NONE</transport-guarantee>
-                <auth-method>WS-SECURITY</auth-method>
-                <properties>
-                    wss4j.in.action = UsernameToken
-                    wss4j.in.passwordType = PasswordDigest
-                    wss4j.in.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
-                </properties>
-            </web-service-security>
-        </session>
-        
-        <session>
-            <ejb-name>CalculatorImplUsernameTokenPlainPasswordEncrypt</ejb-name>
-            <web-service-security>
-                <security-realm-name/>
-                <transport-guarantee>NONE</transport-guarantee>
-                <auth-method>WS-SECURITY</auth-method>
-                <properties>
-                    wss4j.in.action = UsernameToken Encrypt
-                    wss4j.in.passwordType = PasswordText
-                    wss4j.in.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
-                    wss4j.in.decryptionPropFile = META-INF/CalculatorImplUsernameTokenPlainPasswordEncrypt-server.properties
-                </properties>
-            </web-service-security>
-        </session>
-        
-        <session>
-            <ejb-name>CalculatorImplSign</ejb-name>
-            <web-service-security>
-                <security-realm-name/>
-                <transport-guarantee>NONE</transport-guarantee>
-                <auth-method>WS-SECURITY</auth-method>
-                <properties>
-                    wss4j.in.action = Signature
-                    wss4j.in.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
-                    wss4j.in.signaturePropFile = META-INF/CalculatorImplSign-server.properties
-                </properties>
-            </web-service-security>
-        </session>
-    </enterprise-beans>
 </openejb-jar>



Mime
View raw message