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 "Danny Worm (JIRA)" <ji...@apache.org> on 2009/07/03 14:04:47 UTC
[jira] Commented: (AXIS2-4377) Exception thrown in
MessageContext.findBindingMessage
[ https://issues.apache.org/jira/browse/AXIS2-4377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12726929#action_12726929 ]
Danny Worm commented on AXIS2-4377:
-----------------------------------
I've the same issue.
All works fine for normal operations. But in case of an CustomFault thrown by the service I got the same Exception.
My policy is define in services.xml like this:
<serviceGroup>
<service name="xxx">
<operation />
<operation />
</service>
<module ref="rampart" />
<wsp:Policy wsu:Id="UsernameToken"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SupportingTokens
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
<wsp:Policy>
<sp:UsernameToken
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:HashPassword />
</wsp:Policy>
</sp:UsernameToken>
</wsp:Policy>
</sp:SupportingTokens>
<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
<ramp:passwordCallbackClass>
de.webservice.MyPassCallback
</ramp:passwordCallbackClass>
</ramp:RampartConfig>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
</serviceGroup>
Does anyone have a workaround?
> Exception thrown in MessageContext.findBindingMessage
> -----------------------------------------------------
>
> Key: AXIS2-4377
> URL: https://issues.apache.org/jira/browse/AXIS2-4377
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.5
> Environment: Java 1.5.0_16-b02 on XP SP3, Axis2 1.5 GA, Tomcat 6.0.18
> Reporter: Jonas Buys
> Fix For: 1.5.1
>
>
> I have a module to enforce some custom policies when invoking a dummy service and it worked completely well on Axis2 1.4.1.
> Yet, when I am throwing an AxisFault SOAP fault, 1.5.1 throws this exception:
> SEVERE: Servlet.service() for servlet AxisServlet threw exception
> java.lang.NullPointerException
> at org.apache.axis2.context.MessageContext.findBindingMessage(MessageContext.java:1609)
> at org.apache.axis2.context.MessageContext.getEffectivePolicy(MessageContext.java:1581)
> at be.ac.ua.pats.adss.handlers.LoggingHandler.invoke(LoggingHandler.java:42)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:318)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251)
> at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:481)
> at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:423)
> at org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.java:386)
> at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:176)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:595)
> Apparantly, the axisMessage is null on line 1609 (String direction = axisMessage.getDirection();). Weird thing is that it works for operation with policy I attached in module.xml and always reproduces this error for any operation with policies on my service.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.