<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arindam Goswami on Medium]]></title>
        <description><![CDATA[Stories by Arindam Goswami on Medium]]></description>
        <link>https://medium.com/@biltughatal?source=rss-a2355dd34e7f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6sZ7WUuN5ebnPj1_</url>
            <title>Stories by Arindam Goswami on Medium</title>
            <link>https://medium.com/@biltughatal?source=rss-a2355dd34e7f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 22:54:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@biltughatal/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The OAS /RAML Best Practises]]></title>
            <link>https://medium.com/@biltughatal/the-oas-raml-best-practises-13d9933d2189?source=rss-a2355dd34e7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/13d9933d2189</guid>
            <category><![CDATA[aos]]></category>
            <category><![CDATA[raml]]></category>
            <category><![CDATA[mule4]]></category>
            <category><![CDATA[swagger]]></category>
            <category><![CDATA[open-api]]></category>
            <dc:creator><![CDATA[Arindam Goswami]]></dc:creator>
            <pubDate>Mon, 30 Mar 2026 14:16:40 GMT</pubDate>
            <atom:updated>2026-03-30T16:13:20.419Z</atom:updated>
            <content:encoded><![CDATA[<p>Here in this small blog I will be showing the rule or the best practices to be followed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*liaEzb-4Zujh9dfOH-zVeg.png" /></figure><p>Please go through for detail , understanding of the video.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJynWivOiLnM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJynWivOiLnM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJynWivOiLnM%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9da545061cee45a062aba5305a14762e/href">https://medium.com/media/9da545061cee45a062aba5305a14762e/href</a></iframe><p><em>The Best Practises for Enterprise</em></p><p>1.A Open API Spec must contain Info and Servers section. Server will give you the list of mtls url for different environment.<br>2. For a perticular transaction if we have 3 operation e.g create , delete , update and Get then the API endpoint will remain the same , only method will be changed.<br>3. The Data type of any Element mentioned as Object.<br>4. The schema type , response , Examples and parameters should be mentioned in the component Section.<br>5. All the Error Response should be following the same ErrorResponseType.<br>6.Error Response Object should follow the RFC 7807 Style. As shown below<br>{<br> &quot;type&quot;: &quot;https://api.nbr.co.in/errors/validation-failed&quot;,<br> &quot;title&quot;: &quot;Bad Request&quot;,<br> &quot;status&quot;: 400,<br> &quot;detail&quot;: &quot;Validation failed&quot;,<br> &quot;instance&quot;: &quot;/nbr&quot;,<br> &quot;traceId&quot;: &quot;TRC123456789&quot;<br>}</p><p>7. For any Datatype Like Curreny . To denote all the allowed Datatype , an ENUM can be used.<br>Enum:<br>[ CAD, USD, INR ]</p><p>8.All the Data Type , Schema , Reponse , Examples for a perticular Data should have to be mentioned in the components section.</p><p>Please find below the entire OAS</p><pre># yaml-language-server: $schema=openapi: 3.0.3<br>openapi: 3.0.3<br><br>info:<br>  version: 1.0.0<br>  title: My Banking API<br>  description: This Banking API Contains Financial Transaction<br>  license:<br>    name: National Rural Banking<br>    url: https://www.nbr.co.in<br>  contact:<br>    name: National Rural Banking<br>    url: https://www.nbr.co.in<br>    email: support@nbr.com<br><br>servers:<br>  - url: https://dev-mtls.api-internal.nbr.com/pai/v1<br>    description: DEV Server<br>  - url: https://test-mtls.api-internal.nbr.com/pai/v1<br>    description: TEST Server<br>  - url: https://uat-mtls.api-internal.nbr.com/pai/v1<br>    description: UAT Server<br>  - url: https://live-mtls.api-internal.nbr.com/pai/v1<br>    description: PROD Server<br><br>tags:<br>  - name: health<br>    description: Health operations<br>  - name: nbr<br>    description: National Rural Banking operation<br><br>paths:<br>  /system/health:<br>    get:<br>      tags: [health]<br>      description: Returns system health and connected subsystems<br>      operationId: nbr-health-check<br>      parameters:<br>        - $ref: &#39;#/components/parameters/nbrTraceId&#39;<br>      responses:<br>        &#39;200&#39;: { $ref: &#39;#/components/responses/SystemHealthCheckResponse&#39; }<br>        &#39;400&#39;: { $ref: &#39;#/components/responses/Error400Response&#39; }<br>        &#39;401&#39;: { $ref: &#39;#/components/responses/Error401Response&#39; }<br>        &#39;404&#39;: { $ref: &#39;#/components/responses/Error404Response&#39; }<br>        &#39;405&#39;: { $ref: &#39;#/components/responses/Error405Response&#39; }<br>        &#39;415&#39;: { $ref: &#39;#/components/responses/Error415Response&#39; }<br>        &#39;429&#39;: { $ref: &#39;#/components/responses/Error429Response&#39; }<br>        &#39;500&#39;: { $ref: &#39;#/components/responses/Error500Response&#39; }<br><br>  /nbr:<br>    post:<br>      tags: [nbr]<br>      description: Create a transaction<br>      operationId: nbr-create<br>      parameters:<br>        - $ref: &#39;#/components/parameters/nbrTraceId&#39;<br>        - $ref: &#39;#/components/parameters/nbrClientId&#39;<br>      requestBody:<br>        required: true<br>        content:<br>          application/json:<br>            schema:<br>              type: object<br>              additionalProperties: false<br>              required:<br>                - amount<br>                - currency<br>                - payeeName<br>                - payeeAccountNumber<br>                - senderAccountNumber<br>              properties:<br>                amount: { $ref: &#39;#/components/schemas/Amount&#39; }<br>                currency: { $ref: &#39;#/components/schemas/Currency&#39; }<br>                payeeName: { $ref: &#39;#/components/schemas/PayeeName&#39; }<br>                payeeAccountNumber: { $ref: &#39;#/components/schemas/PayeeAccountNumber&#39; }<br>                senderAccountNumber: { $ref: &#39;#/components/schemas/SenderAccountNumber&#39; }<br>            examples:<br>              NbrCreateRequest:<br>                $ref: &#39;#/components/examples/NbrCreateRequestExample&#39;<br>      responses:<br>        &#39;201&#39;: { $ref: &#39;#/components/responses/Success201&#39; }<br>        &#39;400&#39;: { $ref: &#39;#/components/responses/Error400Response&#39; }<br>        &#39;401&#39;: { $ref: &#39;#/components/responses/Error401Response&#39; }<br>        &#39;404&#39;: { $ref: &#39;#/components/responses/Error404Response&#39; }<br>        &#39;405&#39;: { $ref: &#39;#/components/responses/Error405Response&#39; }<br>        &#39;415&#39;: { $ref: &#39;#/components/responses/Error415Response&#39; }<br>        &#39;429&#39;: { $ref: &#39;#/components/responses/Error429Response&#39; }<br>        &#39;500&#39;: { $ref: &#39;#/components/responses/Error500Response&#39; }<br><br>    get:<br>      tags: [nbr]<br>      description: Fetch transaction details<br>      operationId: nbr-get-transaction-details<br>      parameters:<br>        - $ref: &#39;#/components/parameters/nbrTraceId&#39;<br>        - $ref: &#39;#/components/parameters/nbrClientId&#39;<br>        - $ref: &#39;#/components/parameters/nbrTrackingId&#39;<br>      responses:<br>        &#39;200&#39;: { $ref: &#39;#/components/responses/Success200&#39; }<br>        &#39;400&#39;: { $ref: &#39;#/components/responses/Error400Response&#39; }<br>        &#39;401&#39;: { $ref: &#39;#/components/responses/Error401Response&#39; }<br>        &#39;404&#39;: { $ref: &#39;#/components/responses/Error404Response&#39; }<br>        &#39;405&#39;: { $ref: &#39;#/components/responses/Error405Response&#39; }<br>        &#39;415&#39;: { $ref: &#39;#/components/responses/Error415Response&#39; }<br>        &#39;429&#39;: { $ref: &#39;#/components/responses/Error429Response&#39; }<br>        &#39;500&#39;: { $ref: &#39;#/components/responses/Error500Response&#39; }<br><br>  /nbr/{nbrTrackingId}:<br>    patch:<br>      tags: [nbr]<br>      description: Update a transaction<br>      operationId: nbr-update<br>      parameters:<br>        - $ref: &#39;#/components/parameters/nbrTraceId&#39;<br>        - $ref: &#39;#/components/parameters/nbrClientId&#39;<br>        - $ref: &#39;#/components/parameters/nbrTrackingId&#39;<br>      requestBody:<br>        required: true<br>        content:<br>          application/json:<br>            schema:<br>              type: object<br>              additionalProperties: false<br>              required: [amount]<br>              properties:<br>                amount: { $ref: &#39;#/components/schemas/Amount&#39; }<br>            examples:<br>              NbrUpdateRequest:<br>                $ref: &#39;#/components/examples/NbrUpdateRequest&#39;<br>      responses:<br>        &#39;200&#39;: { $ref: &#39;#/components/responses/Success200&#39; }<br>        &#39;400&#39;: { $ref: &#39;#/components/responses/Error400Response&#39; }<br>        &#39;401&#39;: { $ref: &#39;#/components/responses/Error401Response&#39; }<br>        &#39;404&#39;: { $ref: &#39;#/components/responses/Error404Response&#39; }<br>        &#39;405&#39;: { $ref: &#39;#/components/responses/Error405Response&#39; }<br>        &#39;415&#39;: { $ref: &#39;#/components/responses/Error415Response&#39; }<br>        &#39;429&#39;: { $ref: &#39;#/components/responses/Error429Response&#39; }<br>        &#39;500&#39;: { $ref: &#39;#/components/responses/Error500Response&#39; }<br><br>components:<br>  parameters:<br>    nbrTraceId:<br>      name: X-Trace-Id<br>      in: header<br>      required: true<br>      schema: { $ref: &#39;#/components/schemas/NbrTraceId&#39; }<br>      example: TRC123456789<br><br>    nbrClientId:<br>      name: X-Client-Id<br>      in: header<br>      required: true<br>      schema: { $ref: &#39;#/components/schemas/NbrClientId&#39; }<br>      example: APP-01<br><br>    nbrTrackingId:<br>      name: nbrTrackingId<br>      in: path<br>      required: true<br>      schema: { $ref: &#39;#/components/schemas/NbrTrackingId&#39; }<br>      example: &quot;1234567890&quot;<br><br>  schemas:<br>    NbrTrackingId:<br>      type: string<br>      pattern: &#39;^[0-9]{10}$&#39;<br>      example: &quot;1234567890&quot;<br><br>    NbrTraceId:<br>      type: string<br>      pattern: &#39;^[A-Z]{3}[0-9]{9}$&#39;<br>      example: TRC123456789<br><br>    NbrClientId:<br>      type: string<br>      maxLength: 10<br>      pattern: &#39;^[A-Za-z0-9-]{1,10}$&#39;<br>      example: APP-01<br><br>    Amount:<br>      type: number<br>      format: double<br>      minimum: 0.01<br>      maximum: 1000000000<br>      example: 1500.75<br><br>    Currency:<br>      type: string<br>      enum: [CAD, USD, INR]<br>      pattern: &#39;^[A-Z]{3}$&#39;<br>      example: INR<br><br>    PayeeName:<br>      type: string<br>      minLength: 2<br>      maxLength: 50<br>      pattern: &#39;^[A-Za-z ]+$&#39;<br>      example: Rahul Sharma<br><br>    PayeeAccountNumber:<br>      type: string<br>      minLength: 9<br>      maxLength: 18<br>      pattern: &#39;^[0-9]+$&#39;<br>      example: &quot;123456789012&quot;<br><br>    SenderAccountNumber:<br>      type: string<br>      minLength: 9<br>      maxLength: 18<br>      pattern: &#39;^[0-9]+$&#39;<br>      example: &quot;987654321098&quot;<br><br>    SuccessResponse:<br>      type: object<br>      properties:<br>        status:<br>          type: string<br>          example: SUCCESS<br>        transactionId:<br>          type: string<br>          example: TXN123456789<br>        message:<br>          type: string<br>          example: Transaction processed successfully<br><br>    ErrorResponse:<br>      type: object<br>      description: RFC 7807 Problem Details<br>      required: [type, title, status]<br>      properties:<br>        type:<br>          type: string<br>          format: uri<br>        title:<br>          type: string<br>        status:<br>          type: integer<br>        detail:<br>          type: string<br>        instance:<br>          type: string<br>          format: uri<br>        traceId:<br>          $ref: &#39;#/components/schemas/NbrTraceId&#39;<br><br>  responses:<br>    Success200:<br>      description: Successful fetch<br>      content:<br>        application/json:<br>          schema: { $ref: &#39;#/components/schemas/SuccessResponse&#39; }<br><br>    Success201:<br>      description: Successful creation<br>      content:<br>        application/json:<br>          schema: { $ref: &#39;#/components/schemas/SuccessResponse&#39; }<br><br>    SystemHealthCheckResponse:<br>      description: System health status<br>      content:<br>        application/json:<br>          schema:<br>            type: object<br>            properties:<br>              status: { type: string }<br>              timestamp:<br>                type: string<br>                format: date-time<br>              services:<br>                type: array<br>                items:<br>                  type: object<br>                  properties:<br>                    name: { type: string }<br>                    status: { type: string }<br>          examples:<br>            healthSuccess:<br>              $ref: &#39;#/components/examples/SystemHealthExample&#39;<br><br>    Error400Response:<br>      description: Bad Request<br>      content:<br>        application/problem+json:<br>          schema: { $ref: &#39;#/components/schemas/ErrorResponse&#39; }<br>          examples:<br>            ex: { $ref: &#39;#/components/examples/StandardError400Example&#39; }<br><br>    Error401Response:<br>      description: Unauthorized<br>      content:<br>        application/problem+json:<br>          schema: { $ref: &#39;#/components/schemas/ErrorResponse&#39; }<br>          examples:<br>            ex: { $ref: &#39;#/components/examples/StandardError401Example&#39; }<br><br>    Error404Response:<br>      description: Not Found<br>      content:<br>        application/problem+json:<br>          schema: { $ref: &#39;#/components/schemas/ErrorResponse&#39; }<br>          examples:<br>            ex: { $ref: &#39;#/components/examples/StandardError404Example&#39; }<br><br>    Error405Response:<br>      description: Method Not Allowed<br>      content:<br>        application/problem+json:<br>          schema: { $ref: &#39;#/components/schemas/ErrorResponse&#39; }<br>          examples:<br>            ex: { $ref: &#39;#/components/examples/StandardError405Example&#39; }<br><br>    Error415Response:<br>      description: Unsupported Media Type<br>      content:<br>        application/problem+json:<br>          schema: { $ref: &#39;#/components/schemas/ErrorResponse&#39; }<br>          examples:<br>            ex: { $ref: &#39;#/components/examples/StandardError415Example&#39; }<br><br>    Error429Response:<br>      description: Too Many Requests<br>      content:<br>        application/problem+json:<br>          schema: { $ref: &#39;#/components/schemas/ErrorResponse&#39; }<br>          examples:<br>            ex: { $ref: &#39;#/components/examples/StandardError429Example&#39; }<br><br>    Error500Response:<br>      description: Internal Server Error<br>      content:<br>        application/problem+json:<br>          schema: { $ref: &#39;#/components/schemas/ErrorResponse&#39; }<br>          examples:<br>            ex: { $ref: &#39;#/components/examples/StandardError500Example&#39; }<br><br>  examples:<br>    SystemHealthExample:<br>      value:<br>        status: UP<br>        timestamp: 2026-03-12T10:15:30Z<br>        services:<br>          - name: database<br>            status: UP<br><br>    NbrCreateRequestExample:<br>      value:<br>        amount: 1500.75<br>        currency: INR<br>        payeeName: Rahul Sharma<br>        payeeAccountNumber: &quot;123456789012&quot;<br>        senderAccountNumber: &quot;987654321098&quot;<br><br>    NbrUpdateRequest:<br>      value:<br>        amount: 2000.00<br><br>    StandardError400Example:<br>      value:<br>        type: https://api.nbr.co.in/errors/validation-failed<br>        title: Bad Request<br>        status: 400<br>        detail: Validation failed<br>        instance: /nbr<br>        traceId: TRC123456789<br>    StandardError401Example:<br>      value:<br>        type: https://api.nbr.co.in/errors/unauthorized<br>        title: Unauthorized<br>        status: 401<br>        detail: Authentication credentials are missing or invalid<br>        instance: /nbr<br>        traceId: TRC123456789<br>    StandardError404Example:<br>      value:<br>        type: https://api.nbr.co.in/errors/resource-not-found<br>        title: Not Found<br>        status: 404<br>        detail: Transaction not found for given ID<br>        instance: /nbr/1234567890<br>        traceId: TRC123456789<br><br>    StandardError405Example:<br>      value:<br>        type: https://api.nbr.co.in/errors/method-not-allowed<br>        title: Method Not Allowed<br>        status: 405<br>        detail: HTTP method not supported for this endpoint<br>        instance: /nbr<br>        traceId: TRC123456789<br><br>    StandardError415Example:<br>      value:<br>        type: https://api.nbr.co.in/errors/unsupported-media-type<br>        title: Unsupported Media Type<br>        status: 415<br>        detail: Content-Type must be application/json<br>        instance: /nbr<br>        traceId: TRC123456789<br><br>    StandardError429Example:<br>      value:<br>        type: https://api.nbr.co.in/errors/rate-limit-exceeded<br>        title: Too Many Requests<br>        status: 429<br>        detail: API rate limit exceeded. Please try again later<br>        instance: /nbr<br>        traceId: TRC123456789<br><br>    StandardError500Example:<br>      value:<br>        type: https://api.nbr.co.in/errors/internal-server-error<br>        title: Internal Server Error<br>        status: 500<br>        detail: Unexpected error occurred. Please contact support<br>        instance: /nbr<br>        traceId: TRC123456789</pre><p>Please let me know if you like my article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13d9933d2189" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automated Deployment CI-CD Pipe Line Tool (Mule4)]]></title>
            <link>https://medium.com/@biltughatal/automated-deployment-ci-cd-pipe-line-tool-mule4-eba60926e6d4?source=rss-a2355dd34e7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/eba60926e6d4</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Arindam Goswami]]></dc:creator>
            <pubDate>Mon, 08 Dec 2025 07:48:01 GMT</pubDate>
            <atom:updated>2025-12-08T07:48:01.721Z</atom:updated>
            <content:encoded><![CDATA[<p>The purpose of this article to depicts and demonstrate on how to automate the build and deployment process using the CI CD pipe line with Cloudhub 2.0 (Mule4).</p><h3>perquisite</h3><ul><li>Anypoint cloudhub account (cloudhub 2.0)</li><li>app.runtime — 4.9.0</li><li>mule.maven.plugin.version — 4.3.0</li><li>Anypoint Studio — Version: 7.21.0</li><li>Open JDK — 11.0</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eeg-olIUaIKGImut.jpg" /></figure><p>CI CD Pipe Line</p><h3>Now Follow the below steps</h3><p>Create a project from a RAML file in Anypoint studio. The details steps are mentioned here in my earlier blog. Please go through the below link if in case you did not have gone through this.</p><p><a href="https://dzone.com/articles/jwt-policy-enforcement-raml-anypoint-platform">https://dzone.com/articles/jwt-policy-enforcement-raml-anypoint-platform</a></p><h3>How to do Automated deployment ?</h3><p>Let’s 1st see , how to deploy manually using maven command from command prompt.</p><p>there are two steps build and deployment-</p><ol><li>Deploy it into exchange</li><li>Deploy into Runtime manager</li></ol><p>Please find the below pom. For the security reason I have changed the group ID.</p><p>XML</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;<br>	&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;</pre><pre>	&lt;groupId&gt;XXXXXXX-a7c8-XXX-ae67-dXXXXXXXXXXX&lt;/groupId&gt;<br>	&lt;artifactId&gt;order-api-sapi&lt;/artifactId&gt;<br>	&lt;version&gt;1.0.20&lt;/version&gt;<br>	&lt;packaging&gt;mule-application&lt;/packaging&gt;<br>	&lt;name&gt;order-api-sapi&lt;/name&gt;</pre><pre>	&lt;properties&gt;<br>		&lt;mule.maven.plugin.version&gt;4.3.0&lt;/mule.maven.plugin.version&gt;<br>		&lt;app.runtime&gt;4.9.0&lt;/app.runtime&gt;<br>	&lt;/properties&gt;</pre><pre>	&lt;build&gt;<br>		&lt;plugins&gt;<br>			&lt;plugin&gt;<br>				&lt;groupId&gt;org.mule.tools.maven&lt;/groupId&gt;<br>				&lt;artifactId&gt;mule-maven-plugin&lt;/artifactId&gt;<br>				&lt;version&gt;${mule.maven.plugin.version}&lt;/version&gt;<br>				&lt;extensions&gt;true&lt;/extensions&gt;<br>				&lt;configuration&gt;<br>					&lt;classifier&gt;mule-application&lt;/classifier&gt;<br>					&lt;cloudhub2Deployment&gt;<br>						&lt;uri&gt;https://anypoint.mulesoft.com&lt;/uri&gt;<br>						&lt;provider&gt;MC&lt;/provider&gt;<br>						&lt;environment&gt;${env}&lt;/environment&gt;<br>						&lt;server&gt;anypoint-exchange-v3&lt;/server&gt;<br>						&lt;target&gt;${target}&lt;/target&gt;<br>						&lt;applicationName&gt;${app.name}&lt;/applicationName&gt;<br>						&lt;replicas&gt;${replicas}&lt;/replicas&gt;<br>						&lt;muleVersion&gt;${app.runtime}&lt;/muleVersion&gt;<br>						&lt;vCores&gt;${vCores}&lt;/vCores&gt;<br>						&lt;deploymentSettings&gt;<br>							&lt;generateDefaultPublicUrl&gt;true&lt;/generateDefaultPublicUrl&gt;<br>						&lt;/deploymentSettings&gt;<br>						&lt;connectedAppGrantType&gt;client_credentials&lt;/connectedAppGrantType&gt;<br>						&lt;properties&gt;<br>							&lt;anypoint.platform.client_id&gt;${anypoint.client.id}&lt;/anypoint.platform.client_id&gt;<br>							&lt;anypoint.platform.client_secret&gt;${anypoint.client.secret}&lt;/anypoint.platform.client_secret&gt;<br>							&lt;remote.api.clientId&gt;8081&lt;/remote.api.clientId&gt;<br>							&lt;env&gt;${env}&lt;/env&gt;<br>						&lt;/properties&gt;<br>						&lt;secureProperties&gt;<br>							&lt;remote.api.clientSecret&gt;8082&lt;/remote.api.clientSecret&gt;<br>						&lt;/secureProperties&gt;<br>					&lt;/cloudhub2Deployment&gt;<br>				&lt;/configuration&gt;<br>			&lt;/plugin&gt;<br>		&lt;/plugins&gt;<br>	&lt;/build&gt;</pre><pre>	&lt;dependencies&gt;<br>		&lt;dependency&gt;<br>			&lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>			&lt;artifactId&gt;mule-http-connector&lt;/artifactId&gt;<br>			&lt;version&gt;1.10.3&lt;/version&gt;<br>			&lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>		&lt;/dependency&gt;<br>		&lt;dependency&gt;<br>			&lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>			&lt;artifactId&gt;mule-sockets-connector&lt;/artifactId&gt;<br>			&lt;version&gt;1.2.5&lt;/version&gt;<br>			&lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>		&lt;/dependency&gt;<br>		&lt;dependency&gt;<br>			&lt;groupId&gt;org.mule.modules&lt;/groupId&gt;<br>			&lt;artifactId&gt;mule-apikit-module&lt;/artifactId&gt;<br>			&lt;version&gt;1.11.3&lt;/version&gt;<br>			&lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>		&lt;/dependency&gt;<br>	&lt;/dependencies&gt;</pre><pre>	&lt;distributionManagement&gt;<br>		&lt;repository&gt;<br>			&lt;id&gt;anypoint-exchange-v3&lt;/id&gt;<br>			&lt;name&gt;anypoint-exchange-v3&lt;/name&gt;<br>			&lt;url&gt;https://maven.anypoint.mulesoft.com/api/v3/organizations/${groupId}/maven&lt;/url&gt;<br>			&lt;layout&gt;default&lt;/layout&gt;<br>		&lt;/repository&gt;<br>	&lt;/distributionManagement&gt;<br>	&lt;repositories&gt;<br>		&lt;repository&gt;<br>			&lt;id&gt;anypoint-exchange-v3&lt;/id&gt;<br>			&lt;name&gt;Anypoint Exchange&lt;/name&gt;<br>			&lt;url&gt;https://maven.anypoint.mulesoft.com/api/v3/maven&lt;/url&gt;<br>			&lt;layout&gt;default&lt;/layout&gt;<br>		&lt;/repository&gt;<br>		&lt;repository&gt;<br>			&lt;id&gt;mulesoft-releases&lt;/id&gt;<br>			&lt;name&gt;MuleSoft Releases Repository&lt;/name&gt;<br>			&lt;url&gt;https://repository.mulesoft.org/releases/&lt;/url&gt;<br>			&lt;layout&gt;default&lt;/layout&gt;<br>		&lt;/repository&gt;<br>	&lt;/repositories&gt;</pre><pre>	&lt;pluginRepositories&gt;<br>		&lt;pluginRepository&gt;<br>			&lt;id&gt;mulesoft-releases&lt;/id&gt;<br>			&lt;name&gt;MuleSoft Releases Repository&lt;/name&gt;<br>			&lt;layout&gt;default&lt;/layout&gt;<br>			&lt;url&gt;https://repository.mulesoft.org/releases/&lt;/url&gt;<br>			&lt;snapshots&gt;<br>				&lt;enabled&gt;false&lt;/enabled&gt;<br>			&lt;/snapshots&gt;<br>		&lt;/pluginRepository&gt;<br>	&lt;/pluginRepositories&gt;</pre><pre>&lt;/project&gt;</pre><p>I already explained <strong>&lt;cloudhub2Deployment&gt; </strong>in my earlier blog , Please check it out if required.</p><p>We need to explicitly mention this snippet below dependency. It is <strong>mandatory.</strong><br><strong>This is the repository location of the build jar created.</strong></p><p>XML</p><pre>&lt;distributionManagement&gt;<br>		&lt;repository&gt;<br>			&lt;id&gt;anypoint-exchange-v3&lt;/id&gt;<br>			&lt;name&gt;anypoint-exchange-v3&lt;/name&gt;<br>			&lt;url&gt;https://maven.anypoint.mulesoft.com/api/v3/organizations/${groupId}/maven&lt;/url&gt;<br>			&lt;layout&gt;default&lt;/layout&gt;<br>		&lt;/repository&gt;<br>	&lt;/distributionManagement&gt;</pre><p>Also need to add the repository inside the <strong>repositories</strong> tag</p><p>XML</p><pre>&lt;repository&gt;<br>			&lt;id&gt;anypoint-exchange-v3&lt;/id&gt;<br>			&lt;name&gt;Anypoint Exchange&lt;/name&gt;<br>			&lt;url&gt;https://maven.anypoint.mulesoft.com/api/v3/maven&lt;/url&gt;<br>			&lt;layout&gt;default&lt;/layout&gt;<br>		&lt;/repository&gt;</pre><p>Now Open the project using Visual Studio Code Editor. Once you open , you can see the below project structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/0*OrsDNicixAZnep5Y.png" /></figure><p><strong>We need to do 3 things here.</strong></p><ul><li>create a <strong>.maven </strong>folder inside the project , inside it create a <strong>settings.xml</strong></li><li>create a <strong>.github/workflows </strong>folder inside project , inside it create a <strong>build.yaml</strong> file</li><li>you also need to add the Github Actions from extensions as shown below , It will connect VS Code studio with your GIT HUB account after providing the credentials.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*str4dLHF6Lm78nfR.png" /></figure><h3>Settings.xml</h3><p>you need to add the profiles and server section as mentioned below.</p><p>Profile Section contains the details about Profile<br>Server Sections the details of connected app details , e.g — client id and client secret.</p><p>XML</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;settings xmlns=&quot;http://maven.apache.org/SETTINGS/1.2.0&quot;<br>          xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;<br>          xsi:schemaLocation=&quot;http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd&quot;&gt;</pre><pre>  &lt;pluginGroups&gt;<br>    &lt;pluginGroup&gt;org.mule.tools&lt;/pluginGroup&gt;<br>  &lt;/pluginGroups&gt;</pre><pre>  &lt;profiles&gt;<br>     	&lt;profile&gt;<br>			&lt;id&gt;Sandbox&lt;/id&gt;<br>			&lt;properties&gt;<br>				&lt;target&gt;Cloudhub-US-East-2&lt;/target&gt;<br>				&lt;replicas&gt;1&lt;/replicas&gt;<br>				&lt;region&gt;us-east-1&lt;/region&gt;<br>				&lt;env&gt;Sandbox&lt;/env&gt;<br>				&lt;app.name&gt;sand-order-api-sapi&lt;/app.name&gt;<br>				&lt;vCores&gt;0.1&lt;/vCores&gt;<br>				&lt;worker.type&gt;MICRO&lt;/worker.type&gt;<br>				&lt;anypoint.client.id&gt;xxxxxx&lt;/anypoint.client.id&gt;<br>				&lt;anypoint.client.secret&gt;xxxxx&lt;/anypoint.client.secret&gt;<br>			&lt;/properties&gt;<br>		&lt;/profile&gt;<br>  &lt;/profiles&gt;</pre><pre>  &lt;servers&gt;<br>    &lt;server&gt;<br>      &lt;id&gt;anypoint-exchange-v3&lt;/id&gt;<br>      &lt;username&gt;~~~Client~~~&lt;/username&gt;<br>      &lt;password&gt;f059d98e8d974517bxxxxxxx~?~c1efdD4cFxxxxxxxxx&lt;/password&gt;<br>    &lt;/server&gt;<br>  &lt;/servers&gt;<br>&lt;/settings&gt;</pre><p>Please make sure all the 3 id has to be same as mentioned below.</p><ul><li>server id</li><li>repository id</li><li>repository id</li></ul><p>e.g — <strong>anypoint-exchange-v3 </strong>as mentioned here.</p><h3>Build.yaml file</h3><p>The below code snippet needed to be added in build.yaml file.</p><p>YAML</p><pre>name: Publish to Exchange &amp; Deploy to CH2.0</pre><pre>on:<br>  push:<br>    branches: [ main ]<br>    <br>jobs:         <br>  build:<br>    runs-on: ubuntu-latest<br>    steps:<br>      - name: Checkout this repo<br>        uses: actions/checkout@v4</pre><pre>      - name: Cache dependencies<br>        uses: actions/cache@v4<br>        with:<br>          path: ~/.m2/repository<br>          key: ${{ runner.os }}-maven-${{ hashFiles(&#39;**/pom.xml&#39;) }}<br>          restore-keys: ${{ runner.os }}-maven-</pre><pre>      - name: Set up JDK 1.8<br>        uses: actions/setup-java@v4<br>        with:<br>          distribution: &quot;zulu&quot;<br>          java-version: 8<br>      <br>      - name: Publish to Exchange<br>        run: |<br>          mvn deploy --settings .maven/settings.xml -DskipMunitTests \<br>          -Dclient.id=&quot;${{ secrets.CONNECTED_APP_CLIENT_ID }}&quot; \<br>          -Dclient.secret=&quot;${{ secrets.CONNECTED_APP_CLIENT_SECRET }}&quot;<br>      - name: Deploy to CloudHub 2.0<br>        run: |<br>          mvn deploy --settings .maven/settings.xml -PSandbox -DskipMunitTests -DmuleDeploy \<br>          -Dclient.id=&quot;${{ secrets.CONNECTED_APP_CLIENT_ID }}&quot; \<br>          -Dclient.secret=&quot;${{ secrets.CONNECTED_APP_CLIENT_SECRET }}&quot;</pre><h3>Add ClientId and client Secret</h3><p>Below is the place in VS Code where you can add the client Id and client secret.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1eyTHVKHoGZCiOd6.png" /></figure><p>N.B: Once you have added the client id and client secret in Visual Studio code you can see automatically those appear in the GIT hub page in the settings section</p><p>To view this in GIT .Please navigate to Git to as mentioned below.</p><p><strong>your repository &gt; Settings &gt; Actions</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4Y7X6ilQ9OydJyq0.png" /></figure><p>You can also set it directly in the Github.This Client ID and Client Secret is the credentials of the Connected APP.</p><p>Now All Set.</p><p>The build will be started once we check in the code , Please keep in mind every time we give a fresh build make <strong>sure Group id , Artifact id and version combination has to be unique (GAV).</strong><br><strong>Otherwise we might get the famous GAV error.</strong></p><p>To prove this let me start the build without changing any version.See the publishing to Exchange has failed , the same GAV exist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TOhrdarl3Op_xq2X.png" /></figure><p>Now I am changing the version and you can see build is success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-FzolnEYysNDrAtW.png" /></figure><h3>How to verify the CI CD Pipe Line</h3><p>1. Do some changes in the code in local. Commit and push this change in git repository. As shown in the<br>below Figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_SIx5AfJavDCusFz.png" /></figure><p>2. Now once I push the changes in the repository then. The build starts Automatically. As shown below in the picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Hy8ia_N3A-luy8Gz.png" /></figure><p>N.B — here are 2 steps in build.</p><ul><li>1st is publish into Exchange.</li><li>2nd is deploy intoRunTime Manager.</li></ul><p>3. The build is success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5GBGk15ouswGzCpy.png" /></figure><p>4. The same also is reflected in Anypoint Platform.As shown below. Please have a look at the timestamp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dyepFEqpx8_8WnwW.png" /></figure><p>I hope you have enjoyed my article. Please comment in case any suggestion and improvement.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eba60926e6d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dataweave Practise Set -2 , Intermediate Level]]></title>
            <link>https://medium.com/@biltughatal/dataweave-practise-set-2-intermediate-level-46e591603a3a?source=rss-a2355dd34e7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/46e591603a3a</guid>
            <category><![CDATA[mule4]]></category>
            <category><![CDATA[mulesoft-esb]]></category>
            <category><![CDATA[dataweave-practice]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[mule]]></category>
            <dc:creator><![CDATA[Arindam Goswami]]></dc:creator>
            <pubDate>Wed, 27 Aug 2025 06:57:05 GMT</pubDate>
            <atom:updated>2025-08-27T08:00:03.660Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dataweave Practise Set -2 , Intermediate Level</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*VDezAeu93wJoitj1.png" /><figcaption>Mulesoft DWL programming</figcaption></figure><p>Here is example of 10 Dataweave practise set with intermediate difficulty Level. Please share your comments if you like it.</p><p>Dataweave version — 2.0<br>Compatible with — Mule version — 4.X</p><ol><li><strong>Example</strong></li></ol><p><strong>Input</strong></p><pre>  <br>{<br>  &quot;latitude&quot;: 40.875,<br>  &quot;longitude&quot;: 74.125,<br>  &quot;generationtime_ms&quot;: 0.0321865081787109,<br>  &quot;utc_offset_seconds&quot;: 0,<br>  &quot;timezone&quot;: &quot;GMT&quot;,<br>  &quot;timezone_abbreviation&quot;: &quot;GMT&quot;,<br>  &quot;elevation&quot;: 3825,<br>  &quot;hourly_units&quot;: {<br>    &quot;time&quot;: &quot;iso8601&quot;,<br>    &quot;temperature_2m&quot;: &quot;°C&quot;<br>  },<br>  &quot;hourly&quot;: {<br>    &quot;time&quot;: [<br>      &quot;2025-08-21T00:00&quot;,<br>      &quot;2025-08-21T01:00&quot;,<br>      &quot;2025-08-21T02:00&quot;,<br>      &quot;2025-08-21T03:00&quot;,<br>      &quot;2025-08-21T04:00&quot;,<br>      &quot;2025-08-21T05:00&quot;,<br>      &quot;2025-08-21T06:00&quot;,<br>      &quot;2025-08-21T07:00&quot;,<br>      &quot;2025-08-21T08:00&quot;,<br>      &quot;2025-08-21T09:00&quot;,<br>      &quot;2025-08-21T10:00&quot;,<br>      &quot;2025-08-21T11:00&quot;,<br>      &quot;2025-08-21T12:00&quot;,<br>      &quot;2025-08-21T13:00&quot;,<br>      &quot;2025-08-21T14:00&quot;,<br>      &quot;2025-08-21T15:00&quot;,<br>      &quot;2025-08-21T16:00&quot;,<br>      &quot;2025-08-21T17:00&quot;,<br>      &quot;2025-08-21T18:00&quot;,<br>      &quot;2025-08-21T19:00&quot;,<br>      &quot;2025-08-21T20:00&quot;,<br>      &quot;2025-08-21T21:00&quot;,<br>      &quot;2025-08-21T22:00&quot;,<br>      &quot;2025-08-21T23:00&quot;,<br>      &quot;2025-08-22T00:00&quot;,<br>      &quot;2025-08-22T01:00&quot;,<br>      &quot;2025-08-22T02:00&quot;,<br>      &quot;2025-08-22T03:00&quot;,<br>      &quot;2025-08-22T04:00&quot;,<br>      &quot;2025-08-22T05:00&quot;,<br>      &quot;2025-08-22T06:00&quot;,<br>      &quot;2025-08-22T07:00&quot;,<br>      &quot;2025-08-22T08:00&quot;,<br>      &quot;2025-08-22T09:00&quot;,<br>      &quot;2025-08-22T10:00&quot;,<br>      &quot;2025-08-22T11:00&quot;,<br>      &quot;2025-08-22T12:00&quot;,<br>      &quot;2025-08-22T13:00&quot;,<br>      &quot;2025-08-22T14:00&quot;,<br>      &quot;2025-08-22T15:00&quot;,<br>      &quot;2025-08-22T16:00&quot;,<br>      &quot;2025-08-22T17:00&quot;,<br>      &quot;2025-08-22T18:00&quot;,<br>      &quot;2025-08-22T19:00&quot;,<br>      &quot;2025-08-22T20:00&quot;,<br>      &quot;2025-08-22T21:00&quot;,<br>      &quot;2025-08-22T22:00&quot;,<br>      &quot;2025-08-22T23:00&quot;,<br>      &quot;2025-08-23T00:00&quot;,<br>      &quot;2025-08-23T01:00&quot;,<br>      &quot;2025-08-23T02:00&quot;,<br>      &quot;2025-08-23T03:00&quot;,<br>      &quot;2025-08-23T04:00&quot;,<br>      &quot;2025-08-23T05:00&quot;,<br>      &quot;2025-08-23T06:00&quot;,<br>      &quot;2025-08-23T07:00&quot;,<br>      &quot;2025-08-23T08:00&quot;,<br>      &quot;2025-08-23T09:00&quot;,<br>      &quot;2025-08-23T10:00&quot;,<br>      &quot;2025-08-23T11:00&quot;,<br>      &quot;2025-08-23T12:00&quot;,<br>      &quot;2025-08-23T13:00&quot;,<br>      &quot;2025-08-23T14:00&quot;,<br>      &quot;2025-08-23T15:00&quot;,<br>      &quot;2025-08-23T16:00&quot;,<br>      &quot;2025-08-23T17:00&quot;,<br>      &quot;2025-08-23T18:00&quot;,<br>      &quot;2025-08-23T19:00&quot;,<br>      &quot;2025-08-23T20:00&quot;,<br>      &quot;2025-08-23T21:00&quot;,<br>      &quot;2025-08-23T22:00&quot;,<br>      &quot;2025-08-23T23:00&quot;,<br>      &quot;2025-08-24T00:00&quot;,<br>      &quot;2025-08-24T01:00&quot;,<br>      &quot;2025-08-24T02:00&quot;,<br>      &quot;2025-08-24T03:00&quot;,<br>      &quot;2025-08-24T04:00&quot;,<br>      &quot;2025-08-24T05:00&quot;,<br>      &quot;2025-08-24T06:00&quot;,<br>      &quot;2025-08-24T07:00&quot;,<br>      &quot;2025-08-24T08:00&quot;,<br>      &quot;2025-08-24T09:00&quot;,<br>      &quot;2025-08-24T10:00&quot;,<br>      &quot;2025-08-24T11:00&quot;,<br>      &quot;2025-08-24T12:00&quot;,<br>      &quot;2025-08-24T13:00&quot;,<br>      &quot;2025-08-24T14:00&quot;,<br>      &quot;2025-08-24T15:00&quot;,<br>      &quot;2025-08-24T16:00&quot;,<br>      &quot;2025-08-24T17:00&quot;,<br>      &quot;2025-08-24T18:00&quot;,<br>      &quot;2025-08-24T19:00&quot;,<br>      &quot;2025-08-24T20:00&quot;,<br>      &quot;2025-08-24T21:00&quot;,<br>      &quot;2025-08-24T22:00&quot;,<br>      &quot;2025-08-24T23:00&quot;,<br>      &quot;2025-08-25T00:00&quot;,<br>      &quot;2025-08-25T01:00&quot;,<br>      &quot;2025-08-25T02:00&quot;,<br>      &quot;2025-08-25T03:00&quot;,<br>      &quot;2025-08-25T04:00&quot;,<br>      &quot;2025-08-25T05:00&quot;,<br>      &quot;2025-08-25T06:00&quot;,<br>      &quot;2025-08-25T07:00&quot;,<br>      &quot;2025-08-25T08:00&quot;,<br>      &quot;2025-08-25T09:00&quot;,<br>      &quot;2025-08-25T10:00&quot;,<br>      &quot;2025-08-25T11:00&quot;,<br>      &quot;2025-08-25T12:00&quot;,<br>      &quot;2025-08-25T13:00&quot;,<br>      &quot;2025-08-25T14:00&quot;,<br>      &quot;2025-08-25T15:00&quot;,<br>      &quot;2025-08-25T16:00&quot;,<br>      &quot;2025-08-25T17:00&quot;,<br>      &quot;2025-08-25T18:00&quot;,<br>      &quot;2025-08-25T19:00&quot;,<br>      &quot;2025-08-25T20:00&quot;,<br>      &quot;2025-08-25T21:00&quot;,<br>      &quot;2025-08-25T22:00&quot;,<br>      &quot;2025-08-25T23:00&quot;,<br>      &quot;2025-08-26T00:00&quot;,<br>      &quot;2025-08-26T01:00&quot;,<br>      &quot;2025-08-26T02:00&quot;,<br>      &quot;2025-08-26T03:00&quot;,<br>      &quot;2025-08-26T04:00&quot;,<br>      &quot;2025-08-26T05:00&quot;,<br>      &quot;2025-08-26T06:00&quot;,<br>      &quot;2025-08-26T07:00&quot;,<br>      &quot;2025-08-26T08:00&quot;,<br>      &quot;2025-08-26T09:00&quot;,<br>      &quot;2025-08-26T10:00&quot;,<br>      &quot;2025-08-26T11:00&quot;,<br>      &quot;2025-08-26T12:00&quot;,<br>      &quot;2025-08-26T13:00&quot;,<br>      &quot;2025-08-26T14:00&quot;,<br>      &quot;2025-08-26T15:00&quot;,<br>      &quot;2025-08-26T16:00&quot;,<br>      &quot;2025-08-26T17:00&quot;,<br>      &quot;2025-08-26T18:00&quot;,<br>      &quot;2025-08-26T19:00&quot;,<br>      &quot;2025-08-26T20:00&quot;,<br>      &quot;2025-08-26T21:00&quot;,<br>      &quot;2025-08-26T22:00&quot;,<br>      &quot;2025-08-26T23:00&quot;,<br>      &quot;2025-08-27T00:00&quot;,<br>      &quot;2025-08-27T01:00&quot;,<br>      &quot;2025-08-27T02:00&quot;,<br>      &quot;2025-08-27T03:00&quot;,<br>      &quot;2025-08-27T04:00&quot;,<br>      &quot;2025-08-27T05:00&quot;,<br>      &quot;2025-08-27T06:00&quot;,<br>      &quot;2025-08-27T07:00&quot;,<br>      &quot;2025-08-27T08:00&quot;,<br>      &quot;2025-08-27T09:00&quot;,<br>      &quot;2025-08-27T10:00&quot;,<br>      &quot;2025-08-27T11:00&quot;,<br>      &quot;2025-08-27T12:00&quot;,<br>      &quot;2025-08-27T13:00&quot;,<br>      &quot;2025-08-27T14:00&quot;,<br>      &quot;2025-08-27T15:00&quot;,<br>      &quot;2025-08-27T16:00&quot;,<br>      &quot;2025-08-27T17:00&quot;,<br>      &quot;2025-08-27T18:00&quot;,<br>      &quot;2025-08-27T19:00&quot;,<br>      &quot;2025-08-27T20:00&quot;,<br>      &quot;2025-08-27T21:00&quot;,<br>      &quot;2025-08-27T22:00&quot;,<br>      &quot;2025-08-27T23:00&quot;<br>    ],<br>    &quot;temperature_2m&quot;: [2.5, 2.2, 3.3, 5.2, 6.7, 7.5, 8.7, 9.7, 10.4, 10.7, 10.5, 10.1, 9.3, 8.3, 6.7, 5.6, 4.8, 3.6, 2.9, 2.3, 2.1, 2, 1.7, 1.5, 1.4, 1.6, 4, 6.9, 8.9, 10.3, 11.4, 12, 12.4, 12.5, 12.1, 11.4, 10.4, 9.3, 7.3, 6, 4.9, 4, 3.7, 3.9, 4, 3.8, 3.3, 3, 3.7, 4.1, 4.3, 5, 4.3, 5.6, 7.6, 7.7, 7.8, 8, 9.4, 9.7, 9.2, 8.1, 7, 5.4, 4.1, 3.5, 2.9, 2.4, 2.2, 1.8, 1.9, 1.8, 1.7, 1.8, 3.2, 5.6, 6.8, 7.7, 8.8, 9.7, 10.3, 10.2, 9.9, 9.9, 9.5, 8.8, 7.1, 6.2, 5.4, 4.4, 3.7, 3.3, 3.1, 2.9, 2.7, 2.5, 2.8, 4, 5.6, 7.4, 9.2, 11.1, 12.7, 13.7, 14.3, 14.5, 14.4, 13.8, 12.9, 11.3, 9.4, 7.7, 6.5, 5.6, 4.9, 4.5, 4.2, 4.1, 3.7, 3.4, 3.7, 5, 6.8, 8.7, 10.6, 12.5, 14, 14.9, 15.3, 15.3, 15, 14.3, 13.3, 11.7, 9.8, 8.1, 6.7, 5.5, 4.6, 4.3, 4.2, 4.3, 4.3, 4.3, 4.8, 6.1, 7.8, 9.7, 11.6, 13.7, 15.4, 16.5, 17.2, 17.5, 17.4, 16.9, 15.8, 13.8, 11.2, 9.2, 8.4, 8.3, 8.3, 8.1, 8.1, 8, 7.6, 7.2]<br>  }<br>}</pre><p><strong>Output</strong></p><pre>{<br>  &quot;2025-08-21T00:00&quot;: 2.5,<br>  &quot;2025-08-21T01:00&quot;: 2.2,<br>  &quot;2025-08-21T02:00&quot;: 3.3,<br>  &quot;2025-08-21T03:00&quot;: 5.2,<br>  &quot;2025-08-21T04:00&quot;: 6.7,<br>  &quot;2025-08-21T05:00&quot;: 7.5,<br>  &quot;2025-08-21T06:00&quot;: 8.7,<br>  &quot;2025-08-21T07:00&quot;: 9.7,<br>  &quot;2025-08-21T08:00&quot;: 10.4,<br>  &quot;2025-08-21T09:00&quot;: 10.7,<br>  &quot;2025-08-21T10:00&quot;: 10.5,<br>  &quot;2025-08-21T11:00&quot;: 10.1,<br>  &quot;2025-08-21T12:00&quot;: 9.3,<br>  &quot;2025-08-21T13:00&quot;: 8.3,<br>  &quot;2025-08-21T14:00&quot;: 6.7,<br>  &quot;2025-08-21T15:00&quot;: 5.6,<br>  &quot;2025-08-21T16:00&quot;: 4.8,<br>  &quot;2025-08-21T17:00&quot;: 3.6,<br>  &quot;2025-08-21T18:00&quot;: 2.9,<br>  &quot;2025-08-21T19:00&quot;: 2.3,<br>  &quot;2025-08-21T20:00&quot;: 2.1,<br>  &quot;2025-08-21T21:00&quot;: 2,<br>  &quot;2025-08-21T22:00&quot;: 1.7,<br>  &quot;2025-08-21T23:00&quot;: 1.5,<br>  &quot;2025-08-22T00:00&quot;: 1.4,<br>  &quot;2025-08-22T01:00&quot;: 1.6,<br>  &quot;2025-08-22T02:00&quot;: 4,<br>  &quot;2025-08-22T03:00&quot;: 6.9,<br>  &quot;2025-08-22T04:00&quot;: 8.9,<br>  &quot;2025-08-22T05:00&quot;: 10.3,<br>  &quot;2025-08-22T06:00&quot;: 11.4,<br>  &quot;2025-08-22T07:00&quot;: 12,<br>  &quot;2025-08-22T08:00&quot;: 12.4,<br>  &quot;2025-08-22T09:00&quot;: 12.5,<br>  &quot;2025-08-22T10:00&quot;: 12.1,<br>  &quot;2025-08-22T11:00&quot;: 11.4,<br>  &quot;2025-08-22T12:00&quot;: 10.4,<br>  &quot;2025-08-22T13:00&quot;: 9.3,<br>  &quot;2025-08-22T14:00&quot;: 7.3,<br>  &quot;2025-08-22T15:00&quot;: 6,<br>  &quot;2025-08-22T16:00&quot;: 4.9,<br>  &quot;2025-08-22T17:00&quot;: 4,<br>  &quot;2025-08-22T18:00&quot;: 3.7,<br>  &quot;2025-08-22T19:00&quot;: 3.9,<br>  &quot;2025-08-22T20:00&quot;: 4,<br>  &quot;2025-08-22T21:00&quot;: 3.8,<br>  &quot;2025-08-22T22:00&quot;: 3.3,<br>  &quot;2025-08-22T23:00&quot;: 3,<br>  &quot;2025-08-23T00:00&quot;: 3.7,<br>  &quot;2025-08-23T01:00&quot;: 4.1,<br>  &quot;2025-08-23T02:00&quot;: 4.3,<br>  &quot;2025-08-23T03:00&quot;: 5,<br>  &quot;2025-08-23T04:00&quot;: 4.3,<br>  &quot;2025-08-23T05:00&quot;: 5.6,<br>  &quot;2025-08-23T06:00&quot;: 7.6,<br>  &quot;2025-08-23T07:00&quot;: 7.7,<br>  &quot;2025-08-23T08:00&quot;: 7.8,<br>  &quot;2025-08-23T09:00&quot;: 8,<br>  &quot;2025-08-23T10:00&quot;: 9.4,<br>  &quot;2025-08-23T11:00&quot;: 9.7,<br>  &quot;2025-08-23T12:00&quot;: 9.2,<br>  &quot;2025-08-23T13:00&quot;: 8.1,<br>  &quot;2025-08-23T14:00&quot;: 7,<br>  &quot;2025-08-23T15:00&quot;: 5.4,<br>  &quot;2025-08-23T16:00&quot;: 4.1,<br>  &quot;2025-08-23T17:00&quot;: 3.5,<br>  &quot;2025-08-23T18:00&quot;: 2.9,<br>  &quot;2025-08-23T19:00&quot;: 2.4,<br>  &quot;2025-08-23T20:00&quot;: 2.2,<br>  &quot;2025-08-23T21:00&quot;: 1.8,<br>  &quot;2025-08-23T22:00&quot;: 1.9,<br>  &quot;2025-08-23T23:00&quot;: 1.8,<br>  &quot;2025-08-24T00:00&quot;: 1.7,<br>  &quot;2025-08-24T01:00&quot;: 1.8,<br>  &quot;2025-08-24T02:00&quot;: 3.2,<br>  &quot;2025-08-24T03:00&quot;: 5.6,<br>  &quot;2025-08-24T04:00&quot;: 6.8,<br>  &quot;2025-08-24T05:00&quot;: 7.7,<br>  &quot;2025-08-24T06:00&quot;: 8.8,<br>  &quot;2025-08-24T07:00&quot;: 9.7,<br>  &quot;2025-08-24T08:00&quot;: 10.3,<br>  &quot;2025-08-24T09:00&quot;: 10.2,<br>  &quot;2025-08-24T10:00&quot;: 9.9,<br>  &quot;2025-08-24T11:00&quot;: 9.9,<br>  &quot;2025-08-24T12:00&quot;: 9.5,<br>  &quot;2025-08-24T13:00&quot;: 8.8,<br>  &quot;2025-08-24T14:00&quot;: 7.1,<br>  &quot;2025-08-24T15:00&quot;: 6.2,<br>  &quot;2025-08-24T16:00&quot;: 5.4,<br>  &quot;2025-08-24T17:00&quot;: 4.4,<br>  &quot;2025-08-24T18:00&quot;: 3.7,<br>  &quot;2025-08-24T19:00&quot;: 3.3,<br>  &quot;2025-08-24T20:00&quot;: 3.1,<br>  &quot;2025-08-24T21:00&quot;: 2.9,<br>  &quot;2025-08-24T22:00&quot;: 2.7,<br>  &quot;2025-08-24T23:00&quot;: 2.5,<br>  &quot;2025-08-25T00:00&quot;: 2.8,<br>  &quot;2025-08-25T01:00&quot;: 4,<br>  &quot;2025-08-25T02:00&quot;: 5.6,<br>  &quot;2025-08-25T03:00&quot;: 7.4,<br>  &quot;2025-08-25T04:00&quot;: 9.2,<br>  &quot;2025-08-25T05:00&quot;: 11.1,<br>  &quot;2025-08-25T06:00&quot;: 12.7,<br>  &quot;2025-08-25T07:00&quot;: 13.7,<br>  &quot;2025-08-25T08:00&quot;: 14.3,<br>  &quot;2025-08-25T09:00&quot;: 14.5,<br>  &quot;2025-08-25T10:00&quot;: 14.4,<br>  &quot;2025-08-25T11:00&quot;: 13.8,<br>  &quot;2025-08-25T12:00&quot;: 12.9,<br>  &quot;2025-08-25T13:00&quot;: 11.3,<br>  &quot;2025-08-25T14:00&quot;: 9.4,<br>  &quot;2025-08-25T15:00&quot;: 7.7,<br>  &quot;2025-08-25T16:00&quot;: 6.5,<br>  &quot;2025-08-25T17:00&quot;: 5.6,<br>  &quot;2025-08-25T18:00&quot;: 4.9,<br>  &quot;2025-08-25T19:00&quot;: 4.5,<br>  &quot;2025-08-25T20:00&quot;: 4.2,<br>  &quot;2025-08-25T21:00&quot;: 4.1,<br>  &quot;2025-08-25T22:00&quot;: 3.7,<br>  &quot;2025-08-25T23:00&quot;: 3.4,<br>  &quot;2025-08-26T00:00&quot;: 3.7,<br>  &quot;2025-08-26T01:00&quot;: 5,<br>  &quot;2025-08-26T02:00&quot;: 6.8,<br>  &quot;2025-08-26T03:00&quot;: 8.7,<br>  &quot;2025-08-26T04:00&quot;: 10.6,<br>  &quot;2025-08-26T05:00&quot;: 12.5,<br>  &quot;2025-08-26T06:00&quot;: 14,<br>  &quot;2025-08-26T07:00&quot;: 14.9,<br>  &quot;2025-08-26T08:00&quot;: 15.3,<br>  &quot;2025-08-26T09:00&quot;: 15.3,<br>  &quot;2025-08-26T10:00&quot;: 15,<br>  &quot;2025-08-26T11:00&quot;: 14.3,<br>  &quot;2025-08-26T12:00&quot;: 13.3,<br>  &quot;2025-08-26T13:00&quot;: 11.7,<br>  &quot;2025-08-26T14:00&quot;: 9.8,<br>  &quot;2025-08-26T15:00&quot;: 8.1,<br>  &quot;2025-08-26T16:00&quot;: 6.7,<br>  &quot;2025-08-26T17:00&quot;: 5.5,<br>  &quot;2025-08-26T18:00&quot;: 4.6,<br>  &quot;2025-08-26T19:00&quot;: 4.3,<br>  &quot;2025-08-26T20:00&quot;: 4.2,<br>  &quot;2025-08-26T21:00&quot;: 4.3,<br>  &quot;2025-08-26T22:00&quot;: 4.3,<br>  &quot;2025-08-26T23:00&quot;: 4.3,<br>  &quot;2025-08-27T00:00&quot;: 4.8,<br>  &quot;2025-08-27T01:00&quot;: 6.1,<br>  &quot;2025-08-27T02:00&quot;: 7.8,<br>  &quot;2025-08-27T03:00&quot;: 9.7,<br>  &quot;2025-08-27T04:00&quot;: 11.6,<br>  &quot;2025-08-27T05:00&quot;: 13.7,<br>  &quot;2025-08-27T06:00&quot;: 15.4,<br>  &quot;2025-08-27T07:00&quot;: 16.5,<br>  &quot;2025-08-27T08:00&quot;: 17.2,<br>  &quot;2025-08-27T09:00&quot;: 17.5,<br>  &quot;2025-08-27T10:00&quot;: 17.4,<br>  &quot;2025-08-27T11:00&quot;: 16.9,<br>  &quot;2025-08-27T12:00&quot;: 15.8,<br>  &quot;2025-08-27T13:00&quot;: 13.8,<br>  &quot;2025-08-27T14:00&quot;: 11.2,<br>  &quot;2025-08-27T15:00&quot;: 9.2,<br>  &quot;2025-08-27T16:00&quot;: 8.4,<br>  &quot;2025-08-27T17:00&quot;: 8.3,<br>  &quot;2025-08-27T18:00&quot;: 8.3,<br>  &quot;2025-08-27T19:00&quot;: 8.1,<br>  &quot;2025-08-27T20:00&quot;: 8.1,<br>  &quot;2025-08-27T21:00&quot;: 8,<br>  &quot;2025-08-27T22:00&quot;: 7.6,<br>  &quot;2025-08-27T23:00&quot;: 7.2<br>}</pre><p>Dataweave Code</p><pre>%dw 2.0<br>output application/json<br>var timeArray = payload.hourly.time<br>var temperatureArray = payload.hourly.temperature_2m<br>fun getTemperature(indexOuter : Any) =<br>(temperatureArray filter ((item, index) -&gt; index == indexOuter))[0]<br>---<br>(timeArray map ((item, index) -&gt; {<br>    (item) : getTemperature(index)<br>})) reduce ((item, accumulator = {}) -&gt; accumulator ++ item)</pre><p>2. Example</p><p><strong>Input</strong></p><pre>  <br>{<br>  &quot;orderId&quot;: &quot;123&quot;,<br>  &quot;customer&quot;: {<br>    &quot;name&quot;: &quot;John Doe&quot;,<br>    &quot;contact&quot;: {<br>      &quot;email&quot;: &quot;john@example.com&quot;,<br>      &quot;phone&quot;: &quot;9999999999&quot;<br>    }<br>  },<br>  &quot;items&quot;: [<br>    { &quot;sku&quot;: &quot;A1&quot;, &quot;qty&quot;: 2, &quot;price&quot;: 200 },<br>    { &quot;sku&quot;: &quot;B1&quot;, &quot;qty&quot;: 1, &quot;price&quot;: 500 }<br>  ]<br>}</pre><p><strong>Output</strong></p><pre>{<br>  &quot;orderId&quot;: &quot;123&quot;,<br>  &quot;customerName&quot;: &quot;John Doe&quot;,<br>  &quot;email&quot;: &quot;john@example.com&quot;,<br>  &quot;totalAmount&quot;: 900<br>}</pre><p>DWL code</p><pre>var orderId = payload.orderId<br>var customerName = payload.customer.name<br>var email = payload.customer.contact.email<br>var itemsArray = payload.items<br><br>fun getItems(itemsArray : Array) =<br>itemsArray map ((item, index) -&gt; {<br>    &quot;totalPriceForEachRow&quot; : item.qty * item.price<br>})<br>---<br>{<br>    &quot;orderId&quot; : orderId,<br>    &quot;customerName&quot; : customerName,<br>    &quot;email&quot; : email,<br>    &quot;totalAmount&quot; : sum(getItems(itemsArray).totalPriceForEachRow)<br>}<br></pre><p>Alternate way</p><pre>%dw 2.0<br>output application/json<br><br>var orderId = payload.orderId<br>var customerName = payload.customer.name<br>var email = payload.customer.contact.email<br>var itemsArray = payload.items<br><br>fun getItems(itemsArray : Array) =<br>(itemsArray map ((item, index) -&gt; {<br>    &quot;totalPriceForEachRow&quot; : item.qty * item.price<br>})) reduce ((item, accumulator = 0) -&gt;  accumulator + item.totalPriceForEachRow)<br>---<br>{<br>    &quot;orderId&quot; : orderId,<br>    &quot;customerName&quot; : customerName,<br>    &quot;email&quot; : email,<br>    &quot;totalAmount&quot; : getItems(itemsArray)<br>}</pre><p>3. Example</p><p><strong>Input</strong></p><pre>[<br>  { &quot;dept&quot;: &quot;IT&quot;, &quot;name&quot;: &quot;Alex&quot;, &quot;salary&quot;: 5000 },<br>  { &quot;dept&quot;: &quot;HR&quot;, &quot;name&quot;: &quot;John&quot;, &quot;salary&quot;: 3000 },<br>  { &quot;dept&quot;: &quot;IT&quot;, &quot;name&quot;: &quot;Sam&quot;, &quot;salary&quot;: 7000 },<br>  { &quot;dept&quot;: &quot;Finance&quot;, &quot;name&quot;: &quot;David&quot;, &quot;salary&quot;: 4000 }<br>]</pre><p><strong>Output</strong></p><pre>{<br>  &quot;IT&quot;: [&quot;Alex&quot;,&quot;Sam&quot;],<br>  &quot;HR&quot;: [&quot;John&quot;],<br>  &quot;Finance&quot;: [&quot;David&quot;]<br>}</pre><p>DWL Code</p><pre>%dw 2.0<br>output application/json<br>fun getNameArray(nameArray : Array) = <br>nameArray.name<br>---<br>(payload groupBy ((item, index) -&gt; item.dept)) mapObject ((value, key, index) -&gt; (key) : getNameArray(value))</pre><p>4. Example</p><p><strong>input</strong></p><pre>{<br>  &quot;company&quot;: &quot;ABC Ltd&quot;,<br>  &quot;employees&quot;: [<br>    {<br>      &quot;id&quot;: 101,<br>      &quot;name&quot;: &quot;Alex&quot;,<br>      &quot;projects&quot;: [<br>        { &quot;code&quot;: &quot;P1&quot;, &quot;hours&quot;: 50 },<br>        { &quot;code&quot;: &quot;P2&quot;, &quot;hours&quot;: 30 }<br>      ]<br>    },<br>    {<br>      &quot;id&quot;: 102,<br>      &quot;name&quot;: &quot;John&quot;,<br>      &quot;projects&quot;: [<br>        { &quot;code&quot;: &quot;P1&quot;, &quot;hours&quot;: 20 },<br>        { &quot;code&quot;: &quot;P3&quot;, &quot;hours&quot;: 40 }<br>      ]<br>    }<br>  ]<br>}</pre><p><strong>Output</strong></p><pre>{<br>  &quot;company&quot;: &quot;ABC Ltd&quot;,<br>  &quot;projects&quot;: {<br>    &quot;P1&quot;: [&quot;Alex&quot;,&quot;John&quot;],<br>    &quot;P2&quot;: [&quot;Alex&quot;],<br>    &quot;P3&quot;: [&quot;John&quot;]<br>  }<br>}</pre><p>DWL Code</p><pre>%dw 2.0<br>output application/json<br>fun getNames(itemOuter : String) =<br>(payload.employees filter ((item, index) -&gt; item.projects.code contains  itemOuter)).name<br>---<br>{<br>    &quot;company&quot; : payload.company,<br>    &quot;projects&quot; : ((flatten(payload.employees.projects).code distinctBy ((item, index) -&gt; item)) map ((item, index) -&gt; {<br>        (item) : getNames(item)<br>    })) reduce ((item, accumulator ={}) -&gt; accumulator ++ item)<br>}</pre><p>5. Example<br><strong>Input</strong></p><pre><br>&lt;orders&gt;<br>  &lt;order id=&quot;1001&quot;&gt;<br>    &lt;item sku=&quot;A1&quot; qty=&quot;2&quot; price=&quot;200&quot;/&gt;<br>    &lt;item sku=&quot;B1&quot; qty=&quot;1&quot; price=&quot;500&quot;/&gt;<br>  &lt;/order&gt;<br>  &lt;order id=&quot;1002&quot;&gt;<br>    &lt;item sku=&quot;C1&quot; qty=&quot;3&quot; price=&quot;100&quot;/&gt;<br>  &lt;/order&gt;<br>&lt;/orders&gt;</pre><p><strong>Output</strong></p><pre><br>[<br>  {<br>    &quot;orderId&quot;: &quot;1001&quot;,<br>    &quot;total&quot;: 900<br>  },<br>  {<br>    &quot;orderId&quot;: &quot;1002&quot;,<br>    &quot;total&quot;: 300<br>  }<br>]</pre><p>DWL Code</p><pre>%dw 2.0<br>output application/json<br>---<br>payload.orders.*order map ((item, index) -&gt; {<br>    &quot;orderId&quot; : item.@id,<br>    &quot;total&quot; : item.*item reduce ((item, accumulator = 0) -&gt; accumulator + (item.@qty * item.@price))<br>})</pre><p>6. Example<br><strong>Input</strong></p><pre>{<br>  &quot;student&quot;: &quot;Alex&quot;,<br>  &quot;marks&quot;: [<br>    { &quot;subject&quot;: &quot;Math&quot;, &quot;score&quot;: 80 },<br>    { &quot;subject&quot;: &quot;Science&quot;, &quot;score&quot;: 90 }<br>  ],<br>  &quot;extra&quot;: [<br>    { &quot;subject&quot;: &quot;Math&quot;, &quot;bonus&quot;: 5 },<br>    { &quot;subject&quot;: &quot;Science&quot;, &quot;bonus&quot;: 10 }<br>  ]<br>}</pre><p><strong>Output</strong></p><pre>{<br>  &quot;student&quot;: &quot;Alex&quot;,<br>  &quot;results&quot;: [<br>    {<br>      &quot;subject&quot;: &quot;Math&quot;,<br>      &quot;totals&quot;: 85<br>    },<br>    {<br>      &quot;subject&quot;: &quot;Science&quot;,<br>      &quot;totals&quot;: 100<br>    }<br>  ]<br>}</pre><p><strong>DWL Code</strong></p><pre>%dw 2.0<br>output application/json<br>var extra = payload.extra<br>fun summation(subject : String) =<br>(extra filter ((item, index) -&gt; item.subject == subject))[0].bonus as Number<br>fun getTotal(item : Any) =<br>item.marks map((itemOuter , index) -&gt; {<br>    &quot;subject&quot; : itemOuter.subject,<br>    &quot;totals&quot; : itemOuter.score as Number + summation(itemOuter.subject)<br>})<br>---<br>{<br>    &quot;student&quot; : payload.student,<br>    &quot;results&quot; : getTotal(payload)<br>} </pre><p>7. Example <br>Input</p><pre>[<br>  { &quot;id&quot;: 1, &quot;status&quot;: &quot;success&quot; },<br>  { &quot;id&quot;: 2, &quot;status&quot;: &quot;failed&quot; },<br>  { &quot;id&quot;: 3, &quot;status&quot;: &quot;success&quot; }<br>]</pre><p>Output</p><pre>{<br>  &quot;success&quot;: 2,<br>  &quot;failed&quot;: 1<br>}</pre><p>DWL Code</p><pre><br>%dw 2.0<br>output application/json<br>---<br>(payload groupBy ((item, index) -&gt; item.status)) mapObject ((value, key, index) -&gt; (key) : sizeOf(value))</pre><p>8 Example <br><strong>Input</strong></p><pre>[<br>  { &quot;region&quot;: &quot;Asia&quot;, &quot;country&quot;: &quot;India&quot;, &quot;sales&quot;: 100 },<br>  { &quot;region&quot;: &quot;Asia&quot;, &quot;country&quot;: &quot;China&quot;, &quot;sales&quot;: 200 },<br>  { &quot;region&quot;: &quot;Europe&quot;, &quot;country&quot;: &quot;Germany&quot;, &quot;sales&quot;: 150 }<br>]</pre><p><strong>Output</strong></p><pre>{<br>  &quot;Asia&quot;: {<br>    &quot;India&quot;: 100,<br>    &quot;China&quot;: 200,<br>    &quot;total&quot;: 300<br>  },<br>  &quot;Europe&quot;: {<br>    &quot;Germany&quot;: 150,<br>    &quot;total&quot;: 150<br>  }<br>}</pre><p><strong>DWL Code</strong></p><pre>%dw 2.0<br>output application/json<br>fun getData(item : Array) =<br>item<br><br>---<br>(payload groupBy ((item, index) -&gt; item.region) mapObject ((value, key, index) -&gt; (key) : (value reduce ((item, accumulator = {}) -&gt; accumulator ++ {(item.country) : (item.sales)}<br>)<br>))) mapObject ((value, key, index) -&gt; (key) : (value) ++ {&quot;total&quot; : sum((value) pluck ((value, key, index) -&gt; value)) })</pre><p>9. Example</p><p><strong>Input</strong></p><pre>{<br>  &quot;data&quot;: [<br>    { &quot;id&quot;: 1, &quot;attributes&quot;: { &quot;firstName&quot;: &quot;Alex&quot;, &quot;lastName&quot;: &quot;Smith&quot; } },<br>    { &quot;id&quot;: 2, &quot;attributes&quot;: { &quot;firstName&quot;: &quot;John&quot;, &quot;lastName&quot;: &quot;Doe&quot; } }<br>  ],<br>  &quot;meta&quot;: { &quot;page&quot;: 1, &quot;size&quot;: 2 }<br>}</pre><p><strong>Output</strong></p><pre>[<br>  { &quot;id&quot;: 1, &quot;fullName&quot;: &quot;Alex Smith&quot; },<br>  { &quot;id&quot;: 2, &quot;fullName&quot;: &quot;John Doe&quot; }<br>]</pre><p><strong>DWL Code</strong></p><pre><br>%dw 2.0<br>output application/json<br>---<br>payload.data map ((item, index) -&gt; {<br>    &quot;id&quot; : item.id,<br>    &quot;fullname&quot; : item.attributes.firstName ++ item.attributes.lastName<br>})</pre><p>10. Example<br><strong>Input</strong></p><pre> [<br>  { &quot;month&quot;: &quot;Jan&quot;, &quot;sales&quot;: 100, &quot;profit&quot;: 20 },<br>  { &quot;month&quot;: &quot;Feb&quot;, &quot;sales&quot;: 150, &quot;profit&quot;: 30 }<br>]</pre><p><strong>output</strong></p><pre>{<br>  &quot;sales&quot;: { &quot;Jan&quot;: 100, &quot;Feb&quot;: 150 },<br>  &quot;profit&quot;: { &quot;Jan&quot;: 20, &quot;Feb&quot;: 30 }<br>}</pre><p>DWL Code</p><pre>%dw 2.0<br>output application/json<br>fun createSalesArrayByMonth(monthInput : String) =<br>(<br>    (monthInput) : (payload filter ((item, index) -&gt; item.month  == monthInput)).sales joinBy  &quot;&quot;<br>)<br>fun createProfitArrayByMonth(monthInput : String) =<br>(<br>    (monthInput) : (payload filter ((item, index) -&gt; item.month  == monthInput)).profit joinBy  &quot;&quot;<br>)<br>---<br>{<br>    &quot;SALES&quot;: (payload map ((item, index) -&gt; createSalesArrayByMonth(item.month)) reduce ((item, accumulator = {}) -&gt;  accumulator ++ item)),<br>    &quot;PROFIT&quot; : (payload map ((item, index) -&gt; createProfitArrayByMonth(item.month)) reduce ((item, accumulator = {}) -&gt;  accumulator ++ item)),<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46e591603a3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JWT Policy enforcement , Rate Limiting , IP White Listing — Using Mulesoft|API Security|Cloudhub 2.0]]></title>
            <link>https://medium.com/@biltughatal/jwt-policy-enforcement-rate-limiting-ip-white-listing-using-mulesoft-api-security-cloudhub-2-0-06f53819541c?source=rss-a2355dd34e7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/06f53819541c</guid>
            <dc:creator><![CDATA[Arindam Goswami]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 09:36:22 GMT</pubDate>
            <atom:updated>2025-06-22T16:05:30.034Z</atom:updated>
            <content:encoded><![CDATA[<h3>JWT Policy enforcement , Rate Limiting , IP White Listing — Using Mulesoft|API Security|Cloudhub 2.0</h3><p>This Tutorial is all about how to do JWT Policy Enforcement in API manager with in sample raml based project. This is helpful when applying policy using API Manager is anypoint platform.</p><p>The below policy has been applied.</p><ul><li>JWT Policy Enforcement</li><li>IP White Listing</li><li>Rate Limiting</li></ul><h3>Perquisites</h3><ul><li>Anypoint Studeio 7.21 (Java 17 Compatible default)</li><li>Java 17</li><li>Anypoint Platform account</li><li>SOAPUI + POSTMAN</li><li>Maven</li></ul><h3>Please go through the Video Tutorial for understanding the concept</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FoELLnJvjokw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DoELLnJvjokw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FoELLnJvjokw%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4834d486c586fa19095c8328e9b049e/href">https://medium.com/media/d4834d486c586fa19095c8328e9b049e/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/0*4a870bYD0rTR4uaM.png" /></figure><p>JWT Authentication Process</p><h3>There are two part of the Authentication</h3><ul><li>Client 1st call the Auth Provider to get the Token by passing the cient ID , client secret and Grant_type to the auth provider.</li><li>Client calls the actuall resource server endpoint URL with the Token.</li><li>Resource server then call the Auth provider to verify the token</li><li>If the token is valid then , then 200 response sent back to client</li><li>If token is invalid , error response sent back to client</li><li>I am adding the RAML file details here</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WEq3Qz_Me3hGriYx.png" /></figure><ul><li>RAML API Security files are mentioned below.</li><li>jwt-token.raml</li></ul><pre>#%RAML 1.0 SecurityScheme<br>type: x-jwt<br>description: |<br>      This API uses JWT for authentication. Pass the token in the Authorization header as &quot;Bearer {token}&quot;.<br>describedBy:<br>      headers:<br>        Authorization:<br>          description: |<br>            JWT access token in the format &quot;Bearer {token}&quot;.<br>          type: string<br>          required: true<br>          example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...<br>      responses:<br>        401:<br>          description: |<br>            Unauthorized. JWT is missing, invalid, or expired.</pre><h3>oauth2.raml</h3><pre>#%RAML 1.0 SecurityScheme<br>type: OAuth 2.0<br>description: |<br>      This API is secured using OAuth 2.0. Obtain an access token and include it in the Authorization header as &quot;Bearer {token&quot;.<br>describedBy:<br>      headers:<br>        Authorization:<br>          description: |<br>            Used to send the OAuth 2.0 access token. Format: &quot;Bearer {token}&quot;.<br>          type: string<br>          required: true<br>          example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...<br>      responses:<br>        401:<br>          description: |<br>            Unauthorized. Access token is missing, invalid, or expired.<br>        403:<br>          description: |<br>            Forbidden. The access token does not have the required scopes or permissions.<br>settings:<br>      authorizationUri: https://auth.example.com/oauth2/authorize<br>      accessTokenUri: https://auth.example.com/oauth2/token<br>      authorizationGrants: [ authorization_code, client_credentials ]<br>      scopes: [ read, write, admin ]</pre><h3>basic-auth-details.xml</h3><pre>#%RAML 1.0 SecurityScheme<br>type: Basic Authentication<br>description: |<br>      Basic Authentication using username and password.<br>describedBy:<br>      headers:<br>        Authorization:<br>          description: |<br>            Standard HTTP Basic Authentication header. Value must be &quot;Basic base64(username:password)&quot;.<br>          type: string<br>          required: true<br>      responses:<br>        401:<br>          description: Unauthorized. Invalid or missing credentials.</pre><h3>Trait File as below.</h3><pre>#%RAML 1.0 Trait<br>usage: Apply to collection GET endpoints to support pagination.<br>queryParameters:<br>  page:<br>    type: integer<br>    required: false<br>    minimum: 1<br>    default: 1<br>    description: The page number to retrieve (starting from 1).<br>    example: 2<br>  pageSize:<br>    type: integer<br>    required: false<br>    minimum: 1<br>    maximum: 100<br>    default: 20<br>    description: The number of items per page.<br>    example: 10<br>responses:<br>  200:<br>    headers:<br>      X-Total-Count:<br>        type: integer<br>        description: Total number of items available.<br>        example: 57<br>      X-Total-Pages:<br>        type: integer<br>        description: Total number of pages available.<br>        example: 6<br>      X-Current-Page:<br>        type: integer<br>        description: The current page number.<br>        example: 2<br>      X-Page-Size:<br>        type: integer<br>        description: The number of items per page in this response.<br>        example: 10</pre><h3>TYPE RAML files are mentioned below</h3><h3>Booking.raml</h3><pre>#%RAML 1.0 DataType<br>type: object<br>properties:<br>      id:<br>        type: integer<br>        description: Unique booking identifier<br>        example: 1001<br>      hotelId:<br>        type: integer<br>        description: ID of the booked hotel<br>        example: 101<br>      guestName:<br>        type: string<br>        required: true<br>        description: Name of the guest<br>        example: &quot;Alice Smith&quot;<br>      checkInDate:<br>        type: date-only<br>        required: true<br>        description: Check-in date<br>        example: 2024-07-01<br>      checkOutDate:<br>        type: date-only<br>        required: true<br>        description: Check-out date<br>        example: 2024-07-05<br>      rooms:<br>        type: integer<br>        required: true<br>        minimum: 1<br>        description: Number of rooms booked<br>        example: 2<br>      status:<br>        type: string<br>        enum: [ confirmed, cancelled, pending ]<br>        description: Booking status<br>        example: confirmed<br>example:<br>      id: 1001<br>      hotelId: 101<br>      guestName: &quot;Alice Smith&quot;<br>      checkInDate: 2024-07-01<br>      checkOutDate: 2024-07-05<br>      rooms: 2<br>      status: confirmed</pre><h3>BookingInput.raml</h3><pre>#%RAML 1.0 DataType<br> type: object<br> properties:<br>      hotelId:<br>        type: integer<br>        required: true<br>      guestName:<br>        type: string<br>        required: true<br>      checkInDate:<br>        type: date-only<br>        required: true<br>      checkOutDate:<br>        type: date-only<br>        required: true<br>      rooms:<br>        type: integer<br>        required: true<br>        minimum: 1<br> example:<br>      hotelId: 101<br>      guestName: &quot;Alice Smith&quot;<br>      checkInDate: 2024-07-01<br>      checkOutDate: 2024-07-05<br>      rooms: 2</pre><h3>ErrorResponse.raml</h3><pre>#%RAML 1.0 DataType<br>  type: object<br>  properties:<br>      message:<br>        type: string<br>        required: true<br>        description: Error message<br>  example:<br>      message: &quot;Resource not found.&quot;</pre><h3>Hotel.raml</h3><pre>#%RAML 1.0 DataType<br>type: object<br>description: Data type for hotel<br>properties:<br>      id:<br>        type: integer<br>        description: Unique hotel identifier<br>        example: 101<br>      name:<br>        type: string<br>        required: true<br>        description: Name of the hotel<br>        example: &quot;Grand Plaza&quot;<br>      address:<br>        type: string<br>        required: true<br>        description: Address of the hotel<br>        example: &quot;123 Main St, Cityville&quot;<br>      rating?:<br>        type: number<br>        format: float<br>        minimum: 1<br>        maximum: 5<br>        description: Hotel rating (1-5 stars)<br>        example: 4.5<br>      amenities?:<br>        type: array<br>        items: string<br>        description: List of amenities<br>        example: [ &quot;wifi&quot;, &quot;pool&quot;, &quot;gym&quot; ]<br>example:<br>      id: 101<br>      name: &quot;Grand Plaza&quot;<br>      address: &quot;123 Main St, Cityville&quot;<br>      rating: 4.5<br>      amenities: [ &quot;wifi&quot;, &quot;pool&quot;, &quot;gym&quot; ]<br>additionalProperties: false</pre><h3>HotelInput.raml</h3><pre>#%RAML 1.0 DataType<br>type: object<br>properties:<br>      name:<br>        type: string<br>        required: true<br>      address:<br>        type: string<br>        required: true<br>      rating?:<br>        type: number<br>        format: float<br>        minimum: 1<br>        maximum: 5<br>      amenities?:<br>        type: array<br>        items: string<br>example:<br>      name: &quot;Grand Plaza&quot;<br>      address: &quot;123 Main St, Cityville&quot;<br>      rating: 4.5<br>      amenities: [ &quot;wifi&quot;, &quot;pool&quot;, &quot;gym&quot; ]<br>additionalProperties: false</pre><h3>order-api-security.raml</h3><pre>#%RAML 1.0<br>title: order-api-security<br>description: &quot;This api contain the hotel booking details&quot;<br>mediaType: <br>- application/json<br>protocols:<br>  - HTTP<br>version: v1<br>baseUri: http://api.example.com/hotel-booking/v1<br>securitySchemes:<br>  basicAuth: !include AUTH/basic-auth-details.raml<br>  oAuth2: !include AUTH/oauth2.raml<br>  jwtToken: !include AUTH/jwt-token.raml<br>traits:<br>  paginated: !include TRAIT/trait.raml<br><br>types:<br>  Hotel: !include TYPE/Hotel.raml<br>  HotelInput: !include TYPE/HotelInput.raml<br>  Booking: !include TYPE/Booking.raml<br>  BookingInput: !include TYPE/BookingInput.raml<br>  ErrorResponse: !include TYPE/ErrorResponse.raml<br><br>securedBy: [ basicAuth, oAuth2,jwtToken]<br><br>/hotels:<br>  get:<br>    description: Get a paginated list of hotels.<br>    is: [ paginated ]<br>    responses:<br>      200:<br>        description: Successful response with a list of hotels.<br>        body:<br>          application/json:<br>            type: Hotel[]<br>            example:<br>              - id: 101<br>                name: &quot;Grand Plaza&quot;<br>                address: &quot;123 Main St, Cityville&quot;<br>                rating: 4.5<br>                amenities: [ &quot;wifi&quot;, &quot;pool&quot;, &quot;gym&quot; ]<br>              - id: 102<br>                name: &quot;Ocean View&quot;<br>                address: &quot;456 Beach Rd, Seaside&quot;<br>                rating: 4.0<br>                amenities: [ &quot;wifi&quot;, &quot;spa&quot; ]<br>  post:<br>    description: Create a new hotel.<br>    body:<br>      application/json:<br>        type: HotelInput<br>        example:<br>          name: &quot;Grand Plaza&quot;<br>          address: &quot;123 Main St, Cityville&quot;<br>          rating: 4.5<br>          amenities: [ &quot;wifi&quot;, &quot;pool&quot;, &quot;gym&quot; ]<br>    responses:<br>      201:<br>        description: Hotel created successfully.<br>        body:<br>          application/json:<br>            type: Hotel<br>            example:<br>              id: 103<br>              name: &quot;Mountain Retreat&quot;<br>              address: &quot;789 Hilltop Ave, Mountainview&quot;<br>              rating: 5<br>              amenities: [ &quot;wifi&quot;, &quot;sauna&quot; ]<br><br>/hotels/{hotelId}:<br>  uriParameters:<br>    hotelId:<br>      type: integer<br>      required: true<br>      description: Unique hotel identifier<br>      example: 101<br>  get:<br>    description: Get details of a specific hotel.<br>    responses:<br>      200:<br>        description: Successful response with hotel details.<br>        body:<br>          application/json:<br>            type: Hotel<br>            example:<br>              id: 101<br>              name: &quot;Grand Plaza&quot;<br>              address: &quot;123 Main St, Cityville&quot;<br>              rating: 4.5<br>              amenities: [ &quot;wifi&quot;, &quot;pool&quot;, &quot;gym&quot; ]<br>  put:<br>    description: Update details of a specific hotel<br>    body:<br>      application/json:<br>        type: HotelInput<br>        example:<br>          name: &quot;Grand Plaza Updated&quot;<br>          address: &quot;123 Main St, Cityville&quot;<br>          rating: 4.7<br>          amenities: [ &quot;wifi&quot;, &quot;pool&quot;, &quot;gym&quot;, &quot;spa&quot; ]<br>    responses:<br>      200:<br>        description: Hotel updated successfully.<br>        body:<br>          application/json:<br>            type: Hotel<br>            example:<br>              id: 101<br>              name: &quot;Grand Plaza Updated&quot;<br>              address: &quot;123 Main St, Cityville&quot;<br>              rating: 4.7<br>              amenities: [ &quot;wifi&quot;, &quot;pool&quot;, &quot;gym&quot;, &quot;spa&quot; ]<br>  delete:<br>    description: Delete a specific hotel.<br>    responses:<br>      204:<br>        description: Hotel deleted successfully. No content.</pre><ul><li>Now publish to exchange<br>Implement the project in local by selecting the below option for scaffolding purpose as shown below</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zL0mbmfr3la4wqjn.png" /></figure><ul><li>For Implementation and auto discovery I hope you are already aware , I am not going to the detail.<br>If you have any question , check reference link.</li><li>If all good the deploy the project in cloudhub 2.0 and it should be shown as running.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pCfWOZX6E-opjM7G.png" /></figure><ul><li>Now login/signup to Auth0 provider to get the JWCKS URL<br>login to Auth0 &gt; My profile &gt; Applications &gt; Settings &gt; endpoints<br>Copy the JWCKS URL and add it in the JWT policy configuration in API manager as shown below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ou-AvknrO3Vin7Ze.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XyRlkyzFX0M9y8E6.png" /></figure><ul><li>The Next Part is to get the Token, below 4 information required to get the Token. I have modified the client secret for security purpose.</li></ul><pre>{<br>    &quot;client_id&quot;:&quot;j5WYzDUApVpIT9QbXQ6IHHXDcAHYrvP1&quot;,<br>    &quot;client_secret&quot;:&quot;hnQmxxsxsxsxsxsoL73qxqOmX1fDV37SN4wYjEMhhkj05d-xlR4oeKExY8PFDYm39iL&quot;,<br>    &quot;audience&quot;:&quot;https://dev-0qcnlhjb6rx4ckcw.us.auth0.com/api/v2/&quot;,<br>    &quot;grant_type&quot;:&quot;client_credentials&quot;<br>  }</pre><ul><li>The next step is to call the actual API using the Token , if the token is valid you will get desired response</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iNev0vBLKHp1cPGT.png" /></figure><ul><li>Incase Token is Invalid you will be seeing the 401 response</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*A8qpBuoqmCN3IDBp.png" /></figure><ul><li>IP Allow List policy and Rate Limiting is simple please go through the video for this.</li><li>If you like this tutorial plz like it and ask me question if you have any.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06f53819541c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Mule Hello World project Application in Cloudhub 2.0 wiith Autodis]]></title>
            <link>https://medium.com/@biltughatal/deploy-mule-hello-world-project-application-in-cloudhub-2-0-wiith-autodis-cebc9bae9560?source=rss-a2355dd34e7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/cebc9bae9560</guid>
            <category><![CDATA[cloudhub]]></category>
            <category><![CDATA[mule4]]></category>
            <category><![CDATA[auto-discovery]]></category>
            <dc:creator><![CDATA[Arindam Goswami]]></dc:creator>
            <pubDate>Fri, 13 Jun 2025 11:56:33 GMT</pubDate>
            <atom:updated>2025-06-13T11:58:36.097Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploy Mule Hello World project Application in Cloudhub 2.0 wiith Auto Discovery</h3><p><strong>Here I am going to demonstrate how to deploy a small hello world application in Cloudhub 2.0.</strong></p><p>I have also shown here how to do the auto discovery and passing client id and client secret.<br>Please go through the video before going through the blog.</p><h3>The key points to remember here</h3><ul><li>Mule App Runtime version — 4.9.0</li><li>Mule Maven Plugin — 4.3.0</li><li>Cloud Hub version — 2.0</li></ul><h3>Perquisite</h3><ul><li>Anypoint Studio — Version (7.21.0) — Equipped with Java 17</li><li>Java version — 1.17</li><li>Anypoint platform login (<a href="https://anypoint.mulesoft.com/cloudhub/#/console/home/applications">https://anypoint.mulesoft.com/cloudhub/#/console/home/applications</a>)</li></ul><p>Please go through the video before going through the tutorial.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDmV6rBru0mg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDmV6rBru0mg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FDmV6rBru0mg%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7545c55a5dbd4d2144ca6e9c733f7cfe/href">https://medium.com/media/7545c55a5dbd4d2144ca6e9c733f7cfe/href</a></iframe><h3>Please follow the steps for the entire process.</h3><ul><li>Project Creation — Just create a normal Mule project in Anypoint Studio</li><li>1st connect with the exchange from the anypoint studio as shown below</li><li>Now lets explorer pom.xml please find the section mentioned</li></ul><p>XML</p><pre>&lt;distributionManagement&gt;<br>		&lt;repository&gt;<br>			&lt;id&gt;anypoint-exchange-v3&lt;/id&gt;<br>			&lt;name&gt;anypoint-exchange-v3&lt;/name&gt;<br>			&lt;url&gt;https://maven.anypoint.mulesoft.com/api/v3/organizations/4c1443f5-bb8b-4313-a009-dc4ac7028224/maven&lt;/url&gt;<br>			&lt;layout&gt;default&lt;/layout&gt;<br>		&lt;/repository&gt;<br>	&lt;/distributionManagement&gt;</pre><p>The aforesaid section used to connect with exchange , Please note that organisation id can be found in Anypoint platform as shown below.</p><ul><li>The below plugin section needed to be added as shown below.</li></ul><p>XML</p><pre>&lt;plugin&gt;<br>				&lt;groupId&gt;org.mule.tools.maven&lt;/groupId&gt;<br>				&lt;artifactId&gt;mule-maven-plugin&lt;/artifactId&gt;<br>				&lt;version&gt;4.3.0&lt;/version&gt;<br>				&lt;extensions&gt;true&lt;/extensions&gt;<br>				&lt;configuration&gt;<br>					&lt;cloudhub2Deployment&gt;<br>						&lt;uri&gt;https://anypoint.mulesoft.com&lt;/uri&gt;<br>						&lt;provider&gt;MC&lt;/provider&gt;<br>						&lt;!--Mule Container --&gt;<br>						&lt;environment&gt;Sandbox&lt;/environment&gt;<br>						&lt;target&gt;Cloudhub-US-East-2&lt;/target&gt;<br>						&lt;!--shared or private space deployment target --&gt;<br>						&lt;muleVersion&gt;4.9.0&lt;/muleVersion&gt;<br>						&lt;!-- mule version should be greater than 4.3.0 --&gt;<br>						&lt;!-- &lt;server&gt;anypoint-exchange-v3&lt;/server&gt; --&gt;<br>						&lt;!--reference to Maven server with Anypoint Creds --&gt;<br>						&lt;username&gt;bitughatalG&lt;/username&gt;<br>						&lt;password&gt;*******&lt;/password&gt;<br>						&lt;applicationName&gt;employee-details&lt;/applicationName&gt;<br>						&lt;replicas&gt;1&lt;/replicas&gt;<br>						&lt;vCores&gt;0.1&lt;/vCores&gt;<br>						&lt;deploymentSettings&gt;<br>							&lt;generateDefaultPublicUrl&gt;true&lt;/generateDefaultPublicUrl&gt;<br>						&lt;/deploymentSettings&gt;<br>					&lt;/cloudhub2Deployment&gt;<br>				&lt;/configuration&gt;<br>			&lt;/plugin&gt;</pre><p>lets explain each of the component in cloudhub 2.0</p><ol><li>URL — <a href="https://anypoint.mulesoft.com/">https://anypoint.mulesoft.com</a></li><li>environment — the environment you want o deploy the</li><li>target — The region your cloud hub is deployed</li><li>muleVersion — 4.9.0</li><li>username — your anypoint platform login Username</li><li>password — Your anypoint platform login password.</li><li>applicationName — your application name</li><li>replicas — only 1 instance of your service will run</li><li>vCores — 0.1</li><li>deploymentSettings — true</li></ol><p>Please note that .1 is sufficient if the application is dealing with get and post call with light weight data.<br>You can create maximum 10 worker (instance using vcore size).</p><ul><li>Now Lets deploy on to the server</li></ul><p>We also need to pass below client id and client secret and api auto discovery id so that API manager recognises this.</p><pre>anypoint.platform.analytics_base_uri=https://analytics-ingest.anypoint.mulesoft.com/</pre><pre>anypoint.platform.client_id=d475697855da426bbd9cd5b830d8ed61</pre><pre>anypoint.platform.api.id= 20361142</pre><pre>anypoint.platform.client_secret=88c3cb95a24f43XXXXXXX</pre><pre>anypoint.platform.base.uri=https://anypoint.mulesoft.com/</pre><p>you must need to set the port as ${http.port} and in config.properties the change required is</p><p><strong>http.port = 8081</strong></p><p>After deploying you can see the Run time Manager the appplication shows with Green</p><p>Now we are all set let run it from soap UI.</p><p>Thanks for reading my article . Any Question Please let me know</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cebc9bae9560" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[This article demonstrate how to alter the xml using Mule4]]></title>
            <link>https://medium.com/@biltughatal/this-article-demonstrate-how-to-alter-the-xml-using-mule4-9cead081f698?source=rss-a2355dd34e7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cead081f698</guid>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[dataweave]]></category>
            <dc:creator><![CDATA[Arindam Goswami]]></dc:creator>
            <pubDate>Wed, 26 Mar 2025 21:22:14 GMT</pubDate>
            <atom:updated>2025-03-26T21:54:58.138Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Problem Statement:<br> Alter/Shifting the position of the xml Tag without having a single iteration</strong></p><p>To overcome this problem , we have come up with a mule flow where taking taking an input xml as request and producing the same output but only difference is that the Xml Tag position has been altered.</p><p><strong>Please go through this youtube video once.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FVNmors18orY%3Fstart%3D238%26feature%3Doembed%26start%3D238&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVNmors18orY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FVNmors18orY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ddd0a5a45277bd5881e4993c5065b46/href">https://medium.com/media/9ddd0a5a45277bd5881e4993c5065b46/href</a></iframe><pre>Input Xml : --<br><br>&lt;Report&gt;<br>    &lt;Order&gt;<br>      &lt;id&gt;2121212121&lt;/id&gt;<br>      &lt;name&gt;Arindam Goswami&lt;/name&gt;<br>      &lt;Address&gt;Kolkata&lt;/Address&gt;<br>      &lt;Amount&gt;1333.20&lt;/Amount&gt;<br>    &lt;/Order&gt;<br>      &lt;Order&gt;<br>      &lt;id&gt;2121212121&lt;/id&gt;<br>      &lt;name&gt;Arindam Goswami&lt;/name&gt;<br>      &lt;Address&gt;Kolkata&lt;/Address&gt;<br>      &lt;Amount&gt;1333.20&lt;/Amount&gt;<br>    &lt;/Order&gt;<br>      &lt;Order&gt;<br>      &lt;id&gt;2121212121&lt;/id&gt;<br>      &lt;name&gt;Arindam Goswami&lt;/name&gt;<br>      &lt;Address&gt;Kolkata&lt;/Address&gt;<br>      &lt;Amount&gt;1333.20&lt;/Amount&gt;<br>    &lt;/Order&gt;<br>  &lt;/Report&gt;</pre><p><strong>And the output payload as shown below -</strong></p><pre>&lt;?xml version=&#39;1.0&#39; encoding=&#39;UTF-8&#39;?&gt;<br>&lt;Report&gt;<br>  &lt;Order&gt;<br>    &lt;name&gt;Arindam Goswami&lt;/name&gt;<br>    &lt;id&gt;2121212121&lt;/id&gt;<br>    &lt;Amount&gt;1333.20&lt;/Amount&gt;<br>    &lt;Address&gt;Kolkata&lt;/Address&gt;<br>  &lt;/Order&gt;<br>  &lt;Order&gt;<br>    &lt;name&gt;Arindam Goswami&lt;/name&gt;<br>    &lt;id&gt;2121212121&lt;/id&gt;<br>    &lt;Amount&gt;1333.20&lt;/Amount&gt;<br>    &lt;Address&gt;Kolkata&lt;/Address&gt;<br>  &lt;/Order&gt;<br>  &lt;Order&gt;<br>    &lt;name&gt;Arindam Goswami&lt;/name&gt;<br>    &lt;id&gt;2121212121&lt;/id&gt;<br>    &lt;Amount&gt;1333.20&lt;/Amount&gt;<br>    &lt;Address&gt;Kolkata&lt;/Address&gt;<br>  &lt;/Order&gt;<br>&lt;/Report&gt;</pre><p>The difference between those two payload is that — the order sequence is different.</p><p>In the input payload the order is — id , name ,Address ,amount<br> The output payload the order is — name ,id ,amount , Address</p><p>Please have a look at the mule flow , we have used a https inbound connector with basic authentication together and after that uses a DWL 2.0 which is used to alter the payload.</p><p>See the mule flow mentioned below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*YGDZCfoFnKzyi0C6q8CSCA.png" /></figure><p>Note once you added the <strong>authorisation filter </strong>component , the below pom dependency automatically added in the pom.xml.</p><pre>&lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.modules&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-spring-module&lt;/artifactId&gt;<br>   &lt;version&gt;1.3.6&lt;/version&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.springframework&lt;/groupId&gt;<br>   &lt;artifactId&gt;spring-context&lt;/artifactId&gt;<br>   &lt;version&gt;5.3.2&lt;/version&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.springframework&lt;/groupId&gt;<br>   &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;<br>   &lt;version&gt;5.3.2&lt;/version&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;<br>   &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;<br>   &lt;version&gt;5.4.2&lt;/version&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;<br>   &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;<br>   &lt;version&gt;5.4.2&lt;/version&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.springframework&lt;/groupId&gt;<br>   &lt;artifactId&gt;spring-core&lt;/artifactId&gt;<br>   &lt;version&gt;5.3.2&lt;/version&gt;<br>  &lt;/dependency&gt;</pre><p>Please see the global elements, the spring config and spring security manager needed to be added in order to achieve the basic authentication in mule using spring bean.</p><p>Please be noted that spring config contains reference of <strong>beans.xml.</strong><br> And spring security manager<strong> </strong>contains the reference authenticationManager which is injected in the beans.xml.</p><p>Please see the global configuration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*X3FsUUk1DjQmFF_gpKXBZA.png" /></figure><p>We need to also mention the beans.xml in the <strong>mule-artifact.json</strong> in order to tell mule about the presence of beans.xml</p><pre>{<br>    &quot;name&quot;: &quot;MuleForCsv&quot;,<br>    &quot;minMuleVersion&quot;: &quot;4.2.2&quot;,<br>    &quot;classLoaderModelLoaderDescriptor&quot;: {<br>        &quot;id&quot;: &quot;mule&quot;,<br>        &quot;attributes&quot;: {<br>            &quot;exportedResources&quot;: [<br>                &quot;beans.xml&quot;<br>            ]<br>        }<br>    }<br>  }</pre><p>Please find the beans.xml which contains the user name and password according to the role.</p><pre>&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;<br>  xmlns:context=&quot;http://www.springframework.org/schema/context&quot;<br>  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;<br>  xmlns:jdbc=&quot;http://www.springframework.org/schema/jdbc&quot;<br>  xmlns:ss=&quot;http://www.springframework.org/schema/security&quot;<br><br> xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans<br>     http://www.springframework.org/schema/beans/spring-beans-4.2.xsd<br>     http://www.springframework.org/schema/jdbc<br>     http://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd<br>     http://www.springframework.org/schema/context<br>     http://www.springframework.org/schema/context/spring-context-4.2.xsd<br>      http://www.springframework.org/schema/security<br>      http://www.springframework.org/schema/security/spring-security-5.4.xsd&quot;&gt;<br><br>  &lt;ss:authentication-manager alias=&quot;authenticationManager&quot;&gt;<br>    &lt;ss:authentication-provider&gt;<br>      &lt;ss:user-service id=&quot;userService&quot;&gt;<br>        &lt;ss:user name=&quot;admin&quot; password=&quot;{noop}admin&quot; authorities=&quot;ROLE_ADMIN&quot; /&gt;<br>        &lt;ss:user name=&quot;joe&quot; password=&quot;{noop}secret&quot; authorities=&quot;ROLE_DEV&quot; /&gt;<br>      &lt;/ss:user-service&gt;<br>    &lt;/ss:authentication-provider&gt;<br>  &lt;/ss:authentication-manager&gt;<br><br>&lt;/beans&gt;</pre><p>While calling this through soap UI we need to pass the user name and password.<br><strong> {noop} means password here is not been encrypted.</strong></p><p>Now let me explain the data weave code.</p><pre>&lt;ee:transform doc:name=&quot;shift-tag-in-xml&quot; doc:id=&quot;6905446b-6b9c-4b56-b4ab-2635adc33f33&quot; &gt;<br>   &lt;ee:message &gt;<br>    &lt;ee:set-payload &gt;&lt;![CDATA[%dw 2.0<br>output application/xml<br>var inputPayload = payload<br>var finalResponsePayload = Report: {<br>    (inputPayload.Report mapObject {<br>        ($$) : ($ mapObject {<br>           ((($$) : $) if $$ as String != &quot;name&quot; and $$ as String != &quot;id&quot;<br>                          and $$ as String != &quot;Address&quot; and $$ as String !=                             &quot;Amount&quot;)<br>           <br>    }) ++  (&quot;name&quot; : $.name) ++ (&quot;id&quot; : $.id) ++ (&quot;Amount&quot; : $.Amount) ++ (&quot;Address&quot; : $.Address)<br><br>    })<br>}<br>---<br>finalResponsePayload]]&gt;&lt;/ee:set-payload&gt;<br>   &lt;/ee:message&gt;<br>  &lt;/ee:transform&gt;</pre><p>We all know mapObject works on an object , here</p><ul><li>$$ — the <strong>key</strong></li><li>$ — the <strong>value</strong>.</li></ul><ol><li>So line no 8 , $$ contains the Report as <strong>Key</strong> and</li><li>$ contains the entire Order Array as <strong>value</strong> (This is the value of Report Tag)</li></ol><p>Then goes to the 2nd part of the programme where , line no 9.</p><ul><li>$$ — all the key set of the order array e.g — id, name, amount , Address.</li><li>$ — All the values. e.g — Arindam Goswami , 2121212121 ,Kolkata etc.</li></ul><p>See line 12, we have reframed /alter the key position based on our need.<br> The revised order is — → name , id ,amount ,Address.</p><p>Please note that the if section is given so that the tag is not duplicated.</p><p>The output xml is mentioned as above.</p><p>All set now just Hit the SOAP UI to prove this.</p><p>Please find the Attached full mule code</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br><br>&lt;mule xmlns:ee=&quot;http://www.mulesoft.org/schema/mule/ee/core&quot; xmlns:xml-module=&quot;http://www.mulesoft.org/schema/mule/xml-module&quot;<br> xmlns:spring=&quot;http://www.mulesoft.org/schema/mule/spring&quot;<br> xmlns:tls=&quot;http://www.mulesoft.org/schema/mule/tls&quot; xmlns:http=&quot;http://www.mulesoft.org/schema/mule/http&quot; xmlns=&quot;http://www.mulesoft.org/schema/mule/core&quot; xmlns:doc=&quot;http://www.mulesoft.org/schema/mule/documentation&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd<br>http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd<br>http://www.mulesoft.org/schema/mule/tls http://www.mulesoft.org/schema/mule/tls/current/mule-tls.xsd<br>http://www.mulesoft.org/schema/mule/spring http://www.mulesoft.org/schema/mule/spring/current/mule-spring.xsd<br>http://www.mulesoft.org/schema/mule/xml-module http://www.mulesoft.org/schema/mule/xml-module/current/mule-xml-module.xsd<br>http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd&quot;&gt;<br> &lt;configuration-properties doc:name=&quot;Configuration properties&quot; doc:id=&quot;025a3944-f3da-4f42-87c5-753bd13b4966&quot; file=&quot;config.properties&quot; /&gt;<br> &lt;http:listener-config name=&quot;HTTP_Listener_config&quot; doc:name=&quot;HTTP Listener config&quot; doc:id=&quot;45534598-25a4-4456-a847-f832e6ef7c43&quot; &gt;<br>  &lt;http:listener-connection host=&quot;0.0.0.0&quot; port=&quot;8081&quot; protocol=&quot;HTTPS&quot;&gt;<br>   &lt;tls:context &gt;<br>    &lt;tls:key-store type=&quot;jks&quot; path=&quot;${keystore.path}&quot; keyPassword=&quot;changeit&quot; password=&quot;password&quot;/&gt;<br>   &lt;/tls:context&gt;<br>  &lt;/http:listener-connection&gt;<br> &lt;/http:listener-config&gt;<br> &lt;spring:config name=&quot;Spring_Config&quot; doc:name=&quot;Spring Config&quot; doc:id=&quot;d58f4c7d-caed-4cfe-ad84-8136d3356ca2&quot; files=&quot;beans.xml&quot;/&gt;<br> &lt;spring:security-manager doc:name=&quot;Spring Security manager&quot; doc:id=&quot;8437c57a-60d3-44f0-831d-a92340bd02c5&quot; &gt;<br>  &lt;spring:delegate-security-provider name=&quot;memory-provider&quot; delegate-ref=&quot;authenticationManager&quot; /&gt;<br> &lt;/spring:security-manager&gt;<br> &lt;xml-module:config name=&quot;XML_Config1&quot; doc:name=&quot;XML Config&quot; doc:id=&quot;92e840ef-87d4-4560-8c57-1601bc7961b7&quot; /&gt;<br> &lt;flow name=&quot;muleforcsvFlow&quot; doc:id=&quot;0bcc90ce-290c-4654-85d2-fd06bdcdfe9c&quot; &gt;<br>  &lt;http:listener doc:name=&quot;Listener&quot; doc:id=&quot;654aadd8-0654-4d3c-ae3d-d7509fc612f5&quot; config-ref=&quot;HTTP_Listener_config&quot; path=&quot;/Mule4Report&quot;/&gt;<br>  &lt;http:basic-security-filter doc:name=&quot;Basic security filter&quot; doc:id=&quot;c0b6a378-9091-4a2a-9151-e140ed972b84&quot; realm=&quot;mule-realm&quot;/&gt;<br>  &lt;spring:authorization-filter doc:name=&quot;Authorization filter&quot; doc:id=&quot;e203c02b-4de6-4a8b-8498-703e47986134&quot; requiredAuthorities=&quot;ROLE_ADMIN&quot;/&gt;<br>  &lt;ee:transform doc:name=&quot;shift-tag-in-xml&quot; doc:id=&quot;6905446b-6b9c-4b56-b4ab-2635adc33f33&quot; &gt;<br>   &lt;ee:message &gt;<br>    &lt;ee:set-payload &gt;&lt;![CDATA[%dw 2.0<br>output application/xml<br>var inputPayload = payload<br>var finalResponsePayload = Report: {<br>    (inputPayload.Report mapObject {<br>        ($$) : ($ mapObject {<br>           ((($$) : $) if $$ as String != &quot;name&quot; and $$ as String != &quot;id&quot;<br>                          and $$ as String != &quot;Address&quot; and $$ as String !=                             &quot;Amount&quot;)<br>           <br>    }) ++  (&quot;name&quot; : $.name) ++ (&quot;id&quot; : $.id) ++ (&quot;Amount&quot; : $.Amount) ++ (&quot;Address&quot; : $.Address)<br><br>    })<br>}<br>---<br>finalResponsePayload]]&gt;&lt;/ee:set-payload&gt;<br>   &lt;/ee:message&gt;<br>  &lt;/ee:transform&gt;<br>  &lt;error-handler &gt;<br>   &lt;on-error-propagate enableNotifications=&quot;true&quot; logException=&quot;true&quot; doc:name=&quot;On Error Propagate&quot; doc:id=&quot;1d7b32bd-1576-4522-bc91-a8b45c85fe01&quot; type=&quot;HTTP:BASIC_AUTHENTICATION&quot;&gt;<br>    &lt;logger level=&quot;ERROR&quot; doc:name=&quot;basic-auth-error&quot; doc:id=&quot;14615039-fda5-4cdc-8920-9d9fd872342c&quot; message=&quot;Unable to validate client reqest&quot;/&gt;<br>   &lt;/on-error-propagate&gt;<br>  &lt;/error-handler&gt;<br> &lt;/flow&gt;<br>&lt;/mule&gt;</pre><p>The entire mule project is available in the below link. The soap UI project also can be found there.</p><p><a href="https://github.com/ArindamCts007/Mule4ReportCsv.git">https://github.com/ArindamCts007/Mule4ReportCsv.git</a></p><p>Note: We have used one way SSL here to know more about one and two way ssl. Please see the below link.</p><p><a href="https://medium.com/@biltughatal/one-way-and-two-way-ssl-using-mule-4-mule-esb-37d4809507ea">One way And Two way SSL using Mule 4 (Mule ESB)</a></p><p>Hope you enjoyed this article , if you have any question , Please comment here.</p><p><a href="https://www.linkedin.com/in/arindam-goswami-66673b48/">https://www.linkedin.com/in/arindam-goswami-66673b48/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cead081f698" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One way And Two way SSL using Mule 4 (Mule ESB)]]></title>
            <link>https://medium.com/@biltughatal/one-way-and-two-way-ssl-using-mule-4-mule-esb-37d4809507ea?source=rss-a2355dd34e7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/37d4809507ea</guid>
            <dc:creator><![CDATA[Arindam Goswami]]></dc:creator>
            <pubDate>Sun, 06 Oct 2024 08:25:52 GMT</pubDate>
            <atom:updated>2024-11-10T20:43:12.030Z</atom:updated>
            <content:encoded><![CDATA[<p>Here I will show how to implement the one way SSL using Mule 4<br>With how to create a keystore jks and Truststore jks.<br>After that will demonstrate on how to implement Two way SSL using Mule 4 . With changes to the Keystore and Trust Store.<br>I hope you have the basic understanding of how one way and Two way SSL works. If you have any question then please refer to my earlier tutorial on one way and Two way SSl below.</p><p><a href="https://medium.com/@biltughatal/one-way-and-two-way-ssl-how-it-works-d04242e4e839">One Way and Two way SSL | How it works</a></p><p><strong>One way SSL using Mule 4</strong></p><p>For one way SSL , we should keep in mind that in that case client only validates the server , but server does not validates the client.<br>Means client has to trust server certificate.<br>1st I am exposing a simple HTTPS service using Mule 4, as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Re1jW2DjhILcy9mnvIGpAA.png" /></figure><p>As you can see I have created a https configuration and just referred the keystore.jks.Use the below command , keystore contains server certfificate.</p><p><strong><em>keytool -genkey -alias mykey -keyalg RSA -keypass changeit -keystore keystore.jks</em></strong></p><p>One you run the below command in a specified folder keystore.jks file created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Re1jW2DjhILcy9mnvIGpAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AU7V_U4b0ONMUMIuj0CB3Q.png" /></figure><p>The project is checked in GIT HUB.</p><p><a href="https://github.com/ArindamCts007/Mule4SSLProject.git">https://github.com/ArindamCts007/Mule4SSLProject.git</a></p><p>The flow is simple as mentioned above. Just Exposed one endpoint with basic authentication and out put one simple text. Now let me run the project this endpoint listening on port 8083.<br>While runing from post man , you need to make sure enable the SSL verification on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L334-NWuyp0PZOSnO17OHA.png" /></figure><p>Now server is started and my endpoints are initialised.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kaUDiMCRZh31Gbvz0EwrwQ.png" /></figure><p>Initially when you hit the application from the server then , you get the below error as mentioned below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Wg1FTQrC0UNa_rhKHTc1A.png" /></figure><p>Beacuse in client side the server side certificate is not been trusted.<br>for 1 way ssl , where client certificate is not been validated no need to make SSL certificate validation to be on.</p><p>See the response came throgh soap UI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SWZRMlBFJNKpXBXnHYax6w.png" /></figure><p>Now Let’s test the Two way SSL.As I mentioned already two way ssl client certificate is getting validated in server side additionally.<br>I have configured HHTP listener with TrustStore configuration. where I am trusting client certificate. I am using below command.</p><pre>keytool -import -file mykey2.cer  -alias firstCA -keystore myTrustStore</pre><p>I have created the .cer file from my keystore file using the keystore explorer.<br>Now while calling the endpoint I have referrred truststore from soap UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rCJtKVrHDvcdgOZGMbdnZQ.png" /></figure><p>Now hitting the endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYy8NkYnDAarSKPcyXl38g.png" /></figure><p>This is a tipical example where client also validated.</p><p>To prove that , I have simply used chrome and hit the earlier endpoint <br>which is one way ssl.</p><p>It is working without any issu</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pFGMeGsX9CvnEcRbqVeeFQ.png" /></figure><p>But when I tried hit the URL with 2 way SSL bind , it is throwing error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H3JIjjGAqbMEfOXLyiM85A.png" /></figure><p>Hope I have explained , the consepts. Please let me know if you have any question through comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37d4809507ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Way and Two way SSL | How it works]]></title>
            <link>https://medium.com/@biltughatal/one-way-and-two-way-ssl-how-it-works-d04242e4e839?source=rss-a2355dd34e7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d04242e4e839</guid>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[mule]]></category>
            <category><![CDATA[mule4]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Arindam Goswami]]></dc:creator>
            <pubDate>Mon, 19 Aug 2024 05:00:29 GMT</pubDate>
            <atom:updated>2024-08-19T05:00:29.782Z</atom:updated>
            <content:encoded><![CDATA[<p>Here I am going to show how one way and Two way SSL works.<br>PFA the picture attached here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r19w37tU2GF9LdGOPhB2Gg.jpeg" /></figure><p>Let me explain the steps. This is exactly happen when you hit an HTTPS url from your browser or from postman/soapUI.<br><strong>Step 1 — TCP Handshake — (1 &amp; 2)</strong>This is a common step for both http and http<br>Client sends a TCP request to the server and server responds with TCP acknowledgement.<br><strong>Step 2 — Certificate Check — (3)</strong>Client sends a hello message to the server.<br>that contains couple of things<br>a. List of TLS version supported by Client , e.g — TLS 1.2,TLS 1.1 etc.<br>b.TCP Cyber Suite used by Client<br>c.Encryption Algo used by client , eg — RSA<br>(4) Server then responds the client with the list of options provided by client.<br>(5) Server Also send a certificate to client contains server public key</p><p><strong>Step 3 — SESSION ID GENERATE — (6)Session ID </strong>generated by client encrypted by server public key.<br>Then this session id decrypted by server private key.<br>Once it is done the communication channel established . Then client and sever both can communicate each other.<br>This type of encryption is called asymetric encryption.<br><strong>Step 4 — Data Transmission — </strong>At this stage client and server both can communicate with each other just by encrypting session ID.</p><p>This gives a brief idea how the SSL communication Works.<br>Please keep in mind for <strong>one way ssl </strong>, only server certificate is getting validated by client.<br>For Two way SSL , client certificate needed to be validated by server.<br>In my next blog I will explain how one way and TWO way SSL can be achieved using Mule endpoint.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d04242e4e839" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Datweave pract]]></title>
            <link>https://medium.com/@biltughatal/datweave-pract-2ae8af647848?source=rss-a2355dd34e7f------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ae8af647848</guid>
            <category><![CDATA[mule]]></category>
            <category><![CDATA[dataweave-practice]]></category>
            <category><![CDATA[mulesoft-esb]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[mulesoft-training]]></category>
            <dc:creator><![CDATA[Arindam Goswami]]></dc:creator>
            <pubDate>Fri, 16 Aug 2024 05:06:16 GMT</pubDate>
            <atom:updated>2024-08-19T18:46:46.161Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dataweave practise set 1</h3><h3><strong>Find a occurrence of an element in an array</strong></h3><p><strong>Input</strong></p><pre>[1,2,3,4,5,1]</pre><p><strong>Output</strong></p><pre>{<br>&quot;itemNo&quot;: 1,<br>&quot;presen&quot;: &quot;duplicate&quot;<br>},<br>{<br>&quot;itemNo&quot;: 2,<br>&quot;presen&quot;: &quot;duplicate&quot;<br>},<br>{<br>&quot;itemNo&quot;: 3,<br>&quot;presen&quot;: &quot;single&quot;<br>},<br>{<br>&quot;itemNo&quot;: 1,<br>&quot;presen&quot;: &quot;duplicate&quot;<br>},<br>{<br>&quot;itemNo&quot;: 2,<br>&quot;presen&quot;: &quot;duplicate&quot;<br>},<br>{<br>&quot;itemNo&quot;: 2,<br>&quot;presen&quot;: &quot;duplicate&quot;<br>}<br>]</pre><p>Dataweave code</p><pre>%dw 2.0<br>output application/json<br>var myarra = payload<br>var counter:Number = 0<br>fun myOccuranceCheckFunction(myno:Number) =<br>sum((myarra map ((item, index) -&gt; if(myno == item) log(counter + 1) else counter<br>)))<br>- -<br>payload map ((item, index) -&gt; {&quot;itemNo&quot; : item ,<br>&quot;presen&quot; : if (myOccuranceCheckFunction(item) &gt; 1 ) &quot;duplicate&quot; else &quot;single&quot;}<br>)</pre><p><strong>Find the common element present in both array</strong></p><p>Input Data</p><pre>array1 = [12,34,45,15,89]<br>array2 = [15,6,8,9,20,30,34]<br></pre><p>Output Data</p><pre>[15,34]</pre><p>Dataweave Code</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ae8af647848" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>