Questions tagged [mule4]

Version 4 of Mule, a lightweight enterprise service bus (ESB) and integration framework provided by MuleSoft

Mule is a lightweight enterprise service bus (ESB) and integration framework provided by MuleSoft. According to the documentation, Version 4 aims at simplifying the expression language and reducing management complexity. This way, it shall be possible to deliver applications faster than in earlier versions of the product.

1166 questions
2
votes
1 answer

How to get all XML nodes by name?

I have input XML like this - 1
Rahul Sevani
  • 77
  • 12
2
votes
1 answer

'File' access is not allowed due to restriction set by the accessExternalSchema property

I'm trying to validate xml payload with XSD, where this XSD is referring other and the other is referring someother. Something like nested reference. When I include all the .xsd's in Validate Schema path, I still get: Root Exception stack trace:…
Rahul
  • 21
  • 1
  • 3
2
votes
1 answer

mule4 date format parsing issue, when parsing 2019-02-27T15:43:38.38 in dataweave 2.0 Unable to parse 'T'

I am trying to format current time to yyyy-mm-dd'T'HH:59:59 but in dataweave 2.0 getting below exception for 'T'. Below is my dataweave code: StopDate: now() as String{format: 'yyyy-mm-dd'T'HH:59:59'} Exception Message :…
1
vote
1 answer

How to generate a csv with a double pipe delimiter?

I want to generate a CSV output based on "||" as separator. I tried concatenation and other different approaches but I'm not able to achieve the desired output. Input payload: [ { "details": "products' details; LED; 10-34V; 90 CRI;…
james11
  • 55
  • 6
1
vote
1 answer

My mock is not returning the payload I want (mock response), it is returning the real payload

I´m developing a munit test but It is failing, because when it makes a call to another api, it is expecting a new Id, but for the test I cannot make several new Ids, as I understand this is a simulation, that´s why we use mock responses. But is…
Itzel Moo
  • 11
  • 2
1
vote
1 answer

Better way to do mapping of this input payload in DW 2.0 Mule 4

I am new to Mule 4, Is there a better way to transform this below input payload. The input payload is a list but contains just one item. How can I remove indexing { "id": "123", "result": "SUCCESS", "code": "200", "application": "api", …
Sunny85
  • 37
  • 1
  • 6
1
vote
0 answers

How can a Mule 4 application get access to common dependencies defined in the domain

In Anypoint Studio, I have a domain project where I define dependencies (mule connectors and other various 3rd party dependencies) that are common to the apps that are part of the domain. In those apps, I can access the mule connectors, but my java…
William
  • 91
  • 1
  • 10
1
vote
1 answer

Make HTTPS GET request using http connector in Mule with SSL certificates

I have .crt and privatekey.pem keys which can be used for making HTTPS GET API request. We can't use these certificates directly in mulesoft for making https API requests. As far I know it supports Trust store configuration and Key store…
1
vote
1 answer

DataWeave Transformation remove duplicates based on value

I have a payload that is an array of objects. I want to remove duplicate objects with the same id however if the returnComment is 1, that should be kept over the one being 2. Basically 1 has higher priority over 2 in deciding which object to keep.…
Andre S
  • 21
  • 6
1
vote
2 answers

How to remove trailing comma from a object inside a json array using dataweave?

How to remove trailing commas from each line of the object inside the json array? sample input: [ { "dc": "cn=Cggzci,dc=maxcrc,dc=com", "objectClass": "top", "objectClass": "person", "cn": "Cggzci", "sn": "Mqemdv" }, { …
ariana
  • 27
  • 6
1
vote
1 answer

Base64 Conversion to Number in DataWeave Returns incorrect value

I have the following in Python that decodes Yag= and returns the bytes b'a\xa8' and converts to an integer of 25000 import base64 num = base64.b64decode("Yag=") converted = int.from_bytes(num, byteorder='big') When I use the following DataWeave…
Matt P
  • 147
  • 1
  • 6
1
vote
2 answers

bytearrayinputstream to string in Mule 4 using Java invoke static

I want to get elements from an .eml file in Mule 4 using the Java Module invoke static operation, but it gives this error Invocation of static Method 'Text(java.lang.String)' from Class 'testattach.Test' with arguments…
techie
  • 11
  • 1
1
vote
1 answer

How to restrict the parent node update if it does not have a child using data weave 2.0?

In my case, I have updating DTOCoverageItem node FullTermAmt attribute value from the incoming request. I have to restrict the DTOCoverageItem node updation, if does not contains DTOSteps as a child node. Request:
1
vote
1 answer

CloudHub worker trying to connect to SFTP site which allows whitelisted IPs only

I have a Mule 4 application [App1] created on CloudHub. I tried to deploy the application's jar file onto CloudHub. This application has a Static IP [eg. 100.101.102.103] assigned to it in Runtime Manager. This IP address is whitelisted by customer…
Abjt G
  • 39
  • 7
1
vote
2 answers

Start week date based on week number and year

i'm trying to convert year and week number to Date, specifically i need to get first day of week by week number. My idea was to convert my String to Date and then gat firstdayofweek but im struggling with converting to Date with error: Cannot coerce…