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 Kostis Anagnostopoulos <an...@gmail.com> on 2010/05/03 18:44:56 UTC
A Fault-Handler to retransmit message still return the 1st in-msg
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: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
Re: A Fault-Handler to retransmit message still return the 1st in-msg
Posted by Kostis Anagnostopoulos <an...@gmail.com>.
Please, any help on re-transmitting a soap-message??
On Mon, May 3, 2010 at 7:44 PM, Kostis Anagnostopoulos
<an...@gmail.com> wrote:
> 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: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org