You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by ru...@apache.org on 2005/10/30 14:51:57 UTC

svn commit: r329567 - in /webservices/wss4j/trunk/src/org/apache/ws/sandbox/security/trust/message/token: RequestType.java TokenType.java

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/%3c5a7217cf0510200025h67f54dc3j66752c6bfaeffc85@mail.gmail.com%3e


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: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org