Author: ruchithf
Date: Sun Oct 30 05:51:23 2005
New Revision: 329567

URL: http://svn.apache.org/viewcvs?rev=329567&view=rev
Log:
Fix for the problem reported by Alex 
http://mail-archives.apache.org/mod_mbox/ws-wss4j-dev/200510.mbox/[EMAIL 
PROTECTED]


Modified:
    
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestType.java
    
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/TokenType.java

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestType.java
URL: 
http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestType.java?rev=329567&r1=329566&r2=329567&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestType.java
 (original)
+++ 
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/RequestType.java
 Sun Oct 30 05:51:23 2005
@@ -31,7 +31,7 @@
  *         <p/>
  *         RequestType token
  */
-public class RequestType extends AbstractToken {
+public class RequestType extends ValueElement {
        
     public static final QName TOKEN = new QName(TrustConstants.WST_NS, 
TrustConstants.REQUEST_TYPE_LN, TrustConstants.WST_PREFIX);
  
@@ -56,31 +56,6 @@
         super(doc);
     }
 
-    /**
-     * Returns the value of the text node
-     *
-     * @return
-     */
-    public String getValue() {
-       if(this.valueText != null)
-               return this.valueText.getNodeValue();
-       else
-               return null;
-    }
-
-    /**
-     * Sets the text node
-     *
-     * @param val
-     */
-    public void setValue(String val) {
-       if(this.valueText != null)
-               this.element.removeChild(this.valueText);
-       
-               this.valueText = element.getOwnerDocument().createTextNode(val);
-        this.element.appendChild(this.valueText);
-    }
-
        /**
         * Returns the QName of this type
         * @see 
org.apache.ws.sandbox.security.trust.message.token.AbstractToken#getToken()
@@ -89,19 +64,4 @@
                return TOKEN;
        }
 
-       /* (non-Javadoc)
-        * @see 
org.apache.ws.security.trust.message.token.AbstractToken#deserializeElement(org.w3c.dom.Element)
-        */
-       protected void deserializeChildElement(Element elem) {
-               // TODO Auto-generated method stub
-               
-       }
-
-       /* (non-Javadoc)
-        * @see 
org.apache.ws.security.trust.message.token.AbstractToken#deserializeElementText(org.w3c.dom.Text)
-        */
-       protected void setElementTextValue(Text textNode) {
-               // TODO Auto-generated method stub
-               
-       }
 }

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/TokenType.java
URL: 
http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/TokenType.java?rev=329567&r1=329566&r2=329567&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/TokenType.java
 (original)
+++ 
webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token/TokenType.java
 Sun Oct 30 05:51:23 2005
@@ -16,14 +16,13 @@
  */
 package org.apache.ws.sandbox.security.trust.message.token;
 
-import javax.xml.namespace.QName;
-
-import org.apache.ws.security.WSSecurityException;
 import org.apache.ws.sandbox.security.trust.TrustConstants;
 import org.apache.ws.sandbox.security.trust.WSTrustException;
+import org.apache.ws.security.WSSecurityException;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
-import org.w3c.dom.Text;
+
+import javax.xml.namespace.QName;
 
 /**
  * @author Malinda Kaushalye
@@ -31,14 +30,13 @@
  *         <p/>
  *         TokenType element
  */
-public class TokenType extends AbstractToken {
+public class TokenType extends ValueElement {
        
     public static final String UNT = 
"http://schemas.xmlsoap.org/ws/2004/04/security/sc/unt";;
     public static final String SCT = 
"http://schemas.xmlsoap.org/ws/2004/04/security/sc/sct";;
 
     public static final QName TOKEN = new QName(TrustConstants.WST_NS, 
TrustConstants.TOKEN_TYPE_LN, TrustConstants.WST_PREFIX);
     
-    private Text valueText;
 
     /**
      * Constructor for TokenType
@@ -59,52 +57,11 @@
         super(doc);
     }
 
-    /**
-     * Set the TokenType value
-     *
-     * @param val
-     */
-    public void setValue(String val) {
-        if(this.valueText != null)
-               this.element.removeChild(this.valueText);
-        
-        this.valueText = element.getOwnerDocument().createTextNode(val);
-       this.element.appendChild(this.valueText);
-    }
-    
-    /**
-     * This will return the text node of the element
-     *
-     * @return
-     */
-    public String getValue() {
-       if(this.valueText != null)
-               return this.valueText.getNodeValue();
-       else
-               return null;
-    }
-
        /**
         * Returns the QName of this type
         * @see 
org.apache.ws.sandbox.security.trust.message.token.AbstractToken#getToken()
         */
        protected QName getToken() {
                return TOKEN;
-       }
-
-       /* (non-Javadoc)
-        * @see 
org.apache.ws.security.trust.message.token.AbstractToken#deserializeElement(org.w3c.dom.Element)
-        */
-       protected void deserializeChildElement(Element elem) {
-               // TODO Auto-generated method stub
-               
-       }
-
-       /* (non-Javadoc)
-        * @see 
org.apache.ws.security.trust.message.token.AbstractToken#deserializeElementText(org.w3c.dom.Text)
-        */
-       protected void setElementTextValue(Text textNode) {
-               // TODO Auto-generated method stub
-               
        }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to