cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1079441 - in /cxf/trunk: rt/core/src/main/java/org/apache/cxf/bus/spring/ rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/ rt/ws/security/src/main/java/org/apache/cxf/ws/s...
Date Tue, 08 Mar 2011 17:08:47 GMT
Author: dkulp
Date: Tue Mar  8 17:08:46 2011
New Revision: 1079441

URL: http://svn.apache.org/viewvc?rev=1079441&view=rev
Log:
Start adding some support to mark the old import deprectated.
Update to latest WSS4J changes

Added:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/OldSpringSupport.java   (with
props)
Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Messages.properties
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBeanLocator.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/AbstractPolicyProvider.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
    cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CustomProcessor.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
    cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/rm.xml

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Messages.properties?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Messages.properties (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/Messages.properties Tue Mar
 8 17:08:46 2011
@@ -25,3 +25,5 @@ USER_CFG_FILE_URL_NOT_FOUND_MSG = Could 
 APP_CONTEXT_CREATION_FAILED_MSG = Failed to create application context.
 INITIAL_APP_CONTEXT_CREATION_FAILED_MSG = Initial attempt to create application context was
unsuccessful.
 USER_CFG_FILE_NOT_LOADED=Failed to load configuration {0}
+DEPRECATED_IMPORT=Import of META-INF/cxf/{0} has been deprecated and is unnecessary.
+DEPRECATED_OBJECT_RETRIEVAL=Depending on Object {0} from Spring has been deprecated.  
\ No newline at end of file

Added: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/OldSpringSupport.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/OldSpringSupport.java?rev=1079441&view=auto
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/OldSpringSupport.java (added)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/OldSpringSupport.java Tue Mar
 8 17:08:46 2011
@@ -0,0 +1,72 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.bus.spring;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.common.logging.LogUtils;
+import org.springframework.beans.factory.BeanNameAware;
+import org.springframework.beans.factory.FactoryBean;
+
+/**
+ * 
+ */
+public final class OldSpringSupport implements FactoryBean, BeanNameAware {
+    public static final Logger LOG = LogUtils.getL7dLogger(OldSpringSupport.class);
+    Bus bus;
+    Class<?> cls;
+    String id;
+    public OldSpringSupport(Bus b, Class<?> c) {
+        //utility class
+        cls = c;
+        bus = b;
+    }
+    public OldSpringSupport(Bus b, Class<?> c, String imp) {
+        //utility class
+        cls = c;
+        bus = b;
+        logWarning(imp);
+    }
+    
+    public static String logWarning(String imp) {
+        LOG.log(Level.WARNING, "DEPRECATED_IMPORT", imp);
+        return imp;
+    }
+
+    public Object getObject() throws Exception {
+        LOG.log(Level.WARNING, "DEPRECATED_OBJECT_RETRIEVAL", id);
+        return bus.getExtension(cls);
+    }
+
+    public Class getObjectType() {
+        return cls;
+    }
+
+    public boolean isSingleton() {
+        return true;
+    }
+
+    public void setBeanName(String name) {
+        id = name;
+    }
+
+}

Propchange: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/OldSpringSupport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/OldSpringSupport.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBeanLocator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBeanLocator.java?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBeanLocator.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBeanLocator.java Tue Mar
 8 17:08:46 2011
@@ -23,11 +23,11 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
 
 import org.apache.cxf.Bus;
@@ -46,15 +46,27 @@ import org.springframework.context.Confi
 public class SpringBeanLocator implements ConfiguredBeanLocator {
     ApplicationContext context;
     ConfiguredBeanLocator orig;
+    Set<String> passThroughs = new HashSet<String>();
+    
     public SpringBeanLocator(ApplicationContext ctx, Bus bus) {
         context = ctx;
         orig = bus.getExtension(ConfiguredBeanLocator.class);
         if (orig instanceof ExtensionManagerImpl) {
             List<String> names = new ArrayList<String>();
             for (String s : ctx.getBeanDefinitionNames()) {
-                names.add(s);
-                for (String s2 : ctx.getAliases(s)) {
-                    names.add(s2);
+                ConfigurableApplicationContext ctxt = (ConfigurableApplicationContext)context;
+                BeanDefinition def = ctxt.getBeanFactory().getBeanDefinition(s);
+                String cn =  def.getBeanClassName();
+                if (OldSpringSupport.class.getName().equals(cn)) {
+                    passThroughs.add(s);
+                    for (String s2 : ctx.getAliases(s)) {
+                        passThroughs.add(s2);
+                    }
+                } else {
+                    names.add(s);
+                    for (String s2 : ctx.getAliases(s)) {
+                        names.add(s2);
+                    }
                 }
             }
             
@@ -67,22 +79,31 @@ public class SpringBeanLocator implement
         Set<String> s = new LinkedHashSet<String>(Arrays.asList(context.getBeanNamesForType(type,
                                                                                         
false,
                                                                                         
true)));
+        s.removeAll(passThroughs);
         s.addAll(orig.getBeanNamesOfType(type));
         return new ArrayList<String>(s);
     }
 
     /** {@inheritDoc}*/
     public <T> Collection<? extends T> getBeansOfType(Class<T> type) {
-        Map<String, T> mp = context.getBeansOfType(type, false, true);
-        List<T> lst = new LinkedList<T>(mp.values());
+        Set<String> s = new LinkedHashSet<String>(Arrays.asList(context.getBeanNamesForType(type,
+                                                                                        
   false,
+                                                                                        
   true)));
+        s.removeAll(passThroughs);
+        List<T> lst = new LinkedList<T>();
+        for (String n : s) {
+            lst.add(context.getBean(n, type));
+        }
         lst.addAll(orig.getBeansOfType(type));
         return lst;
     }
 
     public <T> boolean loadBeansOfType(Class<T> type,
                                        BeanLoaderListener<T> listener) {
-        List<String> list = Arrays.asList(context.getBeanNamesForType(type, false,
true));
-            
+        List<String> list = new ArrayList<String>(Arrays.asList(context.getBeanNamesForType(type,
+                                                                                        
   false,
+                                                                                        
   true)));
+        list.removeAll(passThroughs);
         Collections.reverse(list);
         boolean loaded = false;
         for (String s : list) {
@@ -100,7 +121,7 @@ public class SpringBeanLocator implement
     }
 
     public boolean hasConfiguredPropertyValue(String beanName, String propertyName, String
searchValue) {
-        if (context.containsBean(beanName)) {
+        if (context.containsBean(beanName) && !passThroughs.contains(beanName)) {
             ConfigurableApplicationContext ctxt = (ConfigurableApplicationContext)context;
             BeanDefinition def = ctxt.getBeanFactory().getBeanDefinition(beanName);
             if (!ctxt.getBeanFactory().isSingleton(beanName) || def.isAbstract()) {

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/SpringBus.java Tue Mar  8 17:08:46
2011
@@ -41,6 +41,9 @@ public class SpringBus extends Extension
     AbstractApplicationContext ctx;
 
     
+    public SpringBus() {
+    }
+    
     /** {@inheritDoc}*/
     public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
{
         ctx = (AbstractApplicationContext)applicationContext;

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java (original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyEngineImpl.java Tue
Mar  8 17:08:46 2011
@@ -70,6 +70,7 @@ public class PolicyEngineImpl implements
     private Bus bus;
     private PolicyRegistry registry;
     private Collection<PolicyProvider> policyProviders;
+    private Collection<PolicyProvider> preSetPolicyProviders = new LinkedList<PolicyProvider>();
     private boolean enabled = true;
     private Boolean ignoreUnknownAssertions;
     private boolean addedBusInterceptors;
@@ -116,6 +117,13 @@ public class PolicyEngineImpl implements
         policyProviders = new CopyOnWriteArrayList<PolicyProvider>(p);
     }
    
+    public synchronized void addPolicyProvider(PolicyProvider p) {
+        if (policyProviders != null) {
+            policyProviders.add(p);
+        } else {
+            preSetPolicyProviders.add(p);
+        }
+    }
     public synchronized Collection<PolicyProvider> getPolicyProviders() {
         if (policyProviders == null) {
             policyProviders = new CopyOnWriteArrayList<PolicyProvider>();
@@ -125,6 +133,8 @@ public class PolicyEngineImpl implements
                     loc.getBeansOfType(PolicyProvider.class);
                 }
             }
+            policyProviders.addAll(preSetPolicyProviders);
+            preSetPolicyProviders = null;
         }
         return policyProviders;
     }

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/AbstractPolicyProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/AbstractPolicyProvider.java?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/AbstractPolicyProvider.java
(original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/AbstractPolicyProvider.java
Tue Mar  8 17:08:46 2011
@@ -61,7 +61,7 @@ public abstract class AbstractPolicyProv
             PolicyEngine pe = (PolicyEngine)bus.getExtension(PolicyEngine.class);
             if (pe != null) {
                 setRegistry(pe.getRegistry());
-                ((PolicyEngineImpl)pe).getPolicyProviders().add(this);
+                ((PolicyEngineImpl)pe).addPolicyProvider(this);
             }
         }
     }

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Tue Mar  8 17:08:46 2011
@@ -107,6 +107,7 @@ import org.apache.ws.security.components
 import org.apache.ws.security.components.crypto.CryptoType;
 import org.apache.ws.security.conversation.ConversationException;
 import org.apache.ws.security.conversation.dkalgo.P_SHA1;
+import org.apache.ws.security.handler.RequestData;
 import org.apache.ws.security.message.token.Reference;
 import org.apache.ws.security.processor.EncryptedKeyProcessor;
 import org.apache.ws.security.util.Base64;
@@ -929,8 +930,11 @@ public class STSClient implements Config
                 try {
                     EncryptedKeyProcessor proc = new EncryptedKeyProcessor();
                     WSDocInfo docInfo = new WSDocInfo(child.getOwnerDocument());
+                    RequestData data = new RequestData();
+                    data.setDecCrypto(createCrypto(true));
+                    data.setCallbackHandler(createHandler());
                     List<WSSecurityEngineResult> result =
-                        proc.handleToken(child, null, createCrypto(true), createHandler(),
docInfo, null);
+                        proc.handleToken(child, data, docInfo);
                     secret = 
                         (byte[])result.get(0).get(
                             WSSecurityEngineResult.TAG_SECRET

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractUsernameTokenAuthenticatingInterceptor.java
Tue Mar  8 17:08:46 2011
@@ -37,6 +37,7 @@ import org.apache.cxf.phase.PhaseInterce
 import org.apache.cxf.security.SecurityContext;
 import org.apache.ws.security.WSSecurityEngine;
 import org.apache.ws.security.WSSecurityException;
+import org.apache.ws.security.handler.RequestData;
 import org.apache.ws.security.validate.UsernameTokenValidator;
 import org.apache.ws.security.validate.Validator;
 
@@ -181,7 +182,8 @@ public abstract class AbstractUsernameTo
         
         @Override
         protected void verifyCustomPassword(
-            org.apache.ws.security.message.token.UsernameToken usernameToken
+            org.apache.ws.security.message.token.UsernameToken usernameToken,
+            RequestData data
         ) throws WSSecurityException {
             AbstractUsernameTokenAuthenticatingInterceptor.this.setSubject(
                 usernameToken.getName(), usernameToken.getPassword(), false, null, null
@@ -190,7 +192,8 @@ public abstract class AbstractUsernameTo
         
         @Override
         protected void verifyPlaintextPassword(
-            org.apache.ws.security.message.token.UsernameToken usernameToken
+            org.apache.ws.security.message.token.UsernameToken usernameToken,
+            RequestData data
         ) throws WSSecurityException {
             AbstractUsernameTokenAuthenticatingInterceptor.this.setSubject(
                 usernameToken.getName(), usernameToken.getPassword(), false, null, null
@@ -199,7 +202,8 @@ public abstract class AbstractUsernameTo
         
         @Override
         protected void verifyDigestPassword(
-            org.apache.ws.security.message.token.UsernameToken usernameToken
+            org.apache.ws.security.message.token.UsernameToken usernameToken,
+            RequestData data
         ) throws WSSecurityException {
             if (!supportDigestPasswords) {
                 throw new WSSecurityException(WSSecurityException.FAILED_AUTHENTICATION);
@@ -216,7 +220,8 @@ public abstract class AbstractUsernameTo
         
         @Override
         protected void verifyUnknownPassword(
-            org.apache.ws.security.message.token.UsernameToken usernameToken
+            org.apache.ws.security.message.token.UsernameToken usernameToken,
+            RequestData data
         ) throws WSSecurityException {
             AbstractUsernameTokenAuthenticatingInterceptor.this.setSubject(
                 usernameToken.getName(), null, false, null, null

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/UsernameTokenInterceptor.java
Tue Mar  8 17:08:46 2011
@@ -62,6 +62,7 @@ import org.apache.ws.security.WSPassword
 import org.apache.ws.security.WSSecurityEngineResult;
 import org.apache.ws.security.WSSecurityException;
 import org.apache.ws.security.WSUsernameTokenPrincipal;
+import org.apache.ws.security.handler.RequestData;
 import org.apache.ws.security.handler.WSHandlerConstants;
 import org.apache.ws.security.handler.WSHandlerResult;
 import org.apache.ws.security.message.WSSecUsernameToken;
@@ -165,21 +166,29 @@ public class UsernameTokenInterceptor ex
         }
     }
 
-    protected WSUsernameTokenPrincipal getPrincipal(Element tokenElement, SoapMessage message)
+    protected WSUsernameTokenPrincipal getPrincipal(Element tokenElement, final SoapMessage
message)
         throws WSSecurityException {
         
         boolean utWithCallbacks = 
             MessageUtils.getContextualBoolean(message, SecurityConstants.VALIDATE_TOKEN,
true);
         if (utWithCallbacks) {
             UsernameTokenProcessor p = new UsernameTokenProcessor();
-            Object validator = 
-                message.getContextualProperty(SecurityConstants.USERNAME_TOKEN_VALIDATOR);
-            if (validator instanceof Validator) {
-                p.setValidator((Validator)validator);
-            }
             WSDocInfo wsDocInfo = new WSDocInfo(tokenElement.getOwnerDocument());
+            RequestData data = new RequestData() {
+                public CallbackHandler getCallbackHandler() {
+                    return getCallback(message);
+                }
+                public Validator getValidator(QName qName) throws WSSecurityException {
+                    Object validator = 
+                        message.getContextualProperty(SecurityConstants.USERNAME_TOKEN_VALIDATOR);
+                    if (validator == null) {
+                        return super.getValidator(qName);
+                    }
+                    return (Validator)validator;
+                }
+            };
             List<WSSecurityEngineResult> results = 
-                p.handleToken(tokenElement, null, null, getCallback(message), wsDocInfo,
null);
+                p.handleToken(tokenElement, data, wsDocInfo);
             return (WSUsernameTokenPrincipal)results.get(0).get(WSSecurityEngineResult.TAG_PRINCIPAL);
         } else {
             WSUsernameTokenPrincipal principal = parseTokenAndCreatePrincipal(tokenElement);

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Tue Mar  8 17:08:46 2011
@@ -39,6 +39,8 @@ import javax.xml.stream.XMLStreamExcepti
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.dom.DOMSource;
 
+import org.w3c.dom.Element;
+
 import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.SoapVersion;
@@ -211,7 +213,7 @@ public class WSS4JInInterceptor extends 
 
             String actor = (String)getOption(WSHandlerConstants.ACTOR);
 
-            CallbackHandler cbHandler = getCallback(reqData, doAction, utWithCallbacks);
+            reqData.setCallbackHandler(getCallback(reqData, doAction, utWithCallbacks));
             
             String passwordTypeStrict = (String)getOption(WSHandlerConstants.PASSWORD_TYPE_STRICT);
             if (passwordTypeStrict == null) {
@@ -227,13 +229,10 @@ public class WSS4JInInterceptor extends 
             if (doTimeLog) {
                 t1 = System.currentTimeMillis();
             }
+            Element elem = WSSecurityUtil.getSecurityHeader(doc.getSOAPPart(), actor);
 
             List<WSSecurityEngineResult> wsResult = engine.processSecurityHeader(
-                doc.getSOAPPart(), 
-                actor, 
-                cbHandler, 
-                reqData.getSigCrypto(), 
-                reqData.getDecCrypto()
+                elem, reqData
             );
 
             if (doTimeLog) {

Modified: cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CustomProcessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CustomProcessor.java?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CustomProcessor.java
(original)
+++ cxf/trunk/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/CustomProcessor.java
Tue Mar  8 17:08:46 2011
@@ -20,10 +20,9 @@ package org.apache.cxf.ws.security.wss4j
 
 import org.apache.ws.security.WSConstants;
 import org.apache.ws.security.WSDocInfo;
-import org.apache.ws.security.WSSConfig;
 import org.apache.ws.security.WSSecurityEngineResult;
 import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.components.crypto.Crypto;
+import org.apache.ws.security.handler.RequestData;
 import org.apache.ws.security.message.token.SecurityContextToken;
 import org.apache.ws.security.processor.Processor;
 import org.apache.ws.security.validate.Validator;
@@ -36,11 +35,8 @@ public class CustomProcessor implements 
     public final java.util.List<WSSecurityEngineResult> 
     handleToken(
         final org.w3c.dom.Element elem, 
-        final Crypto crypto, 
-        final Crypto decCrypto,
-        final javax.security.auth.callback.CallbackHandler cb, 
-        final WSDocInfo wsDocInfo, 
-        final WSSConfig config
+        final RequestData data, 
+        final WSDocInfo wsDocInfo 
     ) throws WSSecurityException {
         final WSSecurityEngineResult result = 
             new WSSecurityEngineResult(

Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
(original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyTest.java
Tue Mar  8 17:08:46 2011
@@ -95,6 +95,9 @@ public class RMPolicyTest extends Abstra
 
         public static void main(String[] args) {
             try { 
+                if (args.length == 0) {
+                    args = new String[] {TEMPDIR};
+                }
                 Server s = new Server(args[0]); 
                 s.start();
             } catch (Exception ex) {

Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/rm.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/rm.xml?rev=1079441&r1=1079440&r2=1079441&view=diff
==============================================================================
--- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/rm.xml (original)
+++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/rm.xml Tue
Mar  8 17:08:46 2011
@@ -30,11 +30,6 @@ http://www.springframework.org/schema/be
       <http:client DecoupledEndpoint="http://localhost:${testutil.ports.decoupled}/decoupled_endpoint"/>
     </http:conduit>
 
-    <bean id="org.apache.cxf.ws.policy.PolicyEngine" class="org.apache.cxf.ws.policy.PolicyEngineImpl">
-        <property name="bus" ref="cxf"/>
-        <property name="enabled" value="true"/>
-    </bean>
-
     <bean class="org.apache.cxf.ws.policy.attachment.external.ExternalAttachmentProvider">
         <constructor-arg ref="cxf"/>
         <property name="location" value="${temp.location}/rm-external.xml"/>



Mime
View raw message