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 2004/03/28 19:48:39 UTC
cvs commit: ws-fx/wss4j/src/org/apache/ws/security WSConstants.java Todolist.java WSSecurityEngine.java
werner 2004/03/28 09:48:39
Modified: wss4j/src/org/apache/ws/security/message
EnvelopeIdResolver.java
wss4j/src/org/apache/ws/security WSConstants.java
Todolist.java WSSecurityEngine.java
Log:
Some small code cleanup
Revision Changes Path
1.2 +5 -5 ws-fx/wss4j/src/org/apache/ws/security/message/EnvelopeIdResolver.java
Index: EnvelopeIdResolver.java
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/src/org/apache/ws/security/message/EnvelopeIdResolver.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- EnvelopeIdResolver.java 13 Feb 2004 20:43:08 -0000 1.1
+++ EnvelopeIdResolver.java 28 Mar 2004 17:48:39 -0000 1.2
@@ -27,7 +27,7 @@
import org.apache.xml.security.utils.resolver.ResourceResolverException;
import org.apache.xml.security.utils.resolver.ResourceResolverSpi;
import org.apache.xml.utils.URI;
-import org.apache.xpath.CachedXPathAPI;
+// import org.apache.xpath.CachedXPathAPI;
import org.apache.xpath.XPathAPI;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
@@ -96,7 +96,7 @@
// Xalan fix for catching all namespaces
XMLUtils.circumventBug2650(doc);
- CachedXPathAPI cXPathAPI = new CachedXPathAPI();
+// CachedXPathAPI cXPathAPI = new CachedXPathAPI();
/*
* URI="#chapter1"
@@ -122,9 +122,9 @@
BaseURI);
}
String cId = selectedElem.getAttributeNS(WSConstants.WSU_NS, "Id");
- if ((cId == null) || (cId.length() == 0)) {
- cId = selectedElem.getAttributeNS(WSConstants.SOAP_SEC_NS, "id");
- }
+// if ((cId == null) || (cId.length() == 0)) {
+// cId = selectedElem.getAttributeNS(WSConstants.SOAP_SEC_NS, "id");
+// }
/*
* If Body Id match fails, look for a generic Id (without a namespace)
* that matches the URI. If that lookup fails, try to get a namespace
1.12 +1 -3 ws-fx/wss4j/src/org/apache/ws/security/WSConstants.java
Index: WSConstants.java
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/src/org/apache/ws/security/WSConstants.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- WSConstants.java 24 Mar 2004 19:22:48 -0000 1.11
+++ WSConstants.java 28 Mar 2004 17:48:39 -0000 1.12
@@ -40,7 +40,7 @@
public static final String ENC_PREFIX = "xenc";
public static final String ENC_KEY_LN = "EncryptedKey";
public static final String REF_LIST_LN = "ReferenceList";
- public static final String SOAP_SEC_NS = "http://schemas.xmlsoap.org/soap/security/2000-12";
+// public static final String SOAP_SEC_NS = "http://schemas.xmlsoap.org/soap/security/2000-12";
public static final String XMLNS_NS = "http://www.w3.org/2000/xmlns/";
public static final String XML_NS = "http://www.w3.org/XML/1998/namespace";
public static final String USERNAME_TOKEN_LN = "UsernameToken";
@@ -59,8 +59,6 @@
"http://schemas.xmlsoap.org/soap/envelope/" ;
public static final String URI_SOAP12_ENV =
"http://www.w3.org/2003/05/soap-envelope";
- // public static final String URI_DEFAULT_SOAP_ENV =
- // DEFAULT_SOAP_VERSION.getEnvelopeURI();
public static final String[] URIS_SOAP_ENV = {
URI_SOAP11_ENV,
1.2 +2 -2 ws-fx/wss4j/src/org/apache/ws/security/Todolist.java
Index: Todolist.java
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/src/org/apache/ws/security/Todolist.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Todolist.java 17 Mar 2004 19:36:30 -0000 1.1
+++ Todolist.java 28 Mar 2004 17:48:39 -0000 1.2
@@ -18,8 +18,8 @@
*
* TODO: Clean up exception handling, remap to WSSecurityException, avoid generic Exception.
* TODO: make Cipher provider configurable
- * TODO: new function to perform Certificate handover from request to response according to Kojira's
- * explanation
+ * DONE: new function to perform Certificate handover from request to response according to Kojira's
+ * explanation. Werner, checkin March, 24
* TODO: Better texts for the Exception, see OASIS WSS specs for recommended fault strings
*
*/
1.17 +1 -2 ws-fx/wss4j/src/org/apache/ws/security/WSSecurityEngine.java
Index: WSSecurityEngine.java
===================================================================
RCS file: /home/cvs/ws-fx/wss4j/src/org/apache/ws/security/WSSecurityEngine.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- WSSecurityEngine.java 24 Mar 2004 19:22:48 -0000 1.16
+++ WSSecurityEngine.java 28 Mar 2004 17:48:39 -0000 1.17
@@ -53,7 +53,6 @@
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.xml.namespace.QName;
-//import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
@@ -1042,7 +1041,7 @@
typeStr= tmpE.getAttribute("Type");
}
if (typeStr != null) {
- content = typeStr.equals("http://www.w3.org/2001/04/xmlenc#Content") ? true : false;
+ content = typeStr.equals(WSConstants.ENC_NS + "Content") ? true : false;
}
return content;
}