Git Product home page Git Product logo

mule-soft-practice's Introduction

MULE SOFT PRACTICE

This practice shows some points about MuleSoft! ๐Ÿ’ป

  • Anypoint Studio 4 Linux
  • We have to extract the files from the downloaded site
  • If we use Ubuntu 20.04 just double tap in the Anypoint Studio
  • Once made this , we just have to wait and Anypoint will init.
  • Select the defaulkt workspace / press Launch

Link for Linux Instalation

https://docs.mulesoft.com/studio/7.6/to-download-and-install-studio-lx

Using AnypointStudio to build an API / Testing it with Postman

  • As first step we have to create a new project
  • After this , we give a name to our project and we can see our workspace
  • Using an HTTP procotol we select the option in the right section and take a listener to our main section.
  • Then we select a payload to set it in the project and get a new Endpoind & asign it to our flow.
  • To run the project we just have to right click in the API building and tap run project / stop project

Testing with POSTMAN ๐Ÿงช

Setting a secure properties step ๐Ÿ‘ฉโ€๐Ÿ’ป

  • Once we made the process with de global elements configuration
  • We go to the scene and we drag an HTTP LIstener
%dw 2.0
output application/json
---
[{
	FirstName: "Max",
	LastName: "Mule",
	Email: "[email protected]",
	Company: "MuleSoft"
}]

Working with maven and Anypoint Studio

  • One of the main functions working with maven / ANypoint Studio is that , it will packaged

  • our Anypoint project and then will prepare it for a deploy with cloudHUB or onpremise

  • Firstly we have to install maven in our computer / verify the prerequisites are correct .

  • Here we have some references that could help us to install maven (Ubuntu 20.04)

  • https://ubunlog.com/apache-maven-instalacion-ubuntu/ ๐Ÿค

  • Configuration with pom.xml

  • In our xml file , we have to add mule dependencies,as we can see in the next code.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.mule.tools.maven</groupId>
	<artifactId>maven-tutorial</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<packaging>mule-application</packaging>
	<name>maven-tutorial</name>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<app.runtime>4.3.0</app.runtime>
		<mule.maven.plugin.version>3.3.5</mule.maven.plugin.version>
	</properties>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-clean-plugin</artifactId>
				<version>3.0.0</version>
			</plugin>
			<plugin>
				<groupId>org.mule.tools.maven</groupId>
				<artifactId>mule-maven-plugin</artifactId>
				<version>3.3.5</version>
				<extensions>true</extensions>
				<configuration>
				<cloudHubDeployment>
			      <muleVersion>4.3.0</muleVersion>
			      <username>ANYPOINT-PLATFORM-USERNAME-HERE</username>
			      <password>ANYPOINT-PLATFORM-PASSWORD-HERE</password>
			      <applicationName>mule-maven-project-tutorial</applicationName>
			      <environment>Sandbox</environment>   
			      <workers>1</workers>
			      <workerType>MICRO</workerType>
			      <properties>
				    <maven.compiler.target>1.8</maven.compiler.target>
				    <maven.compiler.source>1.8</maven.compiler.source>
				</properties>
			    </cloudHubDeployment>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<dependencies>
        <dependency>
            <groupId>org.mule.connectors</groupId>
            <artifactId>mule-http-connector</artifactId>
            <version>1.5.17</version>
            <classifier>mule-plugin</classifier>
        </dependency>
        <dependency>
            <groupId>org.mule.connectors</groupId>
            <artifactId>mule-sockets-connector</artifactId>
            <version>1.1.6</version>
            <classifier>mule-plugin</classifier>
        </dependency>
	</dependencies>

	<repositories>
          <repository>
            <id>anypoint-exchange-v2</id>
            <name>Anypoint Exchange</name>
            <url>https://maven.anypoint.mulesoft.com/api/v2/maven</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>mulesoft-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>https://repository.mulesoft.org/releases/</url>
            <layout>default</layout>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>mulesoft-releases</id>
            <name>mulesoft release repository</name>
            <layout>default</layout>
            <url>https://repository.mulesoft.org/releases/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
</project>

PLUS

Some issues presented in the process were resolved with tutorial videos :

mule-soft-practice's People

Contributors

ddaniuwu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.