Articles


Introduction

In this article, I am going to explain to you how we can use the power of MuleSoft to send PDF files from Experience API to Process/System API, using the multipart/form-data type, and to covert it back to PDF file in the second API.

Use Case

We are going to read the PDF file from the local disk using Mule’s out-of-the-box (OOTB) File connector to read in Experience API. Then we will be sending this PDF as binary with some other fields to another API (this can be named as Process API) which accepts data as multipart/form-data. Next, we will extract this PDF binary from the received payload and convert it back to PDF and save the file to the local disk using Mule’s OOTB File connector to write.

Source de l’article sur DZONE

In this article, we will go through one of the most important concepts of MuleSoft Streaming strategies.

There are three types of streaming strategies available in MuleSoft:

Source de l’article sur DZONE

This article will help you practice your Dataweave skills in Mulesoft. Here we have to convert the input to a specific type of output. Let’s get started.

Input:

Source de l’article sur DZONE


DDoS (Distributed Denial Of Service)

A Distributed Denial-of-Service (DDoS) is any type of attack where the attackers attempt to prevent legitimate users from accessing the service. In a DDoS attack, the attacker usually sends excessive messages asking the network or server to authenticate requests that have invalid return addresses.

How to Prevent DDoS Attacks

There are different ways we can prevent DDoS attacks; we can do IP blacklisting to avoid traffic from sources of attack, rate limit your application to prevent it from being overwhelmed, or use both of them to provide multiple layers of security.

Source de l’article sur DZONE

Implement a Counter in Dataweave

These days, I see quite a few posts that require using Counter in DataWeave. The problem faced is that users require a Sequence Number that is consistent throughout the different sections of data. Consider the below JSON:

JSON

xxxxxxxxxx
1

17

 

1

[{

2

"Item" : "ItemXYZ",

3

  "SequenceNo" : 1,

4

  "Parts": [

5

{ "Part" : "A1", "SequenceNo" : 2 }, { "Part" : "B1", "SequenceNo" : 3 },

6

{ "Part" : "A2", "SequenceNo" : 4 }, { "Part" : "B2", "SequenceNo" : 5 }

7

 ]

8

},

9

 {

10

"Item" : "ItemRTY",

11

  "SequenceNo" : 6,

12

  "Parts": [

13

{ "Part" : "A1", "SequenceNo" : 7 }, { "Part" : "B1", "SequenceNo" : 8 },

14

{ "Part" : "A2", "SequenceNo" : 9 }, { "Part" : "B2", "SequenceNo" : 10 }

15

 ]

16

}

17

]

Source de l’article sur DZONE


Problem Statement

Recently, while working with MuleSoft 4 (AnyPoint Platform – 7.3.1), I had come across a scenario that requires invocation of another REST API, which is also implemented on MuleSoft. This API requires input in the form of URI parameters. This API works well when invoked from an external client like Postman, however, exceptions are observed when the same API is invoked from MuleSoft.

Implementation Details

App – Currency Conversation is implemented for providing currency conversion details in real-time , this APP can be invoked by URL  -http://<<hostname>> /api/ currenyconversion /baseCcy /<<value>> /targetCcy/<<value>>

Source de l’article sur DZONE