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]
Sent: Thursday, August 24, 2006 7:15 AM
To: [email protected]
Subject: Re: Fault message

 

Hi Sanjesh

I have fixed the code to allow SOAP fault responses to flow back through Synapse rules. You should get the latest code from the SVN for this. My fix is to remove the code where an AxisFault was thrown in DynamicAxisOperation. Let me know how it goes.

asankha

Sanjesh Pathak wrote:

Hi Asankha,

 

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]]
Sent: Monday, August 21, 2006 4:51 AM
To: [email protected]
Subject: Re: Fault message

 

Sanjesh

Have you tried the error handling capabilities we introduced lately to handle this case? Unfortunately its still documented only in the email trails and you can find it here - http://mail-archives.apache.org/mod_mbox/ws-synapse-dev/200607.mbox/[EMAIL PROTECTED]

I will look into this issue as soon as I complete the RM mediator issue I am working on right now

asankha


Sanjesh Pathak wrote:

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]

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to