NPE in RampartMessageData prevents fault being returned to service consumer
---------------------------------------------------------------------------
Key: RAMPART-293
URL: https://issues.apache.org/jira/browse/RAMPART-293
Project: Rampart
Issue Type: Bug
Components: rampart-core
Affects Versions: 1.5
Environment: Oracle OC4J 10.1.3, Axis2 1.5.1, Rampart 1.5
Reporter: Michael Strasser
Assignee: Ruchith Udayanga Fernando
When Rampart throws an exception due to policy violation or a provided handler
throws an exception because of incorrect credentials, the SOAP fault that is
created never reaches the consumer because RampartMessageData.<init> throws an
NPE in line 372.
The NPE occurs because the MessageContext object it is given has no
AxisService. Most code in the constructor checks for null axisService but this
line doesn't. A suggested patch is:
--- RampartMessageData.java Wed Apr 21 16:51:31 2010
+++ RampartMessageData.java Wed Apr 21 16:51:31 2010
@@ -372 +372,3 @@
- this.customClassLoader = msgCtx.getAxisService().getClassLoader();
+ if (axisService != null) {
+ this.customClassLoader = axisService.getClassLoader();
+ }
I don't know if there are ramifications of having a null customClassLoader
beyond this point: probably not, given that the web service call is failing!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.