You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2020/02/05 09:12:54 UTC
[cxf] branch master updated (2cde96f -> 84f9bb7)
This is an automated email from the ASF dual-hosted git repository.
buhhunyx pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git.
from 2cde96f CXF-8164: Upgrade to Spring Reactor 3.3.x
new fa49de6 cxf-systests-transports: remove deprecated PropertyPlaceholderConfigurer
new 84f9bb7 cxf-rt-ws-security: use DOMUtils.getDomElement
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java | 11 +----------
.../apache/cxf/systest/http_jetty/EngineLifecycleTest.java | 11 ++---------
.../org/apache/cxf/systest/http_jetty/jetty-engine.xml | 10 ++++++----
3 files changed, 9 insertions(+), 23 deletions(-)
[cxf] 02/02: cxf-rt-ws-security: use DOMUtils.getDomElement
Posted by bu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 84f9bb74702a07664bcbf4622b29cb4b0911010a
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Wed Feb 5 12:10:47 2020 +0300
cxf-rt-ws-security: use DOMUtils.getDomElement
---
.../org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index 9c863cc..56a722c 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -19,7 +19,6 @@
package org.apache.cxf.ws.security.wss4j;
import java.io.IOException;
-import java.lang.reflect.Method;
import java.security.Provider;
import java.security.cert.Certificate;
import java.util.ArrayList;
@@ -407,15 +406,7 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
if (document != null && node != null) {
Node newNode = null;
try {
- newNode = document.importNode(node, true);
- if (newNode != null) {
- try {
- Method method = newNode.getClass().getMethod("getDomElement");
- newNode = (Element)method.invoke(newNode);
- } catch (java.lang.NoSuchMethodException ex) {
- // do nothing;
- }
- }
+ newNode = DOMUtils.getDomElement(document.importNode(node, true));
elem.getOwnerDocument().getDocumentElement().getFirstChild().
getNextSibling().replaceChild(newNode, node);
List<WSSecurityEngineResult> encryptResults = wsResult.getActionResults().get(WSConstants.ENCR);
[cxf] 01/02: cxf-systests-transports: remove deprecated
PropertyPlaceholderConfigurer
Posted by bu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit fa49de63402275f87d22bd0251c46f4a299d0b4f
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Wed Feb 5 12:09:47 2020 +0300
cxf-systests-transports: remove deprecated PropertyPlaceholderConfigurer
---
.../apache/cxf/systest/http_jetty/EngineLifecycleTest.java | 11 ++---------
.../org/apache/cxf/systest/http_jetty/jetty-engine.xml | 10 ++++++----
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java b/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
index d311498..4c83555 100644
--- a/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
+++ b/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
@@ -25,7 +25,6 @@ import java.net.InetAddress;
import java.net.Socket;
import java.net.URL;
import java.net.UnknownHostException;
-import java.util.Properties;
import org.apache.cxf.Bus;
import org.apache.cxf.endpoint.ServerImpl;
@@ -36,7 +35,6 @@ import org.apache.cxf.transport.http_jetty.JettyHTTPDestination;
import org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.webapp.WebAppContext;
-import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.io.ClassPathResource;
@@ -104,6 +102,8 @@ public class EngineLifecycleTest {
applicationContext = new GenericApplicationContext();
+ System.setProperty("jetty.staticResourceURL", getClass().getPackage().getName().replace('.', '/'));
+
XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(applicationContext);
reader.loadBeanDefinitions(
new ClassPathResource("META-INF/cxf/cxf.xml"),
@@ -111,13 +111,6 @@ public class EngineLifecycleTest {
new ClassPathResource("jetty-engine.xml", getClass()),
new ClassPathResource("server-lifecycle-beans.xml", getClass()));
- // bring in some property values from a Properties file
- PropertyPlaceholderConfigurer cfg = new PropertyPlaceholderConfigurer();
- Properties properties = new Properties();
- properties.setProperty("staticResourceURL", getClass().getPackage().getName().replace('.', '/'));
- cfg.setProperties(properties);
- // now actually do the replacement
- cfg.postProcessBeanFactory(applicationContext.getBeanFactory());
applicationContext.refresh();
}
diff --git a/systests/transports/src/test/resources/org/apache/cxf/systest/http_jetty/jetty-engine.xml b/systests/transports/src/test/resources/org/apache/cxf/systest/http_jetty/jetty-engine.xml
index cc14f71..aba913f 100644
--- a/systests/transports/src/test/resources/org/apache/cxf/systest/http_jetty/jetty-engine.xml
+++ b/systests/transports/src/test/resources/org/apache/cxf/systest/http_jetty/jetty-engine.xml
@@ -19,11 +19,13 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
- xsi:schemaLocation="http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+ ">
<httpj:engine-factory bus="cxf">
<httpj:engine port="${testutil.ports.EngineLifecycleTest.2}">
<httpj:handlers>
@@ -37,7 +39,7 @@
<bean class="org.eclipse.jetty.server.handler.ResourceHandler">
<property name="baseResource">
<bean class="org.eclipse.jetty.util.resource.Resource" factory-method="newClassPathResource">
- <constructor-arg value="${staticResourceURL}"/>
+ <constructor-arg value="${jetty.staticResourceURL}"/>
</bean>
</property>
</bean>