Hi,
I have modified the behavior of axis2-clients.
In particular, when invoking some WS i setup a pair of handlers that,
in case of some Fault, they will re-submit the original out-soap-message
but with modified soap-headers.
The handlers are:
1. out-flow-page: attaches the custom headers on out-messages,
2. in-fault-page: re-transmits the original out-message.
The setup indeed works, and the message gets retransmitted with the
desired soap-headers,
yet the problem is that the client still receives the original fault,
and not the 2nd correct response.
On the 2nd fault-handler, I used a code along the following lines:
----------------------
public InvocationResponse invoke(final MessageContext imsgc) {
final MessageContext omsgc =
opc.getMessageContext(WSDL2Constants.MESSAGE_LABEL_OUT);
// Reset IN and OUT message handler-chain.
//
imsgc.setCurrentHandlerIndex(0);
imsgc.setCurrentPhaseIndex(0);
omsgc.setCurrentHandlerIndex(0);
omsgc.setCurrentPhaseIndex(0);
AxisEngine.send(omsgc);
imsgc.pause();
return InvocationResponse.SUSPEND;
}
-----------------------------
I even tried to delete the 1st in-msg-context:
opc.getMessageContexts().remove(WSDL2Constants.MESSAGE_LABEL_IN);
It did not work either.
What am i doing wrong?
Additionally, any help regarding the exact placement of thew Hadlers
within the phases
would be more than welcome.
Thank you in Advance,
Kostis Anagnostopoulos
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]