You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2012/05/01 16:19:25 UTC

svn commit: r1332670 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java

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);
             }