Skip to content

Latest commit

 

History

History

Kaoto Data Mapper Example

AMQ Container

podman pull apache/activemq-artemis:latest
podman run -d -p 61616:61616 -p 8161:8161 apache/activemq-artemis:latest
podman ps

Launch the camel route.

Run the application using

camel run *

Use below snippets for quick testing.

curl --location 'http://localhost:8080/transform' \
--header 'Content-Type: application/xml' \
--data '<?xml version="1.0" encoding="UTF-8"?>

<shiporder orderid="889923"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="shiporder.xsd">
  <orderperson>John Smith</orderperson>
  <shipto>
    <name>Ola Nordmann</name>
    <address>Langgt 23</address>
    <city>4000 Stavanger</city>
    <country>Norway</country>
  </shipto>
  <item>
    <title>Lord of The Rings</title>
    <note>Special Edition</note>
    <quantity>1</quantity>
    <price>10.90</price>
  </item>
  <item>
    <title>Hide your heart</title>
    <quantity>1</quantity>
    <price>9.90</price>
  </item>
</shiporder>'

----Example 2-----

curl -X POST http://localhost:8080/transform \
-H "Content-Type: application/xml" \
-d '<shiporder>
  <item>
    <title>Harry Potter</title>
    <note>Special Edition</note>
    <price>111.90</price>
  </item>
  <item>
    <title>Lord of the Rings</title>
    <note>Used</note>
    <price>9.90</price>
  </item>
  <item>
    <note>House of Dragons</note>
    <price>20.90</price>
  </item>
</shiporder>'