cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r522425 - in /incubator/cxf/trunk/rt: core/src/main/java/org/apache/cxf/bus/cxf/ frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/ ws/security/src/test/java/org/apache/cxf/...
Date Mon, 26 Mar 2007 05:40:23 GMT
Author: dandiep
Date: Sun Mar 25 22:40:22 2007
New Revision: 522425

URL: http://svn.apache.org/viewvc?view=rev&rev=522425
Log:
o Don't lazy-init server beans in the spring context
o Remove empty package
o Expose signature & timestamp info in the message from WSS4J

Removed:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/cxf/
Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ServerBeanDefinitionParser.java
    incubator/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
    incubator/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java?view=diff&rev=522425&r1=522424&r2=522425
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointFactoryBeanDefinitionParser.java
Sun Mar 25 22:40:22 2007
@@ -69,6 +69,14 @@
                 }
             }
         }
+        
+        // We don't really want to delay the registration of our Server
+        bean.setLazyInit(false);
+        
+//        PropertyValue idValue = bean.getBeanDefinition().getPropertyValues().getPropertyValue("id");
+//        if (idValue == null) {
+//            bean.addPropertyReference("id", arg1);
+//        }
     }
 
     private void loadImplementor(BeanDefinitionBuilder bean, String val) {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ServerBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ServerBeanDefinitionParser.java?view=diff&rev=522425&r1=522424&r2=522425
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ServerBeanDefinitionParser.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ServerBeanDefinitionParser.java
Sun Mar 25 22:40:22 2007
@@ -78,6 +78,9 @@
         }
         
         bean.setInitMethodName("create");
+        
+        // We don't really want to delay the registration of our Server
+        bean.setLazyInit(false);
     }
 
     private void loadImplementor(BeanDefinitionBuilder bean, String val) {

Modified: incubator/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?view=diff&rev=522425&r1=522424&r2=522425
==============================================================================
--- incubator/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Sun Mar 25 22:40:22 2007
@@ -56,9 +56,13 @@
  * @author <a href="mailto:tsztelak@gmail.com">Tomasz Sztelak</a>
  */
 public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
+
+    public static final String TIMESTAMP_RESULT = "wss4j.timestamp.result";
+    public static final String SIGNATURE_RESULT = "wss4j.signature.result";
+
     private static final Logger LOG = Logger.getLogger(WSS4JInInterceptor.class.getName());
     private static final Logger TIME_LOG = Logger.getLogger(WSS4JInInterceptor.class.getName()
+ "-Time");
-
+    
     public WSS4JInInterceptor() {
         super();
 
@@ -170,6 +174,7 @@
                     LOG.warning("WThe certificate used for the signature is not trusted");
                     throw new SoapFault(new Message("UNTRUSTED_CERT", LOG), version.getSender());
                 }
+                msg.put(SIGNATURE_RESULT, actionResult);
             }
 
             /*
@@ -191,6 +196,7 @@
                     LOG.warning("The timestamp could not be validated");
                     throw new SoapFault(new Message("INVALID_TIMESTAMP", LOG), version.getSender());
                 }
+                msg.put(TIMESTAMP_RESULT, actionResult);
             }
 
             /*

Modified: incubator/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java?view=diff&rev=522425&r1=522424&r2=522425
==============================================================================
--- incubator/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
(original)
+++ incubator/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
Sun Mar 25 22:40:22 2007
@@ -20,6 +20,7 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.security.cert.X509Certificate;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -39,6 +40,7 @@
 import org.apache.cxf.message.MessageImpl;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.WSSecurityEngineResult;
 import org.apache.ws.security.handler.WSHandlerConstants;
 import org.junit.Test;
 
@@ -104,6 +106,12 @@
         inHandler.setProperty(WSHandlerConstants.SIG_PROP_FILE, "META-INF/cxf/insecurity.properties");
 
         inHandler.handleMessage(inmsg);
+        
+        WSSecurityEngineResult result = 
+            (WSSecurityEngineResult) inmsg.get(WSS4JInInterceptor.SIGNATURE_RESULT);
+        assertNotNull(result);
+        X509Certificate certificate = result.getCertificate();
+        assertNotNull(certificate);
     }
 
     private byte[] getMessageBytes(Document doc) throws Exception {



Mime
View raw message