You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Ruwan Linton (JIRA)" <ji...@apache.org> on 2008/03/12 14:44:46 UTC

[jira] Commented: (SYNAPSE-250) Makefault mediator does not handle POX or REST properly

    [ https://issues.apache.org/jira/browse/SYNAPSE-250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577847#action_12577847 ] 

Ruwan Linton commented on SYNAPSE-250:
--------------------------------------

I just checked the behavior of Synapse on faults for POX messages, and found that what we send as the fault is somewhat like following, which is not wrong but contains a SOAPFault without the envelope.

HTTP/1.1 500 Internal Server Error

Content-Type: application/xml; charset=UTF-8

Host: 127.0.0.1

SOAPAction: urn:getQuote

Date: Wed, 12 Mar 2008 13:20:32 GMT

Server: Synapse-HttpComponents-NIO

Transfer-Encoding: chunked



14c

<soapenv:Fault xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Code>
      <soapenv:Value xmlns:sf12="http://www.w3.org/2003/05/soap-envelope">sf12:Receiver</soapenv:Value>
   </soapenv:Code>
   <soapenv:Reason>
      <soapenv:Text>Exception occurred when transforming the request/response</soapenv:Text>
   </soapenv:Reason></soapenv:Fault>
0


I think the better way of handling this when it comes to POX is by sending the error details enclosed inside an unqualified element named exception with a HTTP 500 error.

What would be the fault in REST? should be the same as POX isn't it? 

> Makefault mediator does not handle POX or REST properly
> -------------------------------------------------------
>
>                 Key: SYNAPSE-250
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-250
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.1.1
>         Environment: Ubuntu7.04, JDK1.5.0_14
>            Reporter: Evanthika Amarasiri
>            Assignee: Ruwan Linton
>
> Below are the scenarios which were tried out
> Scenario 1 - Sending a POX request
> ======================
> 1. Created a configuration as follows
>    <sequence name="xslt_transfom_sequence" onError="fault">
>         <in>
>             <xslt key="xslt_for_request"/>
>             <send>
>                 <endpoint>
>                     <address uri="http://[host]:[port]/services/[service_name]"/>
>                 </endpoint>
>             </send>
>         </in>
>         <out>
>             <send/>
>         </out>
>     </sequence>
>     <sequence name="fault">
>         <log/>
>         <makefault version="soap12">
>             <code xmlns:sf12="http://www.w3.org/2003/05/soap-envelope" value="sf12:Receiver"/>
>             <reason value="Exception occurred when transforming the request/response"/>
>         </makefault>
>         <header name="To" action="remove"/>
>         <property name="RESPONSE" value="true"/>
>     </sequence>
> 2. The XSLT file that this configuration is accessing is an invalid XSLT.
> 3. Send a POX request through the client and expect a POX fault but actually it sends a SOAP fault
> Scenario 2 - Sending a REST request
> =======================
> Using the same configuration given above, send a REST request. It sends a SOAP fault and not a fault in REST

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org