You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Suresh Attanayake (JIRA)" <ji...@apache.org> on 2013/09/02 15:22:58 UTC
[jira] [Updated] (RAMPART-325) NullPointerException with
UsernameToken Policy and MTOM Policy without Rampart Config in WSDL
[ https://issues.apache.org/jira/browse/RAMPART-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Suresh Attanayake updated RAMPART-325:
--------------------------------------
Attachment: RAMPART-325.patch
> NullPointerException with UsernameToken Policy and MTOM Policy without Rampart Config in WSDL
> ---------------------------------------------------------------------------------------------
>
> Key: RAMPART-325
> URL: https://issues.apache.org/jira/browse/RAMPART-325
> Project: Rampart
> Issue Type: Bug
> Components: rampart-core
> Affects Versions: 1.5.1
> Environment: JDK 1.6.0_23, Windows
> Reporter: Andre Pankraz
> Priority: Critical
> Attachments: RAMPART-325.patch
>
>
> Exception:
> 16:56:01,973 INFO [STDOUT] [ERROR]
> java.lang.NullPointerException
> at org.apache.rampart.policy.RampartPolicyData.getOptimizePartsConfig(RampartPolicyData.java:952)
> at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:165)
> at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:318)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:254)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:419)
> at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:43)
> at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
> at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:173)
> at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:144)
> I think the problem is a missing rampart-config in the WSDL...but this additional configuration isn't really necessary for MTOM Policy together with UserName Token Security Policy. (no message signature or encryption involved)
> Possible Bugfix - it works in our case with this small change:
> In org.apache.rampart.MessageBuilder, Line 161, additional Null check:
> /*
> * Checking whether MTOMSerializable is there. If so set optimizeElement.
> * */
> if(rpd.isMTOMSerialize()){
> msgCtx.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
> RampartConfig rampartConfig = rpd.getRampartConfig();
> if (rampartConfig != null) {
> OptimizePartsConfig config = rampartConfig.getOptimizeParts();
> if (config != null) {
> MessageOptimizer.optimize(msgCtx.getEnvelope(),
> config.getExpressions(), config.getNamespaces());
> }
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org