How to pass Mule expression to spring property -
i'm looking way assign exception message spring property @ runtime in mule flow (mule 3.3.0)
this how code-snippet looks like:
<catch-exception-strategy> <logger message="----->exception #[exception.causeexception]" level="info" /> <custom-transformer class="com.company.transformer.velocitymessagetransformer"> <spring:property name="velocityengine" ref="velocityengine" /> <spring:property name="templatename" value="soap11fault.vm" /> <spring:property name="beanclass"> <spring:bean parent="abstractsoap11clientfault"> <spring:property name="faultstring" value="invalid request" /> <spring:property name="detail" value="${exception.causeexception}" /> </spring:bean> </spring:property> </custom-transformer> </catch-exception-strategy>
i want assign exception cause detail
property here:
<spring:property name="detail" value="${exception.causeexception}" />
but spring looking property in properties file. tried doing also
<spring:property name="detail" value="${#[exception.causeexception]}" /> doesn't work.
is there way pass mule look @ run-time spring property?
properties set during application initialization: value want pass evaluated @ runtime, can't work.
what need create com.company.transformer.velocitymessagetransformer
extend org.mule.transformer.abstractmessagetransformer
. have override transformmessage(mulemessage message, string outputencoding)
, give access current message , associated exception payload. exception payload #[exception]
expression.
spring mule
No comments:
Post a Comment