You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by we...@apache.org on 2005/06/05 21:04:53 UTC
cvs commit: ws-fx/wss4j/src/org/apache/ws/axis/security WSDoAllReceiver.java
werner 2005/06/05 12:04:53
Modified: wss4j/src/org/apache/ws/axis/security WSDoAllReceiver.java
Log:
Accept the full XMLSchema date format including milliseconds.
Revision Changes Path
1.25 +6 -5 ws-fx/wss4j/src/org/apache/ws/axis/security/WSDoAllReceiver.java
Index: WSDoAllReceiver.java
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/src/org/apache/ws/axis/security/WSDoAllReceiver.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- WSDoAllReceiver.java 21 May 2005 20:40:39 -0000 1.24
+++ WSDoAllReceiver.java 5 Jun 2005 19:04:53 -0000 1.25
@@ -41,6 +41,7 @@
import org.apache.ws.security.components.crypto.CryptoFactory;
import org.apache.ws.security.message.token.Timestamp;
import org.apache.ws.security.util.WSSecurityUtil;
+import org.apache.ws.security.util.XmlSchemaDateFormat;
import org.apache.xml.security.utils.XMLUtils;
import org.w3c.dom.Document;
@@ -51,13 +52,12 @@
import java.io.ByteArrayOutputStream;
import java.math.BigInteger;
import java.security.cert.X509Certificate;
-import java.text.SimpleDateFormat;
+import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
-import java.util.TimeZone;
import java.util.Vector;
public class WSDoAllReceiver extends BasicHandler {
@@ -73,7 +73,7 @@
*
* @author wdi
*/
- private class RequestData {
+ protected class RequestData {
MessageContext msgContext = null;
Crypto sigCrypto = null;
@@ -100,6 +100,8 @@
* @throws AxisFault
*/
public void invoke(MessageContext msgContext) throws AxisFault {
+
+ doDebug = log.isDebugEnabled();
if (doDebug) {
log.debug("WSDoAllReceiver: enter invoke() with msg type: "
@@ -670,8 +672,7 @@
if (doDebug) {
log.debug("Preparing to verify the timestamp");
- SimpleDateFormat zulu = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
- zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
+ DateFormat zulu = new XmlSchemaDateFormat();
log.debug("Validation of Timestamp: Current time is "
+ zulu.format(Calendar.getInstance().getTime()));
log.debug("Validation of Timestamp: Valid creation is "