mule

How do you insert a newline in message body of mule logger component

偶尔善良 提交于 2020-01-01 08:52:27
问题 Can anyone tell me how to insert a new line in the message of a mule logger component? For example, I have the following in the message for the logger: Payload is: #[payload] Inbound Headers: #[headers:INBOUND:*] Outbound Headers: #[headers:OUTBOUND:*] Exceptions: #[exception] I'd like to insert a new line after each of the above. I've tried just adding \n to the end of each line, but that didn't work. 回答1: Use MEL: <logger message="#['Payload is:'+payload+'\nInbound Headers: '+message

Mule won't allow POLL message processor to read file using file Inbound?

倖福魔咒の 提交于 2019-12-31 05:51:33
问题 I have a small query, POLL message processor not allowing to read Files from 'File Inbound' message processor? I need to read the file for every 5 minutes (Schedule automatically) to proceed with further requirements. Is it possible using POLL? How can be file inbound used in POLL. Any suggestions will be helpful. 回答1: I recommend you execute this operation using the quartz connector. Here's an example: <flow name="repeatIntervalFileFlow" doc:name="repeatIntervalFileFlow"> <quartz:inbound

Mule SMTP - send email with attachment

荒凉一梦 提交于 2019-12-31 04:25:09
问题 I am trying to use Mule 3.3.0 and configure an SMTP Endpoint. The flow can have a File Inbound Endpoint and a SMTP outbound endpoint. Another flow can have a Java class that generates a String content (body of the email) and also creates a CSV file that it will try to push to the SMTP Outbound Endpoint. Unforutnately it doesn't seem Mule SMTP supports attachment out of the box by simple configuration. I read up in the web and seems one way to do it is write your own transformer. TO be able to

How to mock a Java component within Mule Flow using MUnit

試著忘記壹切 提交于 2019-12-31 03:59:11
问题 I am trying to Unit test one of my sub-flows using MUnit, I need to mock out a custom Java component but I am unable to do so. My sub-flow reads as below <sub-flow name="ProcessCSVFlow" tracking:enable-default-events="true"> <transformer ref="enrichWithHeaderAndEndOfFileTransformer" doc:name="headerAndEOFEnricher" /> <set-variable variableName="outputfilename" value="#['Mercury'+server.dateTime.year+server.dateTime.month+server.dateTime.dayOfMonth+server.dateTime.hours +server.dateTime

Until successful failure expression that checks for multiple types of exceptions

巧了我就是萌 提交于 2019-12-30 11:00:13
问题 In Mule, I'm using an until successful around an HTTP endpoint, to catch connection exceptions/timeouts. I'm catching 3 different Java exceptions: java.net.ConnectException java.net.SocketTimeoutException java.net.SocketException I want to put the catching of these 3 into a failureExpression in my until-successful block, however when I try to do something like #[exception-type:XYZ || exception-type:ZYX] #[exception-type:XYZ] || #[exception-type:ZYX] I get an error that it cannot parse these.

Use groovy expression for limited IP in mule

亡梦爱人 提交于 2019-12-30 07:52:12
问题 I created a proxy service with cxf in mule. My version of mule is 3.3.0 CE. Now, I want to put a restriction in my wsdl that created with proxy service. My restriction shouldn't allow to per IP that they see my wsdl. for this, I find Groovy expression and bellow code: <expression-filter expression="#[groovy:'${allowed}'.contains(message.getInboundProperty('MULE_REMOTE_CLIENT_ADDRESS').substring(message.getInboundProperty('MULE_REMOTE_CLIENT_ADDRESS').indexOf('/')+1, message.getInboundProperty

Use groovy expression for limited IP in mule

爷,独闯天下 提交于 2019-12-30 07:49:27
问题 I created a proxy service with cxf in mule. My version of mule is 3.3.0 CE. Now, I want to put a restriction in my wsdl that created with proxy service. My restriction shouldn't allow to per IP that they see my wsdl. for this, I find Groovy expression and bellow code: <expression-filter expression="#[groovy:'${allowed}'.contains(message.getInboundProperty('MULE_REMOTE_CLIENT_ADDRESS').substring(message.getInboundProperty('MULE_REMOTE_CLIENT_ADDRESS').indexOf('/')+1, message.getInboundProperty

replace xml particular node element value with other value in mule

空扰寡人 提交于 2019-12-29 08:15:14
问题 <healthcare> <plans> <plan1> <planid>100</planid> <planname>medical</planname> <desc>medical</desc> <offerprice>500</offerprice> <area>texas</area> </plan1> <plan2> <planid>101</planid> <planname>dental</planname> <desc>dental</desc> <offerprice>1000</offerprice> <area>texas</area> </plan2> </plans> </healthcare> <splitter evaluator="xpath" expression="/healthcare/plans" doc:name="Splitter"/> <transformer ref="domToXml" doc:name="Transformer Reference"/> <logger level="INFO" doc:name="Logger"

Mule database connector url format for DB2 not correct

懵懂的女人 提交于 2019-12-25 16:50:07
问题 I am trying Mule's Database Connector to connect to a DB2 database but I couldn't figure out the correct format for the database URL. I created a Generic Database Configuration global element with Database URL jdbc:db2://db01.dev.myserver.org:50000/mydb;User=test;Password=secret And Driver com.ibm.db2.jcc.DB2Driver When I click Test Connection, it says Test connection failed: Cannot get connection for URL jdbc:db2://db01.dev.myserver.org:50000/mydb;User=test;Password=secret : [ibm][db2][jcc]

if condition for making hide some part of xml(WSDL) file in .xslt in mule

喜夏-厌秋 提交于 2019-12-25 14:45:07
问题 this is my .xslt file : <?xml version='1.0' ?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:s="http://www.w3.org/2001/XMLSchema"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes" /> <xsl:param name="remoteClientAddress" /> <xsl:variable name="remoteClientAddressTrimmed" select="substring-before(substring-after($remoteClientAddress, '/'), ':')" /> <xsl:template