[WSS4J] WSDoAllReceiver ignoring Actor when calling Security engine?

Jason Essington <[email protected]> Fri, 6 Feb 2004 16:36:38 -0700
Newsgroups gmane.text.xml.wss4j
Message-ID <[email protected]>
--Apple-Mail-9--980849262
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

Hi there

It looks like the WSDoAllReceiver is not passing the actor on to the 
WSSecurityEngine . . .:
	wsResult =
		secEngine.processSecurityHeader(
			doc,
			null,  // <-- this should be the actor
			cbHandler,
			sigCrypto,
			decCrypto);

In my (test) case where I have only 1 actor and it's not the default 
(or rather nonexistent) actor, this causes the security engine to 
return a result of null.

That causes a NPE at the line:
		Vector resultActions = wsResult.getActions();
Since there are no security actions performed by the null actor.

Simply supplying the actor solves this problem, and avoids any 
possibility of an NPE.

-jason


--Apple-Mail-9--980849262
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="doAllActor.patch"
Content-Disposition: attachment;
	filename=doAllActor.patch

Index: src/org/apache/ws/axis/security/WSDoAllReceiver.java
===================================================================
RCS file: /cvsroot/wss4j/wss4j/src/org/apache/ws/axis/security/WSDoAllReceiver.java,v
retrieving revision 1.10
diff -u -r1.10 WSDoAllReceiver.java
--- src/org/apache/ws/axis/security/WSDoAllReceiver.java	22 Dec 2003 13:36:11 -0000	1.10
+++ src/org/apache/ws/axis/security/WSDoAllReceiver.java	6 Feb 2004 23:22:20 -0000
@@ -202,7 +202,7 @@
 			wsResult =
 				secEngine.processSecurityHeader(
 					doc,
-					null,
+					actor,
 					cbHandler,
 					sigCrypto,
 					decCrypto);

--Apple-Mail-9--980849262
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed



--Apple-Mail-9--980849262--



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn