mule

How do you convert SQL Server SELECT into XML in Mule 4?

为君一笑 提交于 2021-01-28 20:23:07
问题 How can I convert the following SQL output into XML using Dataweave in Mule 4? SELECT s.RefId ,s.LocalId ,s.StateProvinceId ,s.SchoolName ,e.Email ,e.EmailType FROM SchoolInfo s LEFT OUTER JOIN SchoolEmail e ON e.SchoolRefId = s.RefId WHERE s.RefId = :ref_id The output in SQL is: RefId LocalId StateProvinceId SchoolName Email Type 7FDF722B-6BBA-4BF0-8205-A5380B269EF1 1 SA Steve's School steven@gmail.com prm 7FDF722B-6BBA-4BF0-8205-A5380B269EF1 1 SA Steve's School test@gmail.com sec The XML

Compare 2 JSON arrays to get matching and un-matching outputs

 ̄綄美尐妖づ 提交于 2021-01-28 13:50:14
问题 I need to compare 2 JSON arrays using Mule 4 dataweave 2.0 to get matching and un-matching outputs. The sample input JSON payload is given below: [ { "CODE": "A11", "NAME": "Alpha", "ID": "C10000" }, { "CODE": "B12", "NAME": "Bravo", "ID": "B20000" }, { "CODE": "C11", "NAME": "Charlie", "ID": "C30000" }, { "CODE": "D12", "NAME": "Delta", "ID": "D40000" }, { "CODE": "E12", "NAME": "Echo", "ID": "E50000" } ] This has to be compared to the below on ID/IDENTITY field. [ { "IDENTITY": "D40000",

Mule Cache Scope How to invalidate mule cache for no payload of DB output

人盡茶涼 提交于 2021-01-28 09:47:49
问题 We would like to use DB query inside mule cache scope. Wants to store the output of DB query in cache to save DB query trip. If the DB query doesn't give any output or payload is empty, we dont want to save in mule cache. How to invalidate the cache of the empty payload entries ? thank you. 回答1: The answer to this is in mule forum, https://forums.mulesoft.com/questions/84675/mule-cache-scope-how-to-invalidate-mule-cache-for.html <ee:cache cachingStrategy-ref="Caching_Strategy"

CannotResolveClassException while trying to transform xml string into java object

旧时模样 提交于 2021-01-28 07:45:37
问题 I am trying to develop a mule flow which takes a xml in the form of a string from a JMS queue and converts it into a POJO. I am using JAXB annotations to define the mappings between the xml and the class attributes. Below is the sample xml that is received on the JMS queue as a string. <FCUBS_NOTIFICATION xmlns="http://fcubs.ofss.com/notify/NOTIF_UP_TRANSACTION"> <FCUBS_NOTIF_HEADER> <MSGID>9132820000357947</MSGID> </FCUBS_NOTIF_HEADER> </FCUBS_NOTIFICATION> My POJO class is as below: package

Setting Map as payload in Mule Flow using MEL

别等时光非礼了梦想. 提交于 2021-01-27 12:56:57
问题 I am trying to generate and set a map (with 2 key value pairs) on the fly as the payload for the following HTTP call. However, the MEL expression for creating the Map is not working. <sub-flow name="call-myservice" doc:name="call-myservice"> <set-payload value="#[username :${my.username}, password : ${my.password}]" doc:name="Set Payload"/> <https:outbound-endpoint exchange-pattern="request-response" host="${myservice.Host}" method="POST" mimeType="application/json" doc:name="My Service call"

[javax.xml.bind.UnmarshalException: unexpected element

三世轮回 提交于 2021-01-27 07:42:28
问题 When invkoing a webservice, I get the following exception: [javax.xml.bind.UnmarshalException: unexpected element (uri:"urn:partner.soap.sforce.com", local:"metadataServerUrl"). Expected elements are <{}sessionId>,<{}sandbox>,<{}userId>,<{}passwordExpired>,<{}metadataServerUrl>,<{}userInfo>,<{}serverUrl>] The response expected is actually an object called LoginResult. But however I see the element names in the exception strace. The loginResult class is the expected output object from the

[javax.xml.bind.UnmarshalException: unexpected element

ぐ巨炮叔叔 提交于 2021-01-27 07:42:01
问题 When invkoing a webservice, I get the following exception: [javax.xml.bind.UnmarshalException: unexpected element (uri:"urn:partner.soap.sforce.com", local:"metadataServerUrl"). Expected elements are <{}sessionId>,<{}sandbox>,<{}userId>,<{}passwordExpired>,<{}metadataServerUrl>,<{}userInfo>,<{}serverUrl>] The response expected is actually an object called LoginResult. But however I see the element names in the exception strace. The loginResult class is the expected output object from the

[javax.xml.bind.UnmarshalException: unexpected element

岁酱吖の 提交于 2021-01-27 07:41:45
问题 When invkoing a webservice, I get the following exception: [javax.xml.bind.UnmarshalException: unexpected element (uri:"urn:partner.soap.sforce.com", local:"metadataServerUrl"). Expected elements are <{}sessionId>,<{}sandbox>,<{}userId>,<{}passwordExpired>,<{}metadataServerUrl>,<{}userInfo>,<{}serverUrl>] The response expected is actually an object called LoginResult. But however I see the element names in the exception strace. The loginResult class is the expected output object from the

How to use groupBy with orderBy on Array to XMl in Mule4

…衆ロ難τιáo~ 提交于 2020-12-16 03:38:09
问题 I having input as Array (json) which needs to groupBy and orderBy with clientId so that its internal Lines are grouped and ordered in to one root in xml (repetitive lines of clientId). I'm stuck how to use dataweave for the XMl response. Please find the request and expected response. Request: [ { "ClientId": 2, "Code": "string", "ReceivedDate": "2018-10-23", "ReceivedTime": "2217", "Warehouse": "30", "Quantity": "20" }, { "ClientId": 1, "Code": "string", "ReceivedDate": "2018-10-23",

No connection in docker with ports exposed and published

青春壹個敷衍的年華 提交于 2020-12-12 05:39:41
问题 I have some middleware running in a docker container. When I run this middleware on my host machine everything works fine . When I ran it on the docker container with all the necessary ports exposed and published : Dockerfile: EXPOSE 5672 15672 1337 1338 5556 3000 Docker-compose.yml ports: - "5672:5672" - "15672:15672" - "1337:1337" - "1338:1338" - "5556:5556" - "3000:3000" It’s weird because I have rabbitmq and mule in that image. Rabbit works well beacause I can access the management