mule

Groovy transformer was like ignored

邮差的信 提交于 2019-12-14 04:08:17
问题 Good day, collegues. In my project i met some problem. In one of flows i have made two http_requests and then have parsed those responses with groovy transformer. First groovy script: Second groovy script: The first groovy script works fine. But the second script don't do anything. Like it was ignored. Both http_responses's structures are similar. Why the second groovy script can have been ignored? 回答1: Omg!( I am very sorry, this was my very stupid mistake. The reason is - 'break' must be in

FunctionalTestCase Mule 3.6.0

三世轮回 提交于 2019-12-14 03:59:52
问题 I'm migrating my FunctionalTestCase from Mule 3.5.0 to Mule 3.6.0, when I try to post a json like: Map properties = new HashMap(); properties.put("Content-Type", "application/json"); properties.put("http.method", "POST"); muleMessage.addProperties(properties, PropertyScope.OUTBOUND); AbstractMuleContextTestCase.muleContext.getClient().send(url, muleMessage); I always get NullPayload in the flow that I'm testing, how it's the proper way to do a post in the new version of Mule 3.6.0 回答1:

Mule 3.7. Add custom SOAP header to web-service-consumer

我怕爱的太早我们不能终老 提交于 2019-12-14 03:58:15
问题 I am trying to customize the soap header in Mule 3.7. By default using the web-service-consumer I get the following: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soap:mustUnderstand="1">

Mule no object DCH for MIME type application/pdf

那年仲夏 提交于 2019-12-14 03:58:07
问题 I am trying to Set an Attachment as below: <set-attachment attachmentName="abc" value="#[contents]" contentType="#[fileType]" doc:name="Attachment"/> The contentType happens to be application/pdf. I get the following error for .pdf and .doc files. text/plain files go through ok. no object DCH for MIME type application/pdf (javax.activation.UnsupportedDataTypeException) javax.activation.ObjectDataContentHandler:891 (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/activation

Mule FunctionalTestCase - does it load mule server for every test?

隐身守侯 提交于 2019-12-14 03:57:07
问题 I am wondering, If I have say 10 tests, each extending FunctionalTestCase in Mule - does it actually load a Mule server in the life cycle of the test and tears it down for every test it runs? That seems to be an overhead to me - however lightweight Mule may be. FYI - I all my Tests extend an AbstractMuleTest which in turn extends FunctionalTestCase and implements the getConfigResoures() method. 回答1: Yes it does and for a reason: to guarantee that each test is isolated from the others thus

mule 3.3 auto reload properties

我是研究僧i 提交于 2019-12-14 03:43:05
问题 we are developing an application running on mule-enterprise-3.3.2. For the configuration and tweaking purposes we have many parameters placed in .properties files managed by the spring context (Spring 3.1) using this line: <context:property-placeholder location="classpath:my-config.properties" /> How can we auto reload the properties on changes without doing a server restart? Any suggestions? (Note: I'm not sure, if mule can handle changing of parameter at runtime in general.) 回答1: Properties

How to pass parameters and load the wsdl using Web Service Consumer in Mule

[亡魂溺海] 提交于 2019-12-14 03:23:40
问题 Hi I am working with Mule Studio and i just want to know how can i pass the parameters and call the particular Operation from SOAP using the Web Service Consumer component. Payload i am setting as #[{'Orlando','United States'}] for the operation GetWeather The sample SOAP service i am using is LINK 回答1: Here you have a video demonstration on how to do it. Here the manual Page, and here an example. If you don't want to use DataMapper, I would recommend to use a CXF client or to write a

xml to List conversion in mule esb using data weave component

夙愿已清 提交于 2019-12-14 03:17:43
问题 I have the following xml as my input InputXML: <Orders> <Order> <sample id="1"></sample> <sample id="2"></sample> . . . . </Order> <Order> <sample id="1"></sample> <sample id="2"></sample> . . . . </Order> <Order> <sample id="1"></sample> <sample id="2"></sample> . . . . </Order> . . . . </Orders> I need to send this xml to the batch component in my flow. My batch should accept each record in the following manner Record1:1st Order Record2:2nd Order Record3:3rd Order . . . . Now please let me

splitting an xml message and aggregating based on some condition in mule esb

安稳与你 提交于 2019-12-14 03:12:39
问题 My inputXML: <Orders> <Order><OrderId>1</OrderId><Total>10</Total></Order> <Order><OrderId>2</OrderId><Total>20</Total></Order> <Order><OrderId>3</OrderId><Total>30</Total></Order> <Order><OrderId>4</OrderId><Total>40</Total></Order> <Order><OrderId>5</OrderId><Total>50</Total></Order> <Order><OrderId>5</OrderId><Total>60</Total></Order> <Order><OrderId>5</OrderId><Total>70</Total></Order> <Order><OrderId>5</OrderId><Total>80</Total></Order> <Order><OrderId>5</OrderId><Total>90</Total></Order

Access Mule Message from arbitrary place in a thread

♀尐吖头ヾ 提交于 2019-12-14 02:25:17
问题 With Mule ESB, from an arbitrary class, is it possible to get a handle of the current mule message for that thread? For example, if I create custom log4j appender, can it get access to the mule message and pull data from it? 回答1: Yes, by using RequestContext.getEvent().getMessage() (javadoc). And yes, it is deprecated, with this warning: If access to MuleEvent or MuleMessage is required, then implement a MessageProcessor or Callable instead But this is not always possible. So using this