cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r993472 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java
Date Tue, 07 Sep 2010 18:53:48 GMT
Author: dkulp
Date: Tue Sep  7 18:53:47 2010
New Revision: 993472

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

........
  r993429 | sergeyb | 2010-09-07 13:05:45 -0400 (Tue, 07 Sep 2010) | 1 line
  
  Minor update to ProviderImpl to check null or empty custom metadata
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java

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

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java?rev=993472&r1=993471&r2=993472&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spi/ProviderImpl.java
Tue Sep  7 18:53:47 2010
@@ -183,7 +183,7 @@ public class ProviderImpl extends javax.
             if (wsdlDocumentLocation != null
                 || interfaceName != null
                 || serviceName != null
-                || metadata != null) {
+                || (metadata != null && metadata.size() > 0)) {
                 
                         
                 writer.writeStartElement(JAXWSAConstants.WSA_PREFIX, JAXWSAConstants.WSA_METADATA_NAME,

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java?rev=993472&r1=993471&r2=993472&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java
Tue Sep  7 18:53:47 2010
@@ -69,6 +69,19 @@ public class ProviderImplTest extends or
     }
     
     @org.junit.Test
+    public void testCreateW3CEprNoMetadataEmptyCustomMetadata() throws Exception {
+        ProviderImpl impl = new ProviderImpl();
+        W3CEndpointReference w3Epr = impl.createW3CEndpointReference(
+           "http://myaddress", null, null, new ArrayList<Element>(), null, null);
+        
+        java.io.StringWriter sw = new java.io.StringWriter();
+        StreamResult result = new StreamResult(sw);
+        w3Epr.writeTo(result);
+        assertTrue("Address is expected", sw.toString().contains("Address"));
+        assertFalse("empty Metadata element should be dropped", sw.toString().contains("Metadata"));
+    }
+    
+    @org.junit.Test
     public void testCreateW3CEprMetadataInterfaceNameOnly() throws Exception {
         QName serviceName = new QName("http://cxf.apache.org", "IntfName");
         ProviderImpl impl = new ProviderImpl();



Mime
View raw message