Author: dkulp
Date: Tue Apr 22 10:03:31 2008
New Revision: 650574
URL: http://svn.apache.org/viewvc?rev=650574&view=rev
Log:
Update some versions of stuff to latest versions
More attempts to work around buggy xalan issues. However, gave up and now
exclude xalan from distribution so TCK will pass.
@Ignore a JAXRS test that relies on specific map orders that breaks with JDK 1.6
[EMAIL PROTECTED] the ws-security system tests
Modified:
incubator/cxf/trunk/distribution/pom.xml
incubator/cxf/trunk/distribution/src/main/release/release_notes.txt
incubator/cxf/trunk/parent/pom.xml
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/ControlledValidationXmlBeanDefinitionReader.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/TunedDocumentLoader.java
incubator/cxf/trunk/rt/frontend/jaxrs/pom.xml
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomClientBookTest.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java
Modified: incubator/cxf/trunk/distribution/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/pom.xml?rev=650574&r1=650573&r2=650574&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/pom.xml (original)
+++ incubator/cxf/trunk/distribution/pom.xml Tue Apr 22 10:03:31 2008
@@ -225,6 +225,10 @@
<groupId>bouncycastle</groupId>
<artifactId>bcprov-jdk14</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ </exclusion>
</exclusions>
</dependency>
@@ -269,6 +273,10 @@
<exclusion>
<groupId>bouncycastle</groupId>
<artifactId>bcprov-jdk14</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
</exclusion>
</exclusions>
</dependency>
Modified: incubator/cxf/trunk/distribution/src/main/release/release_notes.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/release_notes.txt?rev=650574&r1=650573&r2=650574&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/release_notes.txt
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/release_notes.txt Tue Apr
22 10:03:31 2008
@@ -45,13 +45,20 @@
For more details, see the Installation Guide.
-2.3 Bouncy Castle/JCE requirement for WS-Security
+2.3 Bouncy Castle/JCE and Xalan requirement for WS-Security
To use the WS-Security features of CXF, you need to obtain a JCE crypto
provider
that implements the algorithms that you plan to use. One option is to download
the Bouncy Castle jar from:
http://bouncycastle.org/download/bcprov-jdk14-136.jar
-and add that to the lib directory or classpath.
+and add that to the lib directory or classpath.
+
+You also need to have xalan available as the xmlsec code has direct
+dependencies on xalan. However, all recent versions of xalan (2.5.0 - 2.7.1)
+have bugs in them that prevent the JAX-WS TCK from passing if it's on the
+classpath. Specifically, reading an EndpointReference via
+EndpointReference.readFrom(Source) may not result in an EndpointReference that
+is completely usable as namespace declarations may be lost.
3. Building the Samples
Modified: incubator/cxf/trunk/parent/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/parent/pom.xml?rev=650574&r1=650573&r2=650574&view=diff
==============================================================================
--- incubator/cxf/trunk/parent/pom.xml (original)
+++ incubator/cxf/trunk/parent/pom.xml Tue Apr 22 10:03:31 2008
@@ -58,6 +58,7 @@
<rhino.version>1.6R7</rhino.version>
<jdom.version>1.0</jdom.version>
<xmlbeans.version>2.3.0</xmlbeans.version>
+ <abdera.version>0.4.0-incubating</abdera.version>
<checkstyle.extension />
<spring.validation.mode>VALIDATION_AUTO</spring.validation.mode>
@@ -434,7 +435,7 @@
<dependency>
<groupId>org.apache.neethi</groupId>
<artifactId>neethi</artifactId>
- <version>2.0.2</version>
+ <version>2.0.4</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
@@ -534,7 +535,7 @@
<dependency>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
- <version>1.4</version>
+ <version>1.4.2</version>
</dependency>
<dependency>
<groupId>javax.xml.soap</groupId>
@@ -701,11 +702,17 @@
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>1.1</version>
+ <version>1.1.1</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
@@ -881,7 +888,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.1</version>
+ <version>2.4</version>
</dependency>
<dependency>
<groupId>bouncycastle</groupId>
@@ -892,7 +899,7 @@
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-core</artifactId>
- <version>0.3.0-incubating</version>
+ <version>${abdera.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
@@ -903,7 +910,7 @@
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-parser</artifactId>
- <version>0.3.0-incubating</version>
+ <version>${abdera.version}</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
@@ -922,7 +929,7 @@
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
- <version>1.2.5</version>
+ <version>1.2.7</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
@@ -941,7 +948,7 @@
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId>
- <version>1.2.5</version>
+ <version>1.2.7</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
Modified:
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/ControlledValidationXmlBeanDefinitionReader.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/ControlledValidationXmlBeanDefinitionReader.java?rev=650574&r1=650573&r2=650574&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/ControlledValidationXmlBeanDefinitionReader.java
(original)
+++
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/ControlledValidationXmlBeanDefinitionReader.java
Tue Apr 22 10:03:31 2008
@@ -23,8 +23,8 @@
import java.net.URL;
import java.net.URLConnection;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLStreamException;
import org.w3c.dom.Document;
@@ -130,8 +130,9 @@
}
private int fastInfosetLoadBeanDefinitions(EncodedResource encodedResource)
- throws TransformerConfigurationException, IOException,
- TransformerException, StaleFastinfosetException {
+ throws IOException, StaleFastinfosetException,
+ ParserConfigurationException, XMLStreamException {
+
URL resUrl = encodedResource.getResource().getURL();
// There are XML files scampering around that don't end in .xml.
// We don't apply the optimization to them.
Modified:
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/TunedDocumentLoader.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/TunedDocumentLoader.java?rev=650574&r1=650573&r2=650574&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/TunedDocumentLoader.java
(original)
+++
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/spring/TunedDocumentLoader.java
Tue Apr 22 10:03:31 2008
@@ -29,8 +29,8 @@
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.sax.SAXSource;
@@ -42,8 +42,10 @@
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
-import com.sun.xml.fastinfoset.sax.SAXDocumentParser;
+import com.sun.xml.fastinfoset.stax.StAXDocumentParser;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.cxf.staxutils.W3CDOMStreamWriter;
import org.springframework.beans.factory.xml.DefaultDocumentLoader;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
@@ -130,17 +132,15 @@
}
Document loadFastinfosetDocument(URL url)
- throws IOException, TransformerConfigurationException,
TransformerException {
+ throws IOException, ParserConfigurationException, XMLStreamException {
+
InputStream is = url.openStream();
- XMLReader saxReader = new SAXDocumentParser();
InputStream in = new BufferedInputStream(is);
- SAXSource saxSource = new SAXSource(saxReader, new InputSource(in));
- Document document;
- document = documentBuilder.newDocument();
- DOMResult domResult = new DOMResult(document);
- transformerFactory.newTransformer().transform(saxSource, domResult);
- is.close();
- return document;
+ XMLStreamReader staxReader = new StAXDocumentParser(in);
+ W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
+ StaxUtils.copy(staxReader, writer);
+ in.close();
+ return writer.getDocument();
}
}
Modified: incubator/cxf/trunk/rt/frontend/jaxrs/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxrs/pom.xml?rev=650574&r1=650573&r2=650574&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxrs/pom.xml (original)
+++ incubator/cxf/trunk/rt/frontend/jaxrs/pom.xml Tue Apr 22 10:03:31 2008
@@ -79,17 +79,17 @@
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-core</artifactId>
- <version>0.3.0-incubating</version>
+ <version>${abdera.version}</version>
</dependency>
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-parser</artifactId>
- <version>0.3.0-incubating</version>
+ <version>${abdera.version}</version>
</dependency>
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-extensions-json</artifactId>
- <version>0.3.0-incubating</version>
+ <version>${abdera.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.abdera</groupId>
Modified:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java?rev=650574&r1=650573&r2=650574&view=diff
==============================================================================
---
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
(original)
+++
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
Tue Apr 22 10:03:31 2008
@@ -218,7 +218,7 @@
public EndpointReference readEndpointReference(Source eprInfoset) {
try {
Unmarshaller unmarshaller = getJAXBContext().createUnmarshaller();
- return (EndpointReference)unmarshaller.unmarshal(eprInfoset);
+ return
(EndpointReference)unmarshaller.unmarshal(StaxUtils.createXMLStreamReader(eprInfoset));
} catch (JAXBException e) {
throw new WebServiceException(new
Message("ERROR_UNMARSHAL_ENDPOINTREFERENCE", LOG).toString(),
e);
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomClientBookTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomClientBookTest.java?rev=650574&r1=650573&r2=650574&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomClientBookTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomClientBookTest.java
Tue Apr 22 10:03:31 2008
@@ -38,6 +38,7 @@
import org.apache.cxf.io.CachedOutputStream;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
public class AtomClientBookTest extends AbstractBusClientServerTestBase {
@@ -51,6 +52,9 @@
}
@Test
+ @Ignore("this test fails on different JDK's due to the"
+ + "maps abdera uses not being ordered so the"
+ + "strict string compares fail")
public void testGetBooks() throws Exception {
String endpointAddress =
"http://localhost:9080/bookstore/books/feed";
Modified:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java?rev=650574&r1=650573&r2=650574&view=diff
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java
(original)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/security/WSSecurityClientTest.java
Tue Apr 22 10:03:31 2008
@@ -36,6 +36,7 @@
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.hello_world_soap_http.Greeter;
import org.junit.BeforeClass;
+import org.junit.Test;
/**
*
@@ -83,14 +84,7 @@
);
}
- //
- // TODO
- // Wss4j depends on xalan.jar ,this will broke the W3CEndpointReference
test.
- // so comment this test .After this issue is fixed or find other solution ,
- // enalbe this test.
- //
-
- @org.junit.Ignore
+ @Test
public void testTimestampSignEncrypt() {
BusFactory.setDefaultBus(
new SpringBusFactory().createBus(
@@ -108,7 +102,7 @@
greeter.sayHi();
}
- @org.junit.Test
+ @Test
public void testMalformedSecurityHeaders() throws java.lang.Exception {
Dispatch<Source> dispatcher = null;
java.io.InputStream is = null;
@@ -151,8 +145,7 @@
assertTrue(result.indexOf("Fault") != -1);
}
- private static Dispatch<Source>
- createUsernameTokenDispatcher() {
+ private static Dispatch<Source> createUsernameTokenDispatcher() {
//
// Set up the client (stolen from JAX-RS system test)
//
@@ -180,8 +173,7 @@
return dispatcher;
}
- private static String
- source2String(Source source) throws Exception {
+ private static String source2String(Source source) throws Exception {
final java.io.ByteArrayOutputStream bos = new
java.io.ByteArrayOutputStream();
final StreamResult sr = new StreamResult(bos);
final Transformer trans =