mule

How to implement a Mule Message Observer?

你说的曾经没有我的故事 提交于 2019-12-23 06:04:06
问题 Im trying to implement a simple message observer on Mule that don't need to mutate the message. This link on the documentation says that the easiest way is to extend the AbstractMessageObserver. But as i can see on this link the class has been removed in the earlier versions of Mule. So, the best way to do this now is implementing the MessageProcessor interface and simply return the MuleEvent param in the process method? 回答1: If you need to access the whole MuleEvent , either a

How to implement a Mule Message Observer?

↘锁芯ラ 提交于 2019-12-23 06:03:56
问题 Im trying to implement a simple message observer on Mule that don't need to mutate the message. This link on the documentation says that the easiest way is to extend the AbstractMessageObserver. But as i can see on this link the class has been removed in the earlier versions of Mule. So, the best way to do this now is implementing the MessageProcessor interface and simply return the MuleEvent param in the process method? 回答1: If you need to access the whole MuleEvent , either a

Changing the 'Initial State' of a flow's configuration from 'stopped' to 'started'?

半世苍凉 提交于 2019-12-23 06:01:13
问题 How do you change the 'Initial State' of a flow's configuration from 'stopped' to 'started'? I have a flow that I want to turn on only when a certain condition is met at startup. 回答1: There is 2 ways to do in runtime:- 1) Use Groovy component to start a flow :- <scripting:component> <scripting:script engine="groovy"> muleContext.registry.lookupFlowConstruct('targetFlow').start() </scripting:script> </scripting:component> where targetFlow is the name of the flow you need to start or Second way

Mule ESB : Read HTML

回眸只為那壹抹淺笑 提交于 2019-12-23 05:43:10
问题 I have a situation where I have to parse the result of a webpage. In this case, the website does not offer an API to consume to retrieve this data. I have created a flow that calls the website but states: Message: Error sending HTTP request. Message payload is of type: NullPayload Any help would be much appreciated. <http:request-config name="HTTP_Request_Configuration" host="http://www.resellerratings.com/" port="80" doc:name="HTTP Request Configuration" basePath="/"/> <flow name="testFlow">

How to use Mule's XML-to-Object transformer?

戏子无情 提交于 2019-12-23 05:09:15
问题 What are the steps which should be done? What should be present in the driver class? How should I create the POJO with which to map the XML to? How should I configure the transformer? 回答1: you can use a driver class like Xpp3driver eg. the flow would look something like <flow name="mulexmlvalFlow2" doc:name="mulexmlvalFlow2"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" doc:name="HTTP" path="XmlToObj"/> <mulexml:xml-to-object-transformer doc:name=

Mule requester is consuming all the messages from JMS queue

女生的网名这么多〃 提交于 2019-12-23 04:54:32
问题 I am facing a minor issue using Mule requester .. I have the following Mule flow :- <!-- This flow sends payload to ActiveMQ --> <flow name="SendPayloadToActiveMQ" doc:name="mulerequesterdemoFlow1"> <http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:8088/requester" doc:name="HTTP"/> <set-payload value="My Payload" doc:name="Set Payload"/> <jms:outbound-endpoint doc:name="JMS" queue="input" connector-ref="Active_MQ"/> </flow> <!-- This flow consumes 3 payload

IP-addresses Log file by all requests in MULE CE 3.3.0?

久未见 提交于 2019-12-23 04:42:18
问题 in MULE CE 3.3.0 I want to implement this process: 1- Post- office has a service for giving postal-code to clients. So post-office creates a WSDL-file for its service. 2- Here, our company is a connector between post-office and clients. Our company using mule and create another WSDL file based on post-office’s WSDL file and published out the WSDL for client usage. 3- Company-A and Company-B, get the WSDL-file URL and for instance in My-eclipse IDE or any other IDEs create a portlet and deploy

Parse JSON in Mule 3.2 Flow

妖精的绣舞 提交于 2019-12-23 04:37:33
问题 If I have the following JSON [ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 }, { "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", "isbn": "0-553-21311-3", "price": 8.99 }, { "category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of the Rings", "isbn": "0-395-19395-8", "price": 22.99 } ] I can get the

How to pass multipart/related request in Mule?

[亡魂溺海] 提交于 2019-12-23 04:35:20
问题 I want to request an API using Mule.It is using Multipart/related Content-Type to upload a file.I Don't know how to pass the boundary information in mule.How to set the given input in a payload to send to HTTP.I tried to put it in a transform Message component but it showing errors. 回答1: You can use the outbound attachments collection to create the form parts as necessary, and don't need to specify the boundary. For example, consider the following Mule configuration: <scripting:component doc

Mule - How to access flow name inside Java Component?

半城伤御伤魂 提交于 2019-12-23 04:27:03
问题 We do have sub flows shared between many flows. I would like find within my subflow which Flow is the call one... MEL:- #[flow.name] is working only in Logger. I couldn't even pass this value into Session/Anyother property (by set property connector), so I can access using message.getProperty method. Thanks in advance. 回答1: Try making your component org.mule.api.construct.FlowConstructAware. You should then be able to get its name. HTH 回答2: I my case I created other flow for logging which has