1
在
java.net.ConnectException
并将适当的
XSLT
应用于原始有效负载并发送给调用者。
但是在<catch-exception-strategy>
中收到的有效载荷的类型为[email protected]
而非原始的XML
。尝试使用<objexct-to-string-transformer>
但没有帮助。
任何建议如何检索catch
块中的原有效载荷?
的mule-config.xml
一部分是低于:
<flow name="orderRequirementsToVendor">
<jms:inbound-endpoint queue="order.vendor" />
<set-property propertyName="SOAPAction" value="http://vendor.com/services/InterfacePoint/Call" />
<cxf:proxy-client payload="body" enableMuleSoapHeaders="false">
<cxf:inInterceptors>
<spring:bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
</cxf:inInterceptors>
<cxf:outInterceptors>
<spring:bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
</cxf:outInterceptors>
</cxf:proxy-client>
<outbound-endpoint address="${vendor.ws.url}" mimeType="text/xml" connector-ref="https.connector" />
<byte-array-to-string-transformer />
<choice-exception-strategy>
<catch-exception-strategy when="#[exception.causedBy(java.net.ConnectException)]">
<logger message="#[exception.causeException]" level="ERROR" />
<object-to-string-transformer/>
<transformer ref="vendorConnectExceptionTransformer" />
</catch-exception-strategy>
<catch-exception-strategy>
<logger message="#[exception.causeException]" level="ERROR" />
<transformer ref="generalErrorTransformer" />
</catch-exception-strategy>
</choice-exception-strategy>
</flow>
是的,这是一个好主意。但为什么有效载荷会丢失。我读到Mule(3.3以上)在抛出异常时保留了原始有效负载,并且没有用异常有效负载替换它 – 2013-04-23 17:18:50
并且情况如此:您看到的负载不是异常负载(位于名为“exception”的属性中) ),但是有效负载是在发生故障时已准备好由“出站端点”发送的。 – 2013-04-23 17:20:14
我明白了,是的,事实就是如此。但是没有办法从准备发送的有效载荷中提取xml – 2013-04-23 17:24:37