Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E73E59A44 for ; Thu, 1 Mar 2012 22:16:06 +0000 (UTC) Received: (qmail 12987 invoked by uid 500); 1 Mar 2012 22:16:04 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 12916 invoked by uid 500); 1 Mar 2012 22:16:04 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 12860 invoked by uid 99); 1 Mar 2012 22:16:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 22:16:04 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.85.173.253] (HELO server.dankulp.com) (64.85.173.253) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 22:15:59 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id 79345182B07; Thu, 1 Mar 2012 17:15:38 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-dev@cxf.apache.org.0O438so49u Received: from dilbert.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id 1FBCF182A77; Thu, 1 Mar 2012 17:15:37 -0500 (EST) From: Daniel Kulp To: dev@cxf.apache.org Cc: Sergey Beryozkin Subject: Re: svn commit: r1295714 Date: Thu, 01 Mar 2012 17:15:35 -0500 Message-ID: <1886841.uQyQzk1dFi@dilbert.dankulp.com> User-Agent: KMail/4.8.0 (Linux/3.2.2; KDE/4.8.0; x86_64; ; ) In-Reply-To: <4F4FF1D7.5070703@gmail.com> References: <20120301175819.F2E00238889B@eris.apache.org> <4F4FF1D7.5070703@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-102.9 required=3.0 tests=ALL_TRUSTED,BAYES_00, SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 On Thursday, March 01, 2012 10:01:59 PM Sergey Beryozkin wrote: > Hi Aki, > > Thanks for fixing this issue. > As far as I recall, the written uris property was added to address > https://issues.apache.org/jira/browse/CXF-3958 > > I can get the test added asap just to confirm the fix you provided will > also do for CXF-3958 Well, it was modified for CXF-3958, not added. However, with this change, I am seeing test failures which Jenkins is seeing as well: https://builds.apache.org/view/A-F/view/CXF/job/CXF-Trunk-JDK15/org.apache.cxf.systests$cxf-systests-jaxrs/3065/testReport/ So that definitely needs to be addresed. Dan > > Thanks, Sergey > > On 01/03/12 17:58, ay@apache.org wrote: > > Author: ay > > Date: Thu Mar 1 17:58:19 2012 > > New Revision: 1295714 > > > > URL: http://svn.apache.org/viewvc?rev=1295714&view=rev > > Log: > > [CXF-4150] Transform feature's OutTransformWriter may not correctly > > generate namespace declarations> > > Added: > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/wstrus > > tReqSTRC.xml (with props) > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/wstru > > stReqSTRCIn1.xml (with props)> > > Modified: > > cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTra > > nsformWriter.java > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/transform/InTra > > nsformReaderTest.java > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/transform/OutTr > > ansformWriterTest.java> > > Modified: > > cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransfo > > rmWriter.java URL: > > http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/s > > taxutils/transform/OutTransformWriter.java?rev=1295714&r1=1295713&r2=12957 > > 14&view=diff > > ========================================================================= > > ===== --- > > cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransfo > > rmWriter.java (original) +++ > > cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/transform/OutTransfo > > rmWriter.java Thu Mar 1 17:58:19 2012 @@ -20,8 +20,6 @@ package > > org.apache.cxf.staxutils.transfo > > > > import java.util.ArrayList; > > import java.util.HashMap; > > > > -import java.util.HashSet; > > -import java.util.LinkedList; > > > > import java.util.List; > > import java.util.Map; > > import java.util.Set; > > > > @@ -43,7 +41,6 @@ public class OutTransformWriter extends > > > > private QNamesMap attributesMap; > > private Map appendMap = new HashMap > ElementProperty>(5); private Map nsMap = new > > HashMap(5);> > > - private List> writtenUris = new > > LinkedList>();> > > private Set dropElements; > > private Stack> pushedAheadEvents = new > > Stack>();> > > @@ -96,7 +93,7 @@ public class OutTransformWriter extends > > > > uri = value != null ? value : uri; > > > > - if (writtenUris.get(0).contains(uri)) { > > + if (prefix.equals(getPrefix(uri))) { > > > > return; > > > > } > > > > @@ -108,7 +105,6 @@ public class OutTransformWriter extends > > > > } > > super.writeNamespace(prefix, uri); > > > > } > > > > - writtenUris.get(0).add(uri); > > > > } > > > > @Override > > > > @@ -117,13 +113,6 @@ public class OutTransformWriter extends > > > > if (matchesDropped(false)) { > > > > return; > > > > } > > > > - Set s; > > - if (writtenUris.isEmpty()) { > > - s = new HashSet(); > > - } else { > > - s = new HashSet(writtenUris.get(0)); > > - } > > - writtenUris.add(0, s); > > > > final QName theName = new QName(uri, local, prefix); > > final ElementProperty appendProp = appendMap.remove(theName); > > > > @@ -243,9 +232,7 @@ public class OutTransformWriter extends > > > > } else if (dropDepth> 0) { > > > > dropDepth = 0; > > > > } > > > > - if (!writtenUris.isEmpty()) { > > - writtenUris.remove(0); > > - } > > + > > > > QName theName = elementsStack.pop(); > > final boolean dropped = dropElements.contains(theName); > > if (!dropped) { > > > > Added: > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/wstrustReq > > STRC.xml URL: > > http://svn.apache.org/viewvc/cxf/trunk/api/src/test/java/org/apache/cxf/s > > taxutils/resources/wstrustReqSTRC.xml?rev=1295714&view=auto > > ========================================================================= > > ===== Binary file - no diff available. > > > > Propchange: > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/wstrustReq > > STRC.xml > > ------------------------------------------------------------------------- > > -----> > > svn:mime-type = application/xml > > > > Added: > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/wstrustReq > > STRCIn1.xml URL: > > http://svn.apache.org/viewvc/cxf/trunk/api/src/test/java/org/apache/cxf/s > > taxutils/resources/wstrustReqSTRCIn1.xml?rev=1295714&view=auto > > ========================================================================= > > ===== Binary file - no diff available. > > > > Propchange: > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/wstrustReq > > STRCIn1.xml > > ------------------------------------------------------------------------- > > -----> > > svn:mime-type = application/xml > > > > Modified: > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/transform/InTransfor > > mReaderTest.java URL: > > http://svn.apache.org/viewvc/cxf/trunk/api/src/test/java/org/apache/cxf/s > > taxutils/transform/InTransformReaderTest.java?rev=1295714&r1=1295713&r2=12 > > 95714&view=diff > > ========================================================================= > > ===== --- > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/transform/InTransfor > > mReaderTest.java (original) +++ > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/transform/InTransfor > > mReaderTest.java Thu Mar 1 17:58:19 2012 @@ -424,4 +424,18 @@ public > > class InTransformReaderTest exten > > > > } > > > > + @Test > > + public void testOldSTSTransform() throws Exception { > > + Map transformElements = new HashMap > String>(); + > > + > > transformElements.put("{http://docs.oasis-open.org/ws-sx/ws-trust/200512} > > *", + > > "{http://schemas.xmlsoap.org/ws/2005/02/trust}*"); + > > + > > + > > TransformTestUtils.transformInStreamAndCompare("../resources/wstrustReqST > > RCIn1.xml", + > > "../resources/wstrustReqSTRC.xml", + > > transformElements, null, null, null, null); + > > + } > > + > > > > } > > > > Modified: > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/transform/OutTransfo > > rmWriterTest.java URL: > > http://svn.apache.org/viewvc/cxf/trunk/api/src/test/java/org/apache/cxf/s > > taxutils/transform/OutTransformWriterTest.java?rev=1295714&r1=1295713&r2=1 > > 295714&view=diff > > ========================================================================= > > ===== --- > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/transform/OutTransfo > > rmWriterTest.java (original) +++ > > cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/transform/OutTransfo > > rmWriterTest.java Thu Mar 1 17:58:19 2012 @@ -396,4 +396,14 @@ public > > class OutTransformWriterTest exte > > > > } > > > > + @Test > > + public void testOldSTSTransform() throws Exception { > > + Map transformElements = new HashMap > String>(); + > > transformElements.put("{http://docs.oasis-open.org/ws-sx/ws-trust/200512} > > *", + > > "{http://schemas.xmlsoap.org/ws/2005/02/trust}*"); + > > + > > TransformTestUtils.transformOutStreamAndCompare("../resources/wstrustReqS > > TRCIn1.xml", + > > "../resources/wstrustReqSTRC.xml", + > > transformElements, null, null, null, null); + } > > > > } -- Daniel Kulp dkulp@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com