mule

Dataweave Always output JSON number with two decimal places

耗尽温柔 提交于 2020-01-17 06:45:58
问题 I've got the following number coming through via xml in Dataweave. <b:AmountValue>180.90</b:AmountValue> Using Dataweave I am trying to output a corresponding json number with two decimal places (to represent currency). Here is what my Dataweave expression looks like... amount: $.AmountValue as :number as :string {format: ".00"} as :number The output json is losing the trailing zero. i.e. "amount":180.9 How can I change my Dataweave expression to always have two decimal places? Or perhaps I'm

Mule session-variable missing from the message, when reading from JMS Queue inside a Component

两盒软妹~` 提交于 2020-01-17 06:41:37
问题 I have requirement where in I need to read message from a JMS Queue from inside a Component. But during this process the session variables associated with the message are missing. But the session variables are available when the same message is read from JMS:inbound-endpoint instead of from inside a component. Here are my sample flows. Main flow sets a session-variable into MuleMessage and posts it onto a JMS:outbound-endpoint <flow name="main-flow" > <some inbound> ... < Some processing >

Configured jetty server in mule esb

大憨熊 提交于 2020-01-17 06:28:15
问题 I want to Configured embedded jetty server in mule esb. I have tried many thing but unable to get success. Please give me step how to configured. I want to make webinf folder in which I can host servlet file and jsp file. I have seen online book example, but It is not working in my mulestudio. I am getting folder structure error. I have also tried to search but didn't get any working example. 回答1: In mule-config.xml add the fillowing :- <?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http

auto-starting Mule flow

北城以北 提交于 2020-01-17 06:12:28
问题 I'm trying this approach to autostart a Mule flow Starting a mule flow programmatically using groovy and it does not start the flow. Here's a very simple test run in Mule Studio with the 3.4.0 CE <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="CE-3.4.0"

Mule - accessing the exception stack and logging a particular part

旧巷老猫 提交于 2020-01-17 02:53:10
问题 I have a Mule flow that evaluates a payload an depending on the value, may throw an exception using Groovy. My flow looks as follows: <flow name="test-flow" doc:name="test-flow"> <vm:inbound-endpoint path="testexception.in" exchange-pattern="request-response" doc:name="VM"/> <choice doc:name="Choice"> <when expression="#[payload == 'Goodbye']"> <logger message="**************** #[payload] ****************" level="INFO" doc:name="Logger"/> </when> <otherwise> <scripting:component doc:name=

Mule: Maven excluding certain mule jars while creating mule runnable jar

时间秒杀一切 提交于 2020-01-16 20:06:32
问题 Need to create a runnable jar of a mule service using maven-assembly plugin. Its creating a zip file but excluding certain mule jars. When trying to run it from console getting classnotfound exception for mule-core jar. How can i include these jars as well as create a jar rather than zip. Message on console while packaging using maven clean package command from anypoint studio maven plugin is [INFO] Using exclusions definition for Mule ESB Server version 3.6.0 [INFO] Using as WTP server :

Mule: Maven excluding certain mule jars while creating mule runnable jar

孤街醉人 提交于 2020-01-16 20:05:14
问题 Need to create a runnable jar of a mule service using maven-assembly plugin. Its creating a zip file but excluding certain mule jars. When trying to run it from console getting classnotfound exception for mule-core jar. How can i include these jars as well as create a jar rather than zip. Message on console while packaging using maven clean package command from anypoint studio maven plugin is [INFO] Using exclusions definition for Mule ESB Server version 3.6.0 [INFO] Using as WTP server :

Setting SOAP fault in Mule

北慕城南 提交于 2020-01-16 19:25:49
问题 Currently this is how I'm catching exception and setting the payload <catch-exception-strategy name="Catch_Exception_Strategy"> <logger message="#[exception.summaryMessage]" level="ERROR" doc:name="Logger"/> <set-payload value="Error in service operation" doc:name="Set Payload"/> </catch-exception-strategy> But, CXF SOAP component sets the payload of real response object. While I want to send an error object in a SOAP Fault instead. How can I do that? Thanks in advance. Update Default

Setting SOAP fault in Mule

十年热恋 提交于 2020-01-16 19:25:14
问题 Currently this is how I'm catching exception and setting the payload <catch-exception-strategy name="Catch_Exception_Strategy"> <logger message="#[exception.summaryMessage]" level="ERROR" doc:name="Logger"/> <set-payload value="Error in service operation" doc:name="Set Payload"/> </catch-exception-strategy> But, CXF SOAP component sets the payload of real response object. While I want to send an error object in a SOAP Fault instead. How can I do that? Thanks in advance. Update Default

Mule - unable to route message based on http.status

人走茶凉 提交于 2020-01-16 18:44:10
问题 I'm trying to create a choice router in my Mule application that will do something based on the response code received from an HTTP Outbound Endpoint. My config is as below - I followed the answers provided in this previous question: <set-variable variableName="http.disable.status.code.exception.check" value="true" doc:name="Variable"/> <http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="hello" contentType="text/xml" method="POST" doc:name="HTTP"/>