Skip to content

Instantly share code, notes, and snippets.

View JordanSchuetz's full-sized avatar
😍
Coding

Jordan Schuetz JordanSchuetz

😍
Coding
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!-- global.xml -->
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:websocket="http://www.mulesoft.org/schema/mule/websocket"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
# config.yaml
http:
port: "8081"
ws:
port: "8091"
@JordanSchuetz
JordanSchuetz / index.html
Created November 16, 2020 21:21
MuleSoft Websockets Connector Tutorial
<!DOCTYPE HTML>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/Chart.min.js"></script>
</head>
<body>
<div width="400" height="400">
<canvas id="myChart"></canvas>
</div>
@JordanSchuetz
JordanSchuetz / dataweave.dw
Created November 7, 2020 04:52
Dataweave code for secure properties tutorial
%dw 2.0
output application/json
---
[{
FirstName: "Max",
LastName: "Mule",
Email: "[email protected]",
Company: "MuleSoft"
}]
%dw 2.0
output application/json
---
read(payload,'application/json')
%dw 2.0
output application/json
---
vars.SaveS3Object mapObject ((value, key, index) ->
{
(index) : value,
}) ++ vars.SaveObject mapObject ((value, key, index) ->
{
(index) : value,
})
%dw 2.0
output application/json
---
{
"0": payload
}
{
"0": {
"LastModifiedDate": "2020-10-21T21:55:38.000Z",
"Company": "MuleSoft",
"Email": null,
"Address": null,
"Latitude": null,
"ProductInterest__c": null,
"type": "Lead",
"MobilePhone": "4084895392",
{
"0" :
{
"LastModifiedDate": "2020-10-21T21:55:38.000Z",
"Company": "MuleSoft",
"Email": null,
"Address": null,
"Latitude": null,
"ProductInterest__c": null,
"type": "Lead",
@JordanSchuetz
JordanSchuetz / maven-error.txt
Created August 26, 2020 19:33
This error is caused by your environment variables not being set up. Make sure to configure your JAVA_HOME variable to the correct java version
Execution default-deploy of goal org.mule.tools.maven:mule-maven-plugin:3.3.5:deploy failed:
MessageBodyReader not found for media type=application/json;charset=utf-8,
type=class org.mule.tools.client.arm.model.AuthorizationResponse,
genericType=class org.mule.tools.client.arm.model.AuthorizationResponse.