mule

Mule - split a big JSON list into multiple smaller JSON lists

强颜欢笑 提交于 2019-12-13 12:22:07
问题 I have a list of json objects containing about 200 objects. I want to split that list into smaller lists where each list contains max 20 objects each. I would like to POST each sublist to HTTP based endpoint. <flow name="send-to-next-step" doc:name="send-to-vm-flow"> <vm:inbound-endpoint exchange-pattern="one-way" path="send-to-next-step-vm" doc:name="VM" /> <!-- received the JSON List payload with 200 objects--> <!-- TODO do processing here to split the list into sub-lists and call sub-flow

Mule - choice component issue

偶尔善良 提交于 2019-12-13 08:10:48
问题 When I run my flow, I get the following error ` <org.apache.cxf.staxutils.DepthXMLStreamReader> <reader class="org.mule.module.cxf.support.StreamClosingInterceptor$1"> <reader class="com.ctc.wstx.sr.ValidatingStreamReader"> <mXml11>false</mXml11> <mInputBuffer>xmlns:ns2="http://wsdouane/"><return><douanePK><idConteneurId>ctr1</idConteneurId><idCritereId>C11</idCritereId></douanePK><valeurId>oui</valeurId></return></ns2:findResponse></S:Body></S:Envelope>&#x0;&#x0;................. we can see

Aggregate two payloads in Mule ESB

我的未来我决定 提交于 2019-12-13 07:36:10
问题 My mule code is hitting two tables and getting some details. First one is order details, which I am storing in a flow variable i.e order and another database is returning order item details which I am storing in orderitem variable. I want to aggregate both the payload based on one condition. Every orderId has order items (which is stored in flowVars.orderitem) and map these order items to respective orderID. flowVars.order value is as below [{partnerId=e83185e9f33e4234ba9eaa81dba515ad,

How to restrict the ERROR log to be not printed in the logs when we raised exception in the Groovy script mule 3.7.3

南笙酒味 提交于 2019-12-13 07:00:02
问题 How to restrict the ERROR log to be not printed in the logs when we raised exception in the Groovy script mule. The below is the flow and response. <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="7475" doc:name="HTTP Listener Configuration"/> <flow name="ExceptionTestFlow"> <http:listener config-ref="HTTP_Listener_Configuration" path="/test" doc:name="HTTP"/> <logger level="INFO" doc:name="Logger"/> <scripting:component doc:name="Groovy"> <scripting:script engine

Can the Mule ESB DataMapper generate XSLT

时光怂恿深爱的人放手 提交于 2019-12-13 06:59:40
问题 Given a DataMapper node that would map between the following two structures: Strcuture A: <item> <id>123</id> <price>1</price> <quantity>1</quantity> </item> <item> <id>124</id> <price>2</price> <quantity>1</quantity> </item> <item> <id>125</id> <price>3</price> <quantity>1</quantity> </item> Structure B: <total> <totalPrice>6</totalPrice> </total> The Mule ESB DataMapper will generate a CTL2 (Clover) Transformation. Can the Mule ESB DataMapper also generate XSLT 回答1: Do you mean to perform a

Mule Box Connector - Invalid Key Type / Message payload is of type String

旧巷老猫 提交于 2019-12-13 06:28:01
问题 I'm trying to write a Mule flow that uses the Box connector. I'm able to go to http://localhost:8081/auth and authorize successfully. But as soon as I create a file in my box account I get "Failed to Invoke getEvents. Message payload is of type: String." and in the Root Exception Trace I get: "Invalid Key Type" Mule Flow (based on: https://github.com/mulesoft/box-connector/blob/master/demo/src/main/app/box-connector-demo.xml) <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:scripting="http:

MULE ESB - simple jaxws client don't work … - Message payload is of type: ContentLengthInputStream

泪湿孤枕 提交于 2019-12-13 06:14:36
问题 Hi guys first of all I want you to see my wsdl file it's DHL24 api I want learn a bit on this and use simple example here is the link https://dhl24.com.pl/webapi.html I want to use getVersion as you can see we don't need to provide any data to this only in response we have getVersionResult - STRING First of all I created package generated from apache CTX using simple project here is POM: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

Number of Messages in Mule ESB VM inbound endpoint Queue

泄露秘密 提交于 2019-12-13 06:08:18
问题 How to get the number of messages in Mule ESB vm inbound endpoint Queue from the code? Here is the configuration: <vm:connector name="queue.vm.connector"> <vm:queue-profile maxOutstandingMessages="${oms.process.flow.max.queue.size}"/> </vm:connector> ... <flow name="Flow1"... <vm:inbound-endpoint exchange-pattern="one-way" path="inbound_parcel.create.queue" responseTimeout="10000" mimeType="text/plain" connector-ref="queue.vm.connector" doc:name="Inbound Parcel Create Queue"/> Thank you. 回答1:

Mule 3.4.2 XSLT Transformer throws Cannot write more than one result document to the same URI, or write to a URI that has been read

夙愿已清 提交于 2019-12-13 05:43:29
问题 I have XML coming to a mule flow. I need to break this xml into 3 different xml and write to 3 files. This is how I call XSLT Transformer in mule flow. <xm:xslt-transformer xsl-file="xsl/xml-to-file.xsl"> <xm:context-property key="A_loc" value="${location.a}" /> <xm:context-property key="B_loc" value="${location.b}" /> <xm:context-property key="C_loc" value="${location.c}" /> </xm:xslt-transformer> And this is how the xsl is defined: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org

Converting CSV to array using DataWeave

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 05:25:54
问题 I'm using Mule Requester to load a CSV file. After the file is loaded, the payload is a byte array, which I store in a flow variable, mycsv . I keep getting an exception. org.mule.api.MessagingException: Exception while executing: NetIds: flowVars.mycsv map $."My Column Name" ^ Cannot coerce a :binary to a :array (com.mulesoft.weave.mule.exception.WeaveExecutionException). Message payload is of type: byte[] Here's my DataWeave code: %dw 1.0 %output application/java --- { Values: flowVars