cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1332670 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Date Tue, 01 May 2012 14:19:25 GMT
Author: coheigea
Date: Tue May  1 14:19:24 2012
New Revision: 1332670

URL: http://svn.apache.org/viewvc?rev=1332670&view=rev
Log:
Only write wst:SecondaryParameters out if there are child Elements

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=1332670&r1=1332669&r2=1332670&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Tue May  1 14:19:24 2012
@@ -627,7 +627,7 @@ public class STSClient implements Config
         String keyTypeTemplate = null;
         String sptt = null;
         
-        if (template != null) {
+        if (template != null && DOMUtils.getFirstElement(template) != null) {
             if (this.useSecondaryParameters()) {
                 writer.writeStartElement("wst", "SecondaryParameters", namespace);
             }
@@ -884,7 +884,7 @@ public class STSClient implements Config
         }
         
         String sptt = null;
-        if (template != null) {
+        if (template != null && DOMUtils.getFirstElement(template) != null) {
             if (this.useSecondaryParameters()) {
                 writer.writeStartElement("wst", "SecondaryParameters", namespace);
             }



Mime
View raw message