JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-4538

Response Transformer Ignored

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: To be reviewed To be reviewed
  • Resolution: Won't Fix or Usage Issue
  • Affects Version/s: 2.2.1
  • Fix Version/s: None
  • Component/s: Transport: HTTP(S) / Jetty
  • Labels:
    None
  • Environment:
    • Version: 2.2.1 Build: 14422
    • JDK: 1.5.0_17 (mixed mode)
    • OS: Windows Vista - Service Pack 1 (6.0, x86)
  • User impact:
    High
  • Configuration:
    Hide

    <?xml version="1.0" encoding="UTF-8"?>
    <mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.2"
    xmlns:quartz="http://www.mulesource.org/schema/mule/quartz/2.2"
    xmlns:spring="http://www.springframework.org/schema/beans"
    xmlns:xm="http://www.mulesource.org/schema/mule/xml/2.2"
    xmlns:http="http://www.mulesource.org/schema/mule/http/2.2"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
    http://www.mulesource.org/schema/mule/http/2.2 http://www.mulesource.org/schema/mule/http/2.2/mule-http.xsd
    http://www.mulesource.org/schema/mule/stdio/2.2 http://www.mulesource.org/schema/mule/stdio/2.2/mule-stdio.xsd
    http://www.mulesource.org/schema/mule/quartz/2.2 http://www.mulesource.org/schema/mule/quartz/2.2/mule-quartz.xsd
    http://www.mulesource.org/schema/mule/xml/2.2 http://www.mulesource.org/schema/mule/xml/2.2/mule-xml.xsd">

    <spring:bean id="xmlMessage" class="java.lang.String">
    <spring:constructor-arg>
    <spring:value><![CDATA[
    <?xml version="1.0" encoding="utf-8"?>
    <someXMLMessage/>
    ]]>
    </spring:value>
    </spring:constructor-arg>
    </spring:bean>

    <!-- A service needs to be running at this address -->
    <http:endpoint name="anEndpoint" address="http://localhost:8080/a" synchronous="true">
    <response-transformers>
    <http:http-response-to-string-transformer/>
    <custom-transformer class="ExceptionThrower"/>
    </response-transformers>
    </http:endpoint>

    <stdio:endpoint name="consoleOut" system="OUT">
    <transformers>
    <object-to-string-transformer/>
    </transformers>
    </stdio:endpoint>

    <!-- Runs this test once at startup of the server -->
    <quartz:endpoint name="quartzTest" jobName="quartzTest" repeatInterval="0" repeatCount="0">
    <property key="payload" value-ref="xmlMessage" />
    <quartz:event-generator-job />
    </quartz:endpoint>

    <model name="tester">
    <service name="testService">
    <inbound>
    <inbound-endpoint ref="quartzTest"/>
    </inbound>
    <outbound>
    <chaining-router>
    <outbound-endpoint ref="anEndpoint"/>
    <outbound-endpoint ref="consoleOut"/>
    </chaining-router>
    </outbound>
    </service>
    </model>
    </mule>

    Show
    <?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesource.org/schema/mule/core/2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.2" xmlns:quartz="http://www.mulesource.org/schema/mule/quartz/2.2" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xm="http://www.mulesource.org/schema/mule/xml/2.2" xmlns:http="http://www.mulesource.org/schema/mule/http/2.2" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd http://www.mulesource.org/schema/mule/http/2.2 http://www.mulesource.org/schema/mule/http/2.2/mule-http.xsd http://www.mulesource.org/schema/mule/stdio/2.2 http://www.mulesource.org/schema/mule/stdio/2.2/mule-stdio.xsd http://www.mulesource.org/schema/mule/quartz/2.2 http://www.mulesource.org/schema/mule/quartz/2.2/mule-quartz.xsd http://www.mulesource.org/schema/mule/xml/2.2 http://www.mulesource.org/schema/mule/xml/2.2/mule-xml.xsd"> <spring:bean id="xmlMessage" class="java.lang.String"> <spring:constructor-arg> <spring:value><![CDATA[ <?xml version="1.0" encoding="utf-8"?> <someXMLMessage/> ]]> </spring:value> </spring:constructor-arg> </spring:bean> <!-- A service needs to be running at this address --> <http:endpoint name="anEndpoint" address="http://localhost:8080/a" synchronous="true"> <response-transformers> <http:http-response-to-string-transformer/> <custom-transformer class="ExceptionThrower"/> </response-transformers> </http:endpoint> <stdio:endpoint name="consoleOut" system="OUT"> <transformers> <object-to-string-transformer/> </transformers> </stdio:endpoint> <!-- Runs this test once at startup of the server --> <quartz:endpoint name="quartzTest" jobName="quartzTest" repeatInterval="0" repeatCount="0"> <property key="payload" value-ref="xmlMessage" /> <quartz:event-generator-job /> </quartz:endpoint> <model name="tester"> <service name="testService"> <inbound> <inbound-endpoint ref="quartzTest"/> </inbound> <outbound> <chaining-router> <outbound-endpoint ref="anEndpoint"/> <outbound-endpoint ref="consoleOut"/> </chaining-router> </outbound> </service> </model> </mule>
  • Similar Issues:
    None

Description

In the specified configuration, the response transformers on the http:outbound-endpoint are not applied. If I move the transformer to the consoleOut transformers, I get the 'desired' result (the exception is thrown), but outside this test I would like to work with a response transformer (which of course does not throw exceptions).

The Java Code for the transformer:

import org.mule.api.transformer.TransformerException;
import org.mule.transformer.AbstractTransformer;

public class ExceptionThrower extends AbstractTransformer {

@Override
protected Object doTransform(Object src, String encoding)
throws TransformerException { throw new RuntimeException("got here"); }

}

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Java Source File
    ExceptionThrower.java
    06/Oct/09 04:05 AM
    0.3 kB
    Victor De Graaff
  2. XML File
    response-transformer-bug-config.xml
    06/Oct/09 04:05 AM
    3 kB
    Victor De Graaff
  3. Java Source File
    Servlet.java
    06/Oct/09 04:14 AM
    0.5 kB
    Victor De Graaff
  4. XML File
    web.xml
    06/Oct/09 04:14 AM
    0.6 kB
    Victor De Graaff

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds

People

  • Assignee:
    Andrew Perepelytsya
    Reporter:
    Victor De Graaff
Vote (0)
Watch (1)

Dates

  • Created:
    06/Oct/09 04:02 AM
    Updated:
    08/Oct/09 11:43 AM
    Resolved:
    06/Oct/09 08:53 AM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.