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 Javier Delgadillo <jd...@esri.com> on 2004/10/22 00:36:06 UTC
Patch for UsernameToken.java
All,
In using UsernameToken class, I ran into an exception where the constructor
for the UsernameToken class didn't like an incoming token that wasn't using
the default wssConfig namesapce. Yet a few lines later, it proceeds to
parse the token ignoring namespaces if the
wssConfig.getProcessNonCompliantMessages() flag is true. I believe the
exception should not be thrown in the case where
wssConfig.getProcessNonCompliantMessages() flag is true.
I'm proposing this patch:
Index: UsernameToken.java
===================================================================
RCS file:
/home/cvspublic/ws-fx/wss4j/src/org/apache/ws/security/message/token/Usernam
eToken.java,v
retrieving revision 1.8
diff -u -r1.8 UsernameToken.java
--- UsernameToken.java 2 Sep 2004 02:27:03 -0000 1.8
+++ UsernameToken.java 21 Oct 2004 22:28:16 -0000
@@ -87,7 +87,7 @@
this.wssConfig = wssConfig;
token = new QName(wssConfig.getWsseNS(), TOKEN);
QName el = new QName(this.element.getNamespaceURI(),
this.element.getLocalName());
- if (!el.equals(token)) {
+ if (!wssConfig.getProcessNonCompliantMessages() &&
!el.equals(token)) {
throw new
WSSecurityException(WSSecurityException.INVALID_SECURITY_TOKEN,
"badTokenType00", new Object[]{el});
}
if (wssConfig.getProcessNonCompliantMessages()) {
---
Javier Delgadillo
ESRI Internet Solutions Division
(909) 793-2853 x1068
http://www.esri.com/