无法在mule中转换http响应



我有一个mule工作流,它调用oozies的http服务来启动作业,但我需要将oozie给出的作业id存储在数据库中。我实现了这一点,但一旦我转换了Oozie的响应,就会出现异常。

无法应用转换。有效负载正在释放InputStream。

<mule xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:test="http://www.mulesoft.org/schema/mule/test"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/quartz 
http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd
http://www.mulesoft.org/schema/mule/test http://www.mulesoft.org/schema/mule/test/3.6/mule-test.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.6/mule.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.6/mule-vm.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.6/mule-http.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd"
    version="EE-3.5.2">
<object-to-string-transformer name="httptoobj" />
            <http:http-response-to-object-transformer name="httptostring" />
<flow name="polling" doc:name="polling">
    <quartz:inbound-endpoint repeatInterval="3000"
        startDelay="3000" jobName="couchbasePoller" doc:name="Quartz">
        <quartz:event-generator-job />
    </quartz:inbound-endpoint>
    <component doc:name="Java">
        <singleton-object
            class="com.xyz.alertcampaign.appworkflow.CouchbasePoller" />
    </component>
    <vm:outbound-endpoint exchange-pattern="request-response"
        path="oozieQueue" doc:name="Trigger workflow" />
</flow>
<flow name="oozie-workflow-manager" doc:name="oozie-workflow-manager">
    <vm:inbound-endpoint exchange-pattern="request-response"
        path="oozieQueue" doc:name="VM" />
    <http:outbound-endpoint exchange-pattern="request-response"  address="http://localhost:8080" responseTransformer-refs="httptostring"    doc:name="HTTP" />  
        <object-to-string-transformer />
    <component doc:name="Java">
        <singleton-object
            class="com.xyz.alertcampaign.appworkflow.JobUpdater" />
    </component>
</flow>

您将输入流应用于字符串转换器两次:

responseTransformer-refs="httptostring"

这里是

<object-to-string-transformer />

此外,我猜您有一个名为httptostring的错误转换器。将其移除或仅移除responseTransformer-refs

最新更新