cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r587276 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ systests/src/test/java/org/apache/cxf/systest/aegis/...
Date Mon, 22 Oct 2007 21:58:47 GMT
Author: dkulp
Date: Mon Oct 22 14:58:45 2007
New Revision: 587276

URL: http://svn.apache.org/viewvc?rev=587276&view=rev
Log:
Merged revisions 587274 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r587274 | dkulp | 2007-10-22 17:55:31 -0400 (Mon, 22 Oct 2007) | 2 lines
  
  [CXF-922] Fix for problems with nillables with Aegis not closing the elements
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ElementDataWriter.java
    incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataWriter.java
    incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
    incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
    incubator/cxf/branches/2.0.x-fixes/testutils/src/main/java/org/apache/cxf/authservice/AuthServiceImpl.java

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ElementDataWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ElementDataWriter.java?rev=587276&r1=587275&r2=587276&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ElementDataWriter.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/ElementDataWriter.java
Mon Oct 22 14:58:45 2007
@@ -97,6 +97,7 @@
             MessageWriter w2 = writer.getElementWriter(part.getConcreteName());
             if (type.isNillable() && type.isWriteOuter() && obj == null)
{
                 w2.writeXsiNil();
+                w2.close();
                 return;
             }
 

Modified: incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataWriter.java?rev=587276&r1=587275&r2=587276&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataWriter.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/XMLStreamDataWriter.java
Mon Oct 22 14:58:45 2007
@@ -94,6 +94,7 @@
             MessageWriter w2 = writer.getElementWriter(part.getConcreteName());
             if (type.isNillable() && type.isWriteOuter() && obj == null)
{
                 w2.writeXsiNil();
+                w2.close();
                 return;
             }
 

Modified: incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java?rev=587276&r1=587275&r2=587276&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
Mon Oct 22 14:58:45 2007
@@ -29,6 +29,7 @@
 import org.apache.cxf.aegis.util.NamespaceHelper;
 import org.apache.cxf.aegis.xml.AbstractMessageWriter;
 import org.apache.cxf.aegis.xml.MessageWriter;
+import org.apache.cxf.common.util.StringUtils;
 
 /**
  * LiteralWriter
@@ -99,10 +100,10 @@
             String decPrefix = writer.getNamespaceContext().getPrefix(namespace);
 
             // If the user didn't specify a prefix, create one
-            if (prefix == null && decPrefix == null) {
+            if (StringUtils.isEmpty(prefix) && decPrefix == null) {
                 declare = true;
                 prefix = NamespaceHelper.getUniquePrefix(writer);
-            } else if (prefix == null) {
+            } else if (StringUtils.isEmpty(prefix)) {
                 prefix = decPrefix;
             } else if (!prefix.equals(decPrefix)) {
                 declare = true;

Modified: incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java?rev=587276&r1=587275&r2=587276&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
Mon Oct 22 14:58:45 2007
@@ -56,6 +56,7 @@
         AuthService service = (AuthService) proxyFactory.create();
         assertTrue(service.authenticate("Joe", "Joe", "123"));
         assertFalse(service.authenticate("Joe1", "Joe", "fang"));      
+        assertTrue(service.authenticate("Joe", null, "123"));
         List<String> list = service.getRoles("Joe");
         assertEquals(3, list.size());
         assertEquals("Joe", list.get(0));
@@ -85,6 +86,7 @@
         AuthService service = (AuthService) proxyFactory.create();
         assertTrue(service.authenticate("Joe", "Joe", "123"));
         assertFalse(service.authenticate("Joe1", "Joe", "fang"));      
+        assertTrue(service.authenticate("Joe", null, "123"));
         List<String> list = service.getRoles("Joe");
         assertEquals(3, list.size());
         assertEquals("Joe", list.get(0));

Modified: incubator/cxf/branches/2.0.x-fixes/testutils/src/main/java/org/apache/cxf/authservice/AuthServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/testutils/src/main/java/org/apache/cxf/authservice/AuthServiceImpl.java?rev=587276&r1=587275&r2=587276&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/testutils/src/main/java/org/apache/cxf/authservice/AuthServiceImpl.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/testutils/src/main/java/org/apache/cxf/authservice/AuthServiceImpl.java
Mon Oct 22 14:58:45 2007
@@ -29,6 +29,10 @@
 public class AuthServiceImpl implements AuthService {
 
     public boolean authenticate(String sid, String uid, String pwd) {
+        if (uid == null) {
+            //test to make sure a "middle" param can be null
+            return pwd != null;
+        }
         return sid.equals(uid);
     }
 



Mime
View raw message