mule-studio

Mule: How can project configs cause such misleading SAX errors?

爷,独闯天下 提交于 2020-01-03 05:29:20
问题 I've fixed the problem below, but since I've hit this more than once and wasted time on it, I'd like to better understand the chain of events that cause the misleading error. Scenario: Mule throws a giant SAX exception parsing your XML, indicating unexpected content But the XML is fine, it works OK in another project If you add dependencies etc, eventually this project will accept the XML as well The *flavor" of the error is: (full stack below) org.xml.sax.SAXParseException: cvc-complex-type

Mule-ESB: Mule filter based on HTTP Status

流过昼夜 提交于 2020-01-03 04:26:05
问题 How do I use a filter other than a choice filter to call a subflow based on the http status? <flow> <http:outbound-endpoint exhange-pattern="request-response> if http.status!=201 <flow-ref="subflow-to-invoke"> </flow> 回答1: Check this post Mule-esb: Process Jersey Response based on Status code using Choice Router? Here is snippet from the above link, that answers your question. <flow> <http:outbound-endpoint address="${host}" exchange-pattern="request-response"/> <choice> <when expression="#

Consuming .NET ASMX Web Service from mule esb throws CXF Exception: 401 Unauthorized

陌路散爱 提交于 2020-01-02 08:18:51
问题 I have a .NET ASMX web service in a different server and I have installed the mule standalone CE 3.4 in another server. I have a very simple flow which needs to call this .NET web service and pass two string parameters. <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring=

How to Check null condition in Data weaver : Mule

喜你入骨 提交于 2020-01-01 12:09:30
问题 Here is my xml, in that first I need to check 'RecordsEntries' should not be 'null', then RecordEntry shouldn't be null followed by mapping code <?xml version="1.0" encoding="UTF-8"?> <Records> <storenumber /> <calculated>false</calculated> <subTotal>12</subTotal> <RecordsEntries> <RecordEntry> <deliverycharge>30.0</deliverycharge> <entryNumber>8</entryNumber> <Value>true</Value> </RecordEntry> <RecordEntry> <deliverycharge>20.0</deliverycharge> <entryNumber>7</entryNumber> <Value>false<

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 merge two Json based on key value in Mule

落爺英雄遲暮 提交于 2019-12-25 08:18:02
问题 Hi I have a 1 json as below "first": [ { "projectid": "15", "approval_status": "A" }, { "projectid": "24", "approval_status": "A" } ]} The next payload is stores in a flowVariable { "Second": [ { "projectid": "15", "total": "123", "updated": "yes" }, { "projectid": "24", "total": "123", "updated": "yes" }]} Am using datawevae to merge these payload but its not giving expected result my expected value is { "Result": [ { "projectid": "15", "total": "123", "approval_status": "A" }, { "projectid"

Getting functional unit tests to wait until devkit connector is connected

廉价感情. 提交于 2019-12-25 07:31:13
问题 I often have a requirement to wait some async process is finished in my devKit connector (which then causes isConnected to return true ) @ValidateConnection public boolean isConnected() { return isConnected; } How can I get my functional unit test to wait until this is completed. I would have thought the unit test would have waited until all the connectors in my flow were "connected". Atm I am using a sleep in the unit test to get round this in my FunctionalTestCase Thread.sleep(5000);

How can I connect Mule Studio to Jira to create a jira issue?

有些话、适合烂在心里 提交于 2019-12-25 06:16:22
问题 I am trying to connect Mule Studio to jira to create an issue,in local jira. When I try to run my application I am getting Configuration Exception. <jira:config name="MyJira" connectionAddress="http://127.0.0.1:8080" connectionUser="admin" connectionPassword="admin" doc:name="Jira"/> <flow name="jira-create-issueFlow1" doc:name="jira-create-issueFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/> <jira:create-issue type="Bug"