|
Hi Asankha, Thanks. I will download the code from SVN
and will play with it after a couple of days. Sanjesh From: Asankha C. Perera [mailto:[EMAIL PROTECTED] Hi Sanjesh I did a little bit of hack and it is
working ok. Here is what I did. In Axis2FlexibleMEPClient:send() where it calls
mepClient.execute() I am doing a try catch to catch the fault:
try {
mepClient.execute(true);
} catch(AxisFault af) {
// This could be a
legitimate fault response from the target service or
//this could be some other fault like transport fault
// Let’s send the received fault message as is back to the client
log.warn("Caught Axis Fault in
Axis2FlecibleClient:mepClient:execute()");
}
MessageContext response = mepClient.getMessageContext(
WSDLConstants.MESSAGE_LABEL_IN_VALUE); Here I am just catching a fault and doing
nothing. There is no way for me to find out if the fault is from the service or
other fault like unreachable URL. For now, I am sending the response message
context with the fault message back to the calling code (Axis2Sender:sendOn()).
In Axis2Sender, after we create synapse message context from this response
context, I am setting the faultResponse value to true so I can check for this
in the mediator and retrieve the fault message.
if(axisOutMsgContext.getEnvelope() != null &&
axisOutMsgContext.getEnvelope().getBody() != null &&
axisOutMsgContext.getEnvelope().getBody().hasFault()) {
synapseOutMessageContext.setFaultResponse(true);
} This hack is working good for me now. Will
wait for your feedback/changes. Sanjesh From: Asankha C. Perera [mailto:[EMAIL PROTECTED]]
Sanjesh Hi Asankha, Here’s the scenario. I am trying to capture the
fault message received from the target service thorough a mediator (for example
<log/> mediator). What I notice is that if target service throws a fault,
then the rules are not applied to the outgoing message. So the mediators in the
rules are not invoked. This is the error I get: ERROR Axis2Sender -
Unexpected error during Sending message onwards I have looked at Axis2Sender:sendOn() method and it
seems to me the it is catching the exception and not handling the soap fault
message? I am not sure I am right, but this is what seems to be happening. Sanjesh ---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
|
- Fault message Sanjesh Pathak
- Re: Fault message Asankha C. Perera
- RE: Fault message Sanjesh Pathak
- Re: Fault message Asankha C. Perera
- RE: Fault message Sanjesh Pathak
