As I saw here the problem is that there is no AxisMessage for Faults. Axis Operations has only in/out messages. So faultMessageContext does not have a axisMessage.
When creating the AxisService with the WSDL11ToAxisServiceBuilder it adds the fault messages to the AxisOperation as a list. For such services we can pick the fault messages from there. But for the services created using Service.xml there is no way to give this fault messages. For such operations only possibility is to use the axis out message for that operation. So I locally set the out message and tested. It could encrypt the out fault message but there was a problem at the client side due to this problem. http://issues.apache.org/jira/browse/AXIS2-3561 this could be solved by changing the security and addressing phases. thanks, Amila. On Thu, May 8, 2008 at 10:04 AM, Nandana Mihindukulasooriya < [EMAIL PROTECTED]> wrote: > Hi, > When we get the effective policy from a message, it tries to calculate > the effective policy as given below. > > AxisBindingMessage bindingMessage = > (AxisBindingMessage) > getProperty(Constants.AXIS_BINDING_MESSAGE); > > if (bindingMessage != null) { > return bindingMessage.getEffectivePolicy(); > } else { > if (axisMessage != null) { > return axisMessage.getEffectivePolicy(); > } else { > return null; > } > } > > But in Faults, axisMessage is not set in the MessageContext. Because of > this, we didn't get the correct policies from Message Context. This causes > problems in Rampart when trying to secure fault messages. Is there a way to > retrieve the effective policy from the MessageContext when we are > sending/receiving faults ? > > > thanks, > nandana > -- Amila Suriarachchi, WSO2 Inc.
