Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
MuleSoft mock com set payload
Search
Alex teles
January 09, 2017
Education
66
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MuleSoft mock com set payload
MuleSoft mock com set payload
Alex teles
January 09, 2017
More Decks by Alex teles
See All by Alex teles
Mulesoft configurando conexão com banco AS400 DB2
alexteles10
0
120
Chamando um flow de dentro do Transform Message
alexteles10
0
85
MuleSoft Juntando duas ou mais Listas ordenadas
alexteles10
0
82
MuleSoft Como mockar resultado com transform mensager
alexteles10
0
53
Como excluir o conector do facebook Do anyponit
alexteles10
0
86
Baixando conectores que não são nativos
alexteles10
0
69
Editor do Anypoint
alexteles10
0
58
MuleSoft Como fazer um when dentro de um when
alexteles10
0
76
MuleSoft Property configuração
alexteles10
0
66
Other Decks in Education
See All in Education
Antigravityを使ってGeminiAPI(NanobananaPro)と連携して挿絵メーカーを作った
yoshimura_datam
0
260
2026年度秋学期 統計学 講義の進め方と成績評価について (2026. 9. 28)
akiraasano
PRO
0
250
Database Handling in Python: SQLite3, MySQL and CRUD Operations
madhuri28
0
110
[2026後期火5] 論理学(京都大学文学部 後期 第2回)「量化子の導入」
yatabe
0
190
CSS3 and Responsive Web Design - Lecture 5 - Web Technologies (1019888BNR)
signer
PRO
1
3.5k
Introduction to Primary and Secondary Metabolites their Metabolic Pathways
drpoonamkc
0
170
新型コロナ禍をともに「楽しみながら開いていこう!」 :中門 吉松 会員(2720 Japan O.K.ロータリーEクラブ)卓話 : 2026.10.19.例会・卓話
2720japanoke
0
350
Web Architectures - Lecture 2 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
子どものためのプログラミング道場『CoderDojo』〜法人提携例〜 / Partnership with CoderDojo Japan
coderdojojapan
PRO
4
19k
HTML5 and the Open Web Platform - Lecture 3 - Web Technologies (1019888BNR)
signer
PRO
3
3.6k
Introduction - Lecture 1 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
3.5k
EL GEOPARQUE MUNDIAL UNESCO VOLCANES DE CALATRAVA: DE LA INVESTIGACIÓN CIENTÍFICA A LA TRANSPOSICIÓN DIDÁCTICA EN EL AULA
juanmartin2026
0
37k
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
Done Done
chrislema
187
17k
So, you think you're a good person
axbom
PRO
2
2.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Bash Introduction
62gerente
615
220k
Docker and Python
trallard
47
4.2k
Producing Creativity
orderedlist
PRO
348
41k
Side Projects
sachag
456
43k
Making the Leap to Tech Lead
cromwellryan
135
10k
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
Technical Leadership for Architectural Decision Making
baasie
3
600
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
Transcript
MuleSoft 2017
Hoje vamos falar de mock dados usando o Set
payload
Vamos criar um fluxo com da seguinte forma (Poll, set
Payload, Transform Message, log)
Mude a execução do Poll para minutos para não executa
a cada um segundo
Nosso transform espera receber uma lista de json com (Nome,
Descricao e Valor) então preciso passa essa estrutura com valores para testar.
Estrutura json [ { "Nome":"pao", "Descricao":"pao de queijo", "Valor":"1"
}, { "Nome":"queijo", "Descricao":"queijo coalho", "Valor":"2" } ]
No Set Payload no quadro value você tem que preenche
com o json semelhante com a esperada
Json setado no set payload e type MIME e Encoging
Rodando o projeto em modo Debug com break no Set
payload Payload vázio
Depois do set Payload o valor do set payload foi
atribuído ao payload
Resultado depois do transform uma lista conforme a saída setado
no transform
<?xml version="1.0" encoding="UTF-8"?> <mule xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring- beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd"> <flow name="mock-set-payloadFlow"> <poll doc:name="Poll"> <fixed-frequency-scheduler frequency="1000" timeUnit="MINUTES"/> <logger message="====Start=====" level="INFO" doc:name="Logger"/> </poll> <set-payload value="[ { "Nome":"pao", "Descricao":"pao de queijo", "Valor":"1" },
{ "Nome":"queijo", "Descricao":"queijo coalho", "Valor":"2"
} ]" encoding="UTF-8" mimeType="application/json" doc:name="Set Payload"/> <dw:transform-message metadata:id="a1c6eb81-1b6a-4655-b17f-2ee3d5afb0e0" doc:name="Transform Message"> <dw:input-payload doc:sample="input.json" mimeType="application/json"/> <dw:set-payload><![CDATA[%dw 1.0 %output application/java --- payload map ((payload01 , indexOfPayload01) -> { name: payload01.Nome, description: payload01.Descricao, value: payload01.Valor })]]></dw:set-payload> </dw:transform-message> <logger message="=====resultado======#[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Logger"/> </flow> </mule>
FIM