You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <tu...@ws.apache.org> on 2007/09/20 18:08:31 UTC

[jira] Created: (TUSCANY-1778) Creation of new msg structure to handle faults from web service calls

Creation of new msg structure to handle faults from web service calls
---------------------------------------------------------------------

                 Key: TUSCANY-1778
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1778
             Project: Tuscany
          Issue Type: Improvement
          Components: Java SCA Axis Binding Extension
    Affects Versions: Java-SCA-1.0
            Reporter: Simon Laws
            Priority: Minor
             Fix For: Java-SCA-Next


If Axis2 returns a fault it sets the fault into the contents of the original message. In the Axis2BindingInvoker the invoke code looks like this...

    public Message invoke(Message msg) {
        try {
            Object resp = invokeTarget(msg);
            msg.setBody(resp);
        } catch (AxisFault e) {
            if (e.getDetail() != null) {
                FaultException f = new FaultException(e.getMessage(), e.getDetail());
                f.setLogical(e.getDetail().getQName());
                msg.setFaultBody(f);
            } else {
                msg.setFaultBody(e);
            }
        } catch (Throwable e) {
            msg.setFaultBody (e);
        }

        return msg;
    }

Why does it set values in the input message as well as returning it as a return value? I can see the point in the case of a real return value as you avoid the resource of creating a extra message object. In the fault case though this limits the ability of the infrastructure to resend the message if it wants to as it gets overwritten.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Assigned: (TUSCANY-1778) Creation of new msg structure to handle faults from web service calls

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng reassigned TUSCANY-1778:
-------------------------------------

    Assignee: Raymond Feng

> Creation of new msg structure to handle faults from web service calls
> ---------------------------------------------------------------------
>
>                 Key: TUSCANY-1778
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1778
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: Java SCA Axis Binding Extension
>    Affects Versions: Java-SCA-1.0
>            Reporter: Simon Laws
>            Assignee: Raymond Feng
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> If Axis2 returns a fault it sets the fault into the contents of the original message. In the Axis2BindingInvoker the invoke code looks like this...
>     public Message invoke(Message msg) {
>         try {
>             Object resp = invokeTarget(msg);
>             msg.setBody(resp);
>         } catch (AxisFault e) {
>             if (e.getDetail() != null) {
>                 FaultException f = new FaultException(e.getMessage(), e.getDetail());
>                 f.setLogical(e.getDetail().getQName());
>                 msg.setFaultBody(f);
>             } else {
>                 msg.setFaultBody(e);
>             }
>         } catch (Throwable e) {
>             msg.setFaultBody (e);
>         }
>         return msg;
>     }
> Why does it set values in the input message as well as returning it as a return value? I can see the point in the case of a real return value as you avoid the resource of creating a extra message object. In the fault case though this limits the ability of the infrastructure to resend the message if it wants to as it gets overwritten.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org