You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Resnicow, Bill" <bi...@lmco.com> on 2016/12/22 15:45:51 UTC

Axis 1.7.4 with Rampart 1.7 Outflow does not complete

Can anyone tell me if this looks like and Axis or Rampart bug?

The Axis OutFlow Phase does not complete correctly.  We are using Axis2 1.7.4 with Rampart 1.7.0.  We encountered a situation where the OutFlow phase does not appear to complete properly, it aborts and goes through the 'flowComplete()' sequence without executing the remaining phases.

This is triggered from a SOAP request with a username/password security header.  The web service request is properly handled by the web service (Axis .aar) and a response is issued.  The response is formed properly but as it goes through the Axis OutFlow something goes wrong.

Our Axis2.xml defines a 'PostSecurity' phase handler after 'Security' (see below).

Phase 'Security' is invoked, which invokes the Rampart handler,  but there is no 'post-condition' message for 'Security' and the 'PostSecurity' phase is not invoked.  This results in a bad message header and an exception being thrown for a bad signature because our code did not get executed.

My question is; does this indicate an unhandled exception possibly occurring in the Axis phase handling code? or is there some normal condition (error) that can cause this?

The Axis2 logs show this sequence of events:

<Soap Response message being processed through 'OutFlow'>
Checking pre-condition for Phase "MessageOut"
Invoking phase "MessageOut"
Invoking Handler 'AddressingOutHandler' in Phase 'MessageOut'
Addressing is disabled. Not adding WS-Addressing headers.
Checking post-conditions for phase "MessageOut"
Checking pre-condition for Phase "SecurityPolicyDetermination"
Invoking phase "SecurityPolicyDetermination"
Invoking Handler 'AuthenticationHandler' in Phase 'SecurityPolicyDetermination'
SoapAction is (http://my/oe/MediationService/MediationPortType/QueryAllSchemaRequestResponse
Checking post-conditions for phase "SecurityPolicyDetermination"
Checking pre-condition for Phase "Security"
Invoking phase "Security"         <-----------Security Invoked
Invoking Handler 'Apache Rampart outflow handler' in Phase 'Security'
loading class : my.oe.integrationframework.rbac.OERBACRampartConfigCallbackHandlerImpl
getAction (http://my/oe/MediationService/MediationPortType/QueryAllSchemaRequestResponse) from org.apache.axis2.client.Options@41f95b46
WASAction is (http://my/oe/MediationService/MediationPortType/QueryAllSchemaRequestResponse)
AsymmetricBindingBuilder build invoked
Adding timestamp
Timestamp id: TS-E9AC12387C1925987A148233694978013
Adding timestamp: DONE
Token inclusion: 5
User : cn=tcn-01151-soem,ou=my,o=my,c=us
loading class : my.oe.integrationframework.rbac.OERBACServiceCallback
Loading Signature crypto
Using provider: org.apache.ws.security.components.crypto.Merlin
Invoking flowComplete() in Phase "SecurityPolicyDetermination"   <-------- *** here the flow unwinds without having completed
Invoking flowComplete() for Handler 'AuthenticationHandler' in Phase 'SecurityPolicyDetermination'
Invoking flowComplete() in Phase "MessageOut"
...etc
--------------------
The Axis2.xml configuration includes the following OutFLow phases:
    <phaseOrder type="OutFlow">
        <!--      user can add his own phases to this area  -->
        <phase name="soapmonitorPhase"/>
        <phase name="OperationOutPhase"/>
        <!--system predefined phase-->
        <!--these phase will run irrespective of the service-->
        <phase name="RMPhase"/>
        <phase name="PolicyDetermination"/>
        <phase name="MessageOut"/>
        <phase name="SecurityPolicyDetermination">
            <handler name="AuthenticationHandler"
                     class="my.oe.integrationframework.wscsh.AuthenticationHandler">
            </handler>
        </phase>
        <phase name="Security"/>
        <phase name="PostSecurity">  <------------not executed
            <handler name="OERBACPostSecurityHandler"
                     class="my.oe.integrationframework.rbac.OERBACPostSecurityHandler">
            </handler>
        </phase>
        <phase name="DSCP">
            <handler name="WSOutHandler" class="my.oe.trafficmarking.WSOutHandler">
            </handler>
        </phase>
    </phaseOrder>


Thanks
Bill R