├── docconverter
├── src
│ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── services
│ │ │ └── org
│ │ │ └── apache
│ │ │ └── camel
│ │ │ └── component
│ │ │ └── docconverter
│ │ └── java
│ │ └── org
│ │ └── assimbly
│ │ └── docconverter
│ │ ├── DocConverterComponent.java
│ │ ├── DocConverterEndpoint.java
│ │ └── DocConverterProcessor.java
└── pom.xml
├── dil
├── readme.md
├── assimbly
│ ├── helloworld.xml
│ ├── setbody.xml
│ ├── throttle.xml
│ ├── helloworld_explicit.xml
│ ├── setmessage.xml
│ ├── setheaders.xml
│ ├── setheader.xml
│ ├── setproperty.xml
│ ├── setbodyfromroute.xml
│ ├── helloworld_link.xml
│ └── setbodyfrommessage.xml
└── dovetail
│ ├── setmessage_dil.xml
│ ├── xslt_dil.xml
│ ├── xmltoexcel_dil.xml
│ ├── xmltoedi_dil.xml
│ ├── wiretap.xml
│ ├── xmltojson_dil.xml
│ ├── xmltocsv_dil.xml
│ ├── xmltoedifact_dil.xml
│ └── edifactstandards_dil.xml
├── endpoints.md
├── aggregation.md
├── transform.md
├── log.md
├── time.md
├── miscellaneous.md
├── dynamicrouter.md
├── body.md
├── marshalling.md
├── split.md
├── filter.md
├── properties.md
├── README.md
├── process.md
├── choice.md
├── headers.md
└── LICENSE
/docconverter/src/main/resources/META-INF/services/org/apache/camel/component/docconverter:
--------------------------------------------------------------------------------
1 | class=org.assimbly.docconverter.DocConverterComponent
--------------------------------------------------------------------------------
/dil/readme.md:
--------------------------------------------------------------------------------
1 | This directory contains examples of the DIL format:
2 |
3 | 1. Assimbly directory
4 |
5 | Examples that run on assimbly.
6 |
7 | 2. Dovetail directory
8 |
9 | Examples that run on Dovetail.
10 |
--------------------------------------------------------------------------------
/dil/assimbly/helloworld.xml:
--------------------------------------------------------------------------------
1 |
2 | HelloWorld
3 |
4 |
5 | source
6 | timer:foo
7 |
8 |
9 | sink
10 | print:Hello World!
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docconverter/src/main/java/org/assimbly/docconverter/DocConverterComponent.java:
--------------------------------------------------------------------------------
1 | package org.assimbly.docconverter;
2 |
3 | import org.apache.camel.Endpoint;
4 | import org.apache.camel.support.DefaultComponent;
5 |
6 | import java.util.Map;
7 |
8 | public class DocConverterComponent extends DefaultComponent {
9 |
10 | @Override
11 | protected Endpoint createEndpoint(String uri, String context, Map parameters) {
12 |
13 | DocConverterEndpoint endpoint = new DocConverterEndpoint(this, uri);
14 |
15 | return endpoint;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/endpoints.md:
--------------------------------------------------------------------------------
1 | ## Default endpoint
2 |
3 | ```
4 | .to("direct:myEndpoint)
5 | ```
6 |
7 | ## Dynamic endpoint
8 |
9 | ```
10 | .toD("www.someurl.com/${property.colour}")
11 |
12 | .toD("file://" + OUTPUT_PATH + "?FileName=${exchangeProperty.OUTPUT_FILENAME}" + "&FileExist=Append")
13 |
14 | .toD(COMPONENT_NAME + "://" + myEndpoint + "?" + camelQueryParams)
15 |
16 | .toD("${exchangeProperty.outputEndpoint}", true)
17 | ```
18 |
19 | ## Fire and Forget
20 |
21 | ```
22 | .setExchangePattern(ExchangePattern.InOnly)
23 | .to("direct:myEndpoint")
24 |
25 | .to(InOnly, "MyEndpoint")
26 |
27 | .inOnly("direct:myEndpoint")
28 | ```
29 |
30 | ## Request and Reply
31 |
32 | ```
33 | .setExchangePattern(ExchangePattern.InOut)
34 | .to("direct:myEndpoint")
35 |
36 | .to(InOut, "MyEndpoint")
37 |
38 | .inOut("direct:myEndpoint")
39 | ```
40 |
--------------------------------------------------------------------------------
/aggregation.md:
--------------------------------------------------------------------------------
1 | # Aggregate
2 |
3 | ### Camel
4 | .aggregate(constant(true), new MyAggregationStrategy()).completionPredicate(header("CamelSplitComplete").isEqualTo(true)).completionTimeout(10800000).eagerCheckCompletion()
5 |
6 | ### AggregationStrategy
7 | ```
8 | public class MyAggregationStrategy implements AggregationStrategy{
9 |
10 | @Override
11 | public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
12 | List functions =
13 | Function body = newExchange.getIn().getBody(Function.class);
14 | if (oldExchange == null) {
15 | List list = new ArrayList<>();
16 | list.add(body);
17 | newExchange.getIn().setBody(list);
18 | return newExchange;
19 | } else {
20 | List list = oldExchange.getIn().getBody(ArrayList.class);
21 | list.add(body);
22 | return oldExchange;
23 | }
24 | }
25 | }
26 | ```
27 |
--------------------------------------------------------------------------------
/transform.md:
--------------------------------------------------------------------------------
1 | ## Basic
2 |
3 | ```
4 | .transform().constant("OK")
5 |
6 | .transform(body().prepend("Hello "))
7 |
8 | .transform(body().append(" World!"))
9 |
10 | .transform().simple("Hello ${header.name}")
11 |
12 | .transform(simple(“Hello ${body}”));
13 | ```
14 |
15 | ## Replace
16 |
17 | ```
18 | .transform(body().regexReplaceAll("milk", "Milk"))
19 |
20 | .transform(body().regexReplaceAll("\n", "
"))
21 |
22 | .transform(simple( "${body.replace('&', '&')}"))
23 |
24 | .transform().simple("${body.toUpperCase()}");
25 | ```
26 |
27 | ## Method
28 |
29 | ```
30 | .transform().method(MyBusinessClass.class, "doSomething")
31 |
32 | .transform().method("Test", "alter")
33 | ```
34 |
35 | ## XML & JSON
36 |
37 | ```
38 | .transform(xquery(“{ for $x in /bookstore/book ” + “where $x/price>30 order by $x/title ” + “return $x/title }”));
39 |
40 | .transform().constant("resource:classpath:config.xml");
41 |
42 | .transform().jsonpath("$.results[0].formattedAddress")
43 | ```
44 |
45 |
--------------------------------------------------------------------------------
/log.md:
--------------------------------------------------------------------------------
1 | ## Basic
2 | ```
3 | .log("My Log Message")
4 |
5 | .log("${body}")
6 |
7 | .log("===============>>> NEW MESSAGE: ${body}");
8 |
9 | .log("Received Body is ${body} and header info is ${headers} ");
10 |
11 | .log("${header.deptid}")
12 |
13 | .log("${exchangeId}")
14 |
15 | .log("Reading of file ${header.CamelFileNameOnly} complete.")
16 |
17 | .log("Value of primaryOrgId = " + "${exchangeProperty.primaryOrgId}")
18 |
19 | ```
20 |
21 | ## With Loglevel
22 |
23 | ```
24 | .log(LoggingLevel.INFO, "Transaction file")
25 |
26 | .log(LoggingLevel.INFO, "${body}")
27 |
28 | .log("Error handler parent. Body is: ${body}")
29 |
30 | .log(LoggingLevel.INFO, "Incoming message ${body} with headers ${headers}");
31 |
32 | .log(LoggingLevel.INFO, "${file:name}")
33 |
34 | .log(LoggingLevel.DEBUG, this.getClass().getName(), "${headers} ${body}")
35 | ```
36 |
37 |
38 | ## Logging with To endpont
39 |
40 | ```
41 | .to("log:myclass.Succes")
42 |
43 | .to("log:myclass.Failed?level=ERROR&showAll=true&multiline=true&style=Fixed")
44 | ```
45 |
--------------------------------------------------------------------------------
/time.md:
--------------------------------------------------------------------------------
1 | ## Time
2 | ```
3 | .setHeader("MyHeader").simple("${date:now:yyyyMMdd}")
4 |
5 | .setHeader("MyHeader").simple("${date:now:HH:mm:ss}")
6 |
7 | .setHeader("MyHeader").simple("${date:now:dd-MM-yyyy HH:mm}
8 |
9 | .setHeader("MyHeader").simple("${date:now:yyyy-MM-dd'T'HH:mm:ss:SSS}")
10 |
11 | .setHeader("MyHeader").simple("${date:now:dd-MM-yyyy HH:mm z}")
12 |
13 | .setHeader("MyHeader").simple("${date:now+24h:yyyMMdd}")
14 |
15 | .setHeader("MyHeader").simple("${bean:java.lang.System?method=currentTimeMillis}")
16 |
17 | .transform().simple("The today is ${date:now:yyyyMMdd} and it is a great day.")
18 |
19 | .setHeader("MyHeader").groovy("new java.text.SimpleDateFormat('EEE, dd MMM yyyy HH:mm:ss zzz', java.util.Locale.US).parse(request.headers.myOldHeader)")
20 |
21 | .setBody(simple("Message at ${date:now:yyyy-MM-dd HH:mm:ss}"))
22 |
23 | .process(new Processor(){
24 | public void process(Exchange ex){
25 | Calendar cal = Calendar.getInstance();
26 | cal.add(Calendar.DATE, -1);
27 | ex.getIn().setHeader("yesterday",cal.getTime());
28 | ```
29 |
--------------------------------------------------------------------------------
/miscellaneous.md:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | ```
3 | .routeId("MyRoute")
4 |
5 | .routeId(MyRoute.class.getName() + ".DatabaseReader")
6 |
7 | .delay(10000)
8 |
9 | .timeout(20000L)
10 |
11 | .throwException(new Exception("Dummy Exception"))
12 |
13 | .loopDoWhile(simple("${headers.COUNTER} != ${headers.MSG_COUNT}"))
14 | .process(simpleJMSConsumerProcess)
15 | .end().endCircuitBreaker()
16 |
17 | .doTry().to("validator:wsdl/validation2.xsd")
18 | .log("${body}").to("direct:Response")
19 | .log(" response on Success")
20 | .doCatch(ValidationException.class)
21 | ```
22 | ### Enrich/PollEncrich
23 | .pollEnrich("file://source?options")
24 |
25 | ### Validator
26 | .to("validator:xsd/MyXsd.xsd")
27 | .to("json-validator:validator/myJsonSchema.json?errorHandler=#customErrorHandler")
28 |
29 | ### Xslt
30 | .to("xslt:MyStylesheet.xsl?saxon=true")
31 | .to("xslt:file:{{xslt.cdm.to.target.gettimesheet}}?saxon=true")
32 |
33 | ### Resequence
34 | .resequence(header("seqNum"))
35 | .resequence(simple("${header.priority}")).batch().timeout(30000)
36 |
--------------------------------------------------------------------------------
/dynamicrouter.md:
--------------------------------------------------------------------------------
1 | ## Camel EIP
2 |
3 | ```
4 | .dynamicRouter(method(MyDynamicRouter.class, "pageRequest"))
5 | ```
6 |
7 | ## Method
8 | ```
9 | // Returns the next request url, or null when the last iteration is reached
10 | public class MyDynamicRouter {
11 | public void pageRequest(Exchange exchange){
12 |
13 | // Initialize nextRequest as null as the method must return null at the final iteration.
14 | // Otherwise it will get stuck in an endless loop.
15 | String nextRequest = null;
16 |
17 | Object body = exchange.getIn().getBody();
18 |
19 | if(/* initial condition, usually: body == null */){
20 | nextRequest = "direct:myNextRequest";
21 | } else if (/* continuing condition, something like: body.size() == maxSize */)
22 | nextRequest = "direct:myNextRequest";
23 | } else if (/* final condition, something like: body.size() < maxSize */) {
24 | // Not necessary, but end logic (like setting headers) could be done here
25 | nextRequest = null;
26 | }
27 |
28 | return nextRequest;
29 | }
30 | }
31 | ```
--------------------------------------------------------------------------------
/dil/assimbly/setbody.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | setbody_test1
7 | setbody_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | http://0.0.0.0:9001/1/setbody
14 |
15 |
16 | 2
17 | action
18 | setbody:This is my body
19 |
20 |
21 | 3
22 | sink
23 | print:Message Body: ${bodyAs(String)}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/body.md:
--------------------------------------------------------------------------------
1 |
2 | ## Set body from constant
3 |
4 | ```
5 | .setBody(constant("MyValue"))
6 |
7 | .setBody().constant("MyValue")
8 |
9 | ```
10 |
11 | ## Set body from header
12 |
13 | ```
14 | .setBody(header("MyHeader"))
15 |
16 | .setBody().header("MyHeader")
17 |
18 | ```
19 |
20 | ## Set body from property
21 |
22 | ```
23 | .setBody(exchangeProperty("MyProperty"))
24 |
25 | ```
26 |
27 |
28 | ## Set body from simple
29 |
30 | ```
31 | .setBody(simple(""))
32 |
33 | .setBody().simple("${body}")
34 |
35 | .setBody().simple("${camelContext.getRouteStatus('myRoute')}")
36 |
37 | .setBody(simple("Hello from timer at ${header.firedTime}"))
38 |
39 | ```
40 |
41 | ## Set body from Jsonpath
42 |
43 | ```
44 | .setBody().jsonpath("access_token")
45 |
46 | ```
47 |
48 |
49 | ## Set body misc
50 |
51 | ```
52 | .setBody(body().regexReplaceAll("\\|", "\\|\""))
53 |
54 | ```
55 |
56 |
57 | ## Convert Body
58 |
59 | ```
60 | .convertBodyTo(String.class)
61 | .convertBodyTo(String.class, "UTF-8")
62 | .convertBodyTo(java.lang.String.class, "UTF-8")
63 |
64 | .convertBodyTo(byte[].class)
65 | .convertBodyTo(byte[].class, "iso-8859-1")
66 |
67 | .convertBodyTo(com.mongodb.DBObject.class)
68 | .convertBodyTo(PaymentMethodResponseBean.class)
69 | ```
70 |
--------------------------------------------------------------------------------
/marshalling.md:
--------------------------------------------------------------------------------
1 | # Marshalling
2 |
3 | ## Marshal
4 |
5 | Marshalling is converting Objects (Plain Old Java Object) to a data format (JSON, XML etc)
6 |
7 | ### POJO to JSON
8 |
9 | .marshal().json(JsonLibrary.Jackson, DataType.class)
10 |
11 | .marshal(jacksonDataFormat)
12 |
13 | .marshal(new JacksonDataFormat(DataType.class))
14 |
15 | ### POJO to CSV
16 | .marshal().bindy(BindyType.Csv, DataType.class)
17 |
18 | ### POJO to XML
19 | .marshal().jaxb(DataType.class)
20 |
21 | ## Unmarshal
22 |
23 | Unnarshalling is converting a data format (JSON, XML etc) to Objects (Plain Old Java Object)
24 |
25 | ### JSON to POJO
26 |
27 | .unmarshal().json(JsonLibrary.Jackson, DataType.class)
28 |
29 | .unmarshal(jacksonDataFormat)
30 |
31 | .unmarshal(new JacksonDataFormat(DataType.class))
32 |
33 | ### CSV to POJO
34 | .unmarshal().bindy(BindyType.Csv, DataType.class)
35 |
36 | ### XML to POJO
37 | .unmarshal().jaxb(DataType.class)
38 |
39 |
40 | ## Conversion
41 |
42 | Note for direct conversion between data format also [Assimbly docconverter](https://github.com/assimbly/docconverter) can be used.
43 |
44 | See [Example processor](https://github.com/assimbly/connector/blob/master/connectorModule/src/main/java/org/assimbly/connector/processors/ConvertProcessor.java) for code.
45 |
46 |
47 |
--------------------------------------------------------------------------------
/split.md:
--------------------------------------------------------------------------------
1 | ## Split
2 |
3 | ```
4 | .split(body())
5 |
6 | .split(header("MyHeader"))
7 |
8 | .split(body(String.class).tokenize("\n"))
9 |
10 | .split(body().tokenize(LINE_FEED)).streaming()
11 |
12 | .split(body().tokenize(",")).streaming()
13 |
14 | .split().tokenizeXML("Entry")
15 |
16 | .split().tokenize(System.lineSeparator()).aggregationStrategy(new YourAggregationStrategyClass())
17 | ```
18 |
19 |
20 | ## Split with method
21 |
22 | ```
23 | .split().method(new SplitBean(), "splitMessage")
24 |
25 | .split().method(new SplitterBean(), "splitServiceRecords")
26 |
27 | .split().method(myFunkySplitterBean, "splitCommands")
28 |
29 | .split().method(ServiceCommandSplitter.class, "splitCommands")
30 | ```
31 |
32 |
33 | ## Split with xpath
34 |
35 | ```
36 | .split(xpath("//foo/bar"))
37 |
38 | .split(xpath("//*[local-name()='files']/*"))
39 | ```
40 |
41 |
42 | ## Split with jsonpath
43 |
44 | ```
45 | .split().jsonpath("$.[*]").aggregationStrategy(new SupplierAggregationStrategy())
46 |
47 | .split().jsonpath("events[*].data.output.organizationRole")
48 |
49 | .split().jsonpathWriteAsString("$.store.book[*]")
50 |
51 | .split().jsonpath("$.store.book[*]")
52 |
53 | .split().jsonpath("$").streaming()
54 |
55 | .split().jsonpathWriteAsString("$.journalEntries")
56 |
57 | .split().jsonpathWriteAsString("events")
58 |
59 | .split(ExpressionBuilder.languageExpression("jsonpath","$")
60 | ```
61 |
--------------------------------------------------------------------------------
/filter.md:
--------------------------------------------------------------------------------
1 | ## Filter by header
2 |
3 | ```
4 | .filter(header("CamelFileLastModified").isGreaterThan(tenDaysBack))
5 | .filter(header("head").isEqualTo("B"))
6 | .filter(header("foo").isEqualTo("bar"))
7 | .filter(header(HTTP_RESPONSE_CODE).isEqualTo(200))
8 | ```
9 |
10 | ## Filter by body
11 |
12 | ```
13 | .filter(body().contains("Foo"))
14 | .filter(body().convertToString().contains("MyValue"))
15 | .filter(body().isNotEqualTo(3))
16 | .filter(bodyAs(String.class).contains("interesting line"))
17 | ```
18 |
19 | ## Filter by simple
20 |
21 | ```
22 | .filter(simple('''${header.CACT} == "OBS"'''))
23 | .filter(simple('''${header.CDPO} == "SAT" or ${header.CDPO} == "LYO"'''))
24 | .filter(simple("${body} contains 'foo'"))
25 | ```
26 |
27 | ## Filter by JsonPath
28 |
29 | ```
30 | .filter().jsonpath("$.[?(@.customerId == '${header.ID}')]")
31 | ```
32 |
33 | ## Filter by Xpath
34 |
35 | ```
36 | .filter().xpath("/person[@name='James']")
37 | .filter().xpath("//*[local-name()='UserImport']")
38 | .filter().xpath("/env:Envelope/env:Header/equipmentType/text()='WCA'")
39 | ```
40 |
41 | ## Filter by OGNL
42 |
43 | ```
44 | .filter().ognl("getRequest().getBody().contains('iphone')")
45 | ```
46 |
47 | ## Filter by method
48 |
49 | ```
50 | .filter().method(MyBean.class, "isGoldCustomer")
51 | .filter().method(DiagnosticDateFilter.class, "diagnosedAfterLastRun")
52 | ```
53 |
54 | ## Filter by Class
55 |
56 | ```
57 | .filter(new StubRunnerCamelPredicate(entries.getValue()))
58 | ```
59 |
--------------------------------------------------------------------------------
/properties.md:
--------------------------------------------------------------------------------
1 | ## Set property from body
2 |
3 | ```
4 | .setProperty("MyProperty", body())
5 |
6 | .setProperty("MyProperty").body()
7 |
8 | .setProperty("MyProperty").simple("${body}")
9 | ```
10 |
11 | ## Set property from constant
12 |
13 | ```
14 | .setProperty("MyProperty", constant("MyValue"))
15 |
16 | .setProperty("MyProperty").constant("MyValue"))
17 | ```
18 |
19 | ## Set property from header
20 |
21 | ```
22 | .setProperty("MyProperty", header("MyHeader"))
23 | ```
24 |
25 | ## Set property from xpath
26 |
27 | ```
28 | .setProperty("myProperty").xpath("//MyProperty", String.class)
29 | ```
30 |
31 | ## Other examples
32 |
33 | ```
34 | .setProperty("MyProperty").simple("${header.MyHeader}")
35 |
36 | .setProperty("MyProperty", MyVar.toString())
37 |
38 | .setProperty("MyProperty").simple("${exchangeProperty.StatusMsg} == null ? 'ee2e2e2' : 'fffffff'")
39 |
40 | .setProperty("myProperty", method(MyBean.class, "myMethod"))
41 |
42 | .setProperty("MyProperty").exchange(ex -> new MyBean())
43 |
44 | .setProperty("uid", uuid.toString()
45 |
46 | .setProperty(CamelConstants.APPLICATION_NAMESPACE).constant(_serviceName.getNamespaceURI())
47 |
48 | .setProperty("endpointUri", new ConstantExpression(mockDefinition.getEndpointUri()))
49 |
50 | .setProperty(PROCESS_KEY_PROPERTY, simple("file:name"))
51 |
52 | .setProperty(Exchange.ROUTE_STOP, Boolean.TRUE);
53 |
54 | .setProperty(CAPTURED_OUT_MESSAGES_MAP, outMessagesMap);
55 | ```
56 |
57 | ## Remove property
58 |
59 | ```
60 | .removeProperty("MyProperty")
61 | ```
62 |
--------------------------------------------------------------------------------
/dil/assimbly/throttle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | throttle_test1
7 | throttle_test1
8 | esb
9 | When refreshing the source page multiple times the throttle takes effect.
10 |
11 |
12 | 1
13 | source
14 | http://0.0.0.0:9001/1/throttle
15 |
16 |
17 | 2
18 | action
19 | setbody:throttling test
20 |
21 |
22 | 3
23 | action
24 | throttle
25 |
26 | 10000
27 |
28 |
29 |
30 | 4
31 | sink
32 | print:Message Body: ${bodyAs(String)}
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # camel-examples
2 |
3 | [Assimbly](https://github.com/assimbly/gateway) uses [Apache Camel](https://camel.apache.org/) as its core technology. Camel often has many ways to do something, but often it's hard to find good examples in one place.
4 |
5 | Here you can find various Camel Cheatsheets for the Java DSL.
6 |
7 | # Cheatcheets
8 |
9 | - [aggregation](https://github.com/assimbly/camel-examples/blob/main/aggregation.md)
10 | - [body](https://github.com/assimbly/camel-examples/blob/main/body.md)
11 | - [choice](https://github.com/assimbly/camel-examples/blob/main/choice.md)
12 | - [dynamicrouter](https://github.com/assimbly/camel-examples/blob/main/dynamicrouter.md)
13 | - [endpoints](https://github.com/assimbly/camel-examples/blob/main/endpoints.md)
14 | - [filter](https://github.com/assimbly/camel-examples/blob/main/filter.md)
15 | - [headers](https://github.com/assimbly/camel-examples/blob/main/headers.md)
16 | - [log](https://github.com/assimbly/camel-examples/blob/main/log.md)
17 | - [marshalling](https://github.com/assimbly/camel-examples/blob/main/marshalling.md)
18 | - [miscellaneous](https://github.com/assimbly/camel-examples/blob/main/miscellaneous.md)
19 | - [process](https://github.com/assimbly/camel-examples/blob/main/process.md)
20 | - [properties](https://github.com/assimbly/camel-examples/blob/main/properties.md)
21 | - [split](https://github.com/assimbly/camel-examples/blob/main/split.md)
22 | - [time](https://github.com/assimbly/camel-examples/blob/main/time.md)
23 | - [transform](https://github.com/assimbly/camel-examples/blob/main/transform.md)
24 |
--------------------------------------------------------------------------------
/dil/assimbly/helloworld_explicit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 | default
6 |
7 | PRODUCTION
8 | PRODUCTION
9 |
10 |
11 |
12 | 12345
13 | HelloWorld2
14 |
15 |
16 | 1
17 | source
18 | component:timer:foo
19 |
20 |
21 | link1to2
22 | sync
23 | out
24 |
25 |
26 |
27 |
28 | 2
29 | sink
30 | block:print:Hello World!
31 |
32 |
33 | link1to2
34 | sync
35 | in
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/dil/assimbly/setmessage.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | setmessage_test1
7 | setmessage_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | http://0.0.0.0:9000/1/setmessage
14 |
15 |
16 | 2
17 | action
18 | setmessage:message:names
19 |
20 |
21 | 3
22 | sink
23 | velocity:The body is ${body}. The name is ${header.firstname} ${header.lastname}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | 1
34 | names
35 | John
36 |
37 | ${body}
38 | Doe
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/dil/dovetail/setmessage_dil.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | setmessage_test1
7 | setmessage_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | https://0.0.0.0:9001/1/setmessage
14 |
15 |
16 | 2
17 | action
18 | setmessage:message:names
19 |
20 |
21 | 3
22 | sink
23 | velocity:The body is ${body}. The name is ${header.firstname} ${header.lastname}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | 1
34 | names
35 | john
36 |
37 | ${body}
38 | Doe
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/dil/dovetail/xslt_dil.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | xmltoxslt_test1
7 | xmltoxslt_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | https://0.0.0.0:9001/1/xslt
14 |
15 |
16 | 2
17 | action
18 | setbody:
19 |
20 | John Doe
21 |
22 |
23 | Jane Doe
24 |
25 | ]]>
26 |
27 |
28 |
29 | 3
30 | action
31 | xslt:file:D:/gdrive/Dovetail/migration/xslt/resources/valid.xslt
32 |
33 |
34 | 4
35 | sink
36 | velocity:Message Body: ${bodyAs(String)}
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/dil/dovetail/xmltoexcel_dil.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | xmltoexel_test1
7 | xmltoexcel_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | https://0.0.0.0:9001/1/XmlToExcel
14 |
15 |
16 | 2
17 | action
18 | setbody:message:menu
19 |
20 |
21 | 3
22 | action
23 | xmltoexcel://
24 |
25 | true
26 | false
27 | line
28 | UNORDERED
29 | XLSX
30 |
31 |
32 |
33 | 4
34 | sink
35 | velocity:Message Body: ${bodyAs(String)}
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | menu
46 |
47 |
48 | 1
49 | Belgian Waffles
50 | $5.95
51 |
52 | Two of our famous Belgian Waffles with plenty of real maple syrup
53 |
54 | 650
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/dil/assimbly/setheaders.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | setheaders_test1
7 | setheaders_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | http://0.0.0.0:9001/1/setheaders
14 |
15 |
16 | 2
17 | action
18 | setbody:John
19 |
20 |
21 | 3
22 | action
23 | setheaders:message:names
24 |
25 |
26 | 4
27 | sink
28 | velocity:The body is ${body}. The name is ${header.firstname} ${header.lastname}
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | 1
39 | names
40 |
41 | ${body}
42 | Doe
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/dil/dovetail/xmltoedi_dil.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | xmltoedi_test1
7 | xmltoedi_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | https://0.0.0.0:9001/1/xmltoedi
14 |
15 |
16 | 2
17 | action
18 | setbody:
19 |
20 |
21 |
22 | John
23 | Doe
24 |
25 | 1901-01-07
26 | john.doe@example.com
27 |
28 | ]]>
29 |
30 |
31 |
32 | 3
33 | action
34 | xmltoedi
35 |
36 | d96a
37 |
38 |
39 |
40 | 4
41 | sink
42 | velocity:Message Body: ${bodyAs(String)}
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/dil/assimbly/setheader.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | setheader_test1
7 | setheader_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | http://0.0.0.0:9001/1/setheader
14 |
15 |
16 | 2
17 | action
18 | setbody:Just a person
19 |
20 |
21 | 3
22 | action
23 | setheader:firstname
24 |
25 | John
26 |
27 |
28 |
29 | 4
30 | action
31 | setproperty:lastname
32 |
33 | Doe
34 | simple
35 |
36 |
37 |
38 | 5
39 | sink
40 | velocity:The body is ${body}. The name is ${header.firstname} ${exchangeProperty.lastname}
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/dil/assimbly/setproperty.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | setheader_test1
7 | setheader_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | http://0.0.0.0:9001/1/setproperty
14 |
15 |
16 | 2
17 | action
18 | setbody:Just a person
19 |
20 |
21 | 3
22 | action
23 | setheader:firstname
24 |
25 | John
26 |
27 |
28 |
29 | 4
30 | action
31 | setproperty:lastname
32 |
33 | Doe
34 | simple
35 |
36 |
37 |
38 | 5
39 | sink
40 | velocity:The body is ${body}. The name is ${header.firstname} ${exchangeProperty.lastname}
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/docconverter/src/main/java/org/assimbly/docconverter/DocConverterEndpoint.java:
--------------------------------------------------------------------------------
1 | package org.assimbly.docconverter;
2 |
3 | import org.apache.camel.Category;
4 | import org.apache.camel.Component;
5 | import org.apache.camel.Processor;
6 | import org.apache.camel.api.management.ManagedAttribute;
7 | import org.apache.camel.spi.Metadata;
8 | import org.apache.camel.spi.UriEndpoint;
9 | import org.apache.camel.spi.UriPath;
10 | import org.apache.camel.support.ProcessorEndpoint;
11 |
12 | @UriEndpoint(
13 | firstVersion = "4.12.1",
14 | scheme = "docconverter",
15 | title = "DocConverter Component",
16 | syntax = "docconverter:conversion",
17 | producerOnly = true,
18 | category = { Category.TRANSFORMATION }
19 | )
20 | public class DocConverterEndpoint extends ProcessorEndpoint {
21 |
22 | @UriPath
23 | @Metadata(required = true)
24 | private String uri;
25 |
26 | private DocConverterComponent component;
27 |
28 | public DocConverterEndpoint(DocConverterComponent component, String uri) {
29 | super(uri,component);
30 |
31 | this.component = component;
32 | setUriPath(uri);
33 | }
34 |
35 | @Override
36 | protected Processor createProcessor() {
37 | return new DocConverterProcessor(this);
38 | }
39 |
40 | @Override
41 | public Component getComponent(){
42 | return (Component) component;
43 | }
44 |
45 | @ManagedAttribute(description = "Type of conversion")
46 | public String getUriPath() {
47 | return uri;
48 | }
49 |
50 | /**
51 | * Type of conversion: source2target
52 | * Source consist of (xml, json, yaml, csv) and target (xml, json, yaml,csv)
53 | * For example xml2json
54 | *
55 | * @param uri The type of conversion: source2target
56 | */
57 | public void setUriPath(String uri) {
58 | this.uri = uri;
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/dil/assimbly/setbodyfromroute.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | routeblock_test1
7 | routeblock_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | http://0.0.0.0:9001/1/setbodyfromroute
14 |
15 |
16 | myroute_a
17 | out
18 |
19 |
20 |
21 |
22 | 2
23 | action
24 | block:1
25 |
26 |
27 | 1
28 | route
29 | routeblock_test1-2
30 |
31 |
32 |
33 |
34 | 3
35 | sink
36 | print:Message Body: ${bodyAs(String)}
37 |
38 |
39 | myroute_b
40 | in
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | Hello John
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/dil/assimbly/helloworld_link.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 | default
6 |
7 | PRODUCTION
8 | PRODUCTION
9 |
10 |
11 |
12 | 12345
13 | HelloWorld2
14 |
15 |
16 | 1
17 | source
18 | component:timer:foo
19 |
20 |
21 | link1to2
22 | sync
23 | out
24 |
25 |
26 |
27 |
28 | 2
29 | action
30 |
31 |
32 | link1to2
33 | sync
34 | in
35 |
36 |
37 | link2to3
38 | sync
39 | out
40 |
41 |
42 |
43 |
44 | 3
45 | sink
46 | block:print:Hello World!
47 |
48 |
49 | link2to3
50 | sync
51 | in
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/dil/dovetail/wiretap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | wiretap_test1
7 | wiretap_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | https://0.0.0.0:9001/1/Wiretap
14 |
15 |
16 | 2
17 | action
18 | setbody:
19 |
20 | John Doe
21 |
22 |
23 | Jane Doe
24 |
25 | ]]>
26 |
27 |
28 |
29 | 3
30 | action
31 | wiretap:activemq:ID_1234
32 |
33 |
34 | 4
35 | sink
36 | velocity:Message Body: ${bodyAs(String)}
37 |
38 |
39 | 5
40 | sink
41 | log:Wiretap message
42 |
43 | false
44 | true
45 | false
46 | true
47 | true
48 | true
49 | false
50 | false
51 |
52 |
53 |
54 | ID_1234
55 | activemq
56 | in
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/docconverter/src/main/java/org/assimbly/docconverter/DocConverterProcessor.java:
--------------------------------------------------------------------------------
1 | package org.assimbly.docconverter;
2 |
3 | import org.apache.camel.Exchange;
4 | import org.apache.camel.Message;
5 | import org.apache.camel.Processor;
6 | import org.assimbly.docconverter.DocConverter;
7 |
8 | public class DocConverterProcessor implements Processor {
9 |
10 | private DocConverterEndpoint endpoint;
11 | private String convertedBody;
12 |
13 | public DocConverterProcessor(DocConverterEndpoint endpoint) {
14 | this.endpoint = endpoint;
15 | }
16 |
17 | @Override
18 | public void process(Exchange exchange) throws Exception {
19 |
20 | Message in = exchange.getIn();
21 | String body = in.getBody(String.class);
22 |
23 | String uri = endpoint.getUriPath().toLowerCase();
24 | String source2target = uri.replace("docconverter://","");
25 |
26 | switch(source2target)
27 | {
28 | case "xml2json":
29 | convertedBody = DocConverter.convertXmlToJson(body);
30 | break;
31 | case "xml2yaml":
32 | convertedBody = DocConverter.convertXmlToYaml(body);
33 | break;
34 | case "xml2csv":
35 | convertedBody = DocConverter.convertXmlToCsv(body);
36 | break;
37 | case "json2xml":
38 | convertedBody = DocConverter.convertJsonToXml(body);
39 | break;
40 | case "json2yaml":
41 | convertedBody = DocConverter.convertJsonToYaml(body);
42 | break;
43 | case "json2csv":
44 | convertedBody = DocConverter.convertJsonToCsv(body);
45 | break;
46 | case "yaml2xml":
47 | convertedBody = DocConverter.convertYamlToXml(body);
48 | break;
49 | case "yaml2json":
50 | convertedBody = DocConverter.convertYamlToJson(body);
51 | break;
52 | case "yaml2csv":
53 | convertedBody = DocConverter.convertYamlToCsv(body);
54 | break;
55 | case "csv2xml":
56 | convertedBody = DocConverter.convertCsvToXml(body);
57 | break;
58 | case "csv2json":
59 | convertedBody = DocConverter.convertCsvToJson(body);
60 | break;
61 | case "csv2yaml":
62 | convertedBody = DocConverter.convertCsvToYaml(body);
63 | break;
64 | default:
65 | convertedBody = body;
66 | }
67 |
68 | in.setBody(convertedBody);
69 |
70 | }
71 |
72 | }
--------------------------------------------------------------------------------
/docconverter/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | jar
6 | org.assimbly
7 | docconverter
8 | ${project.parent.version}
9 |
10 | doconverter
11 |
12 |
13 | UTF-8
14 | 11
15 |
16 |
17 |
18 |
19 | org.apache.camel
20 | camel-api
21 | 3.14.3
22 |
23 |
24 | org.apache.camel
25 | camel-base
26 | 3.14.3
27 |
28 |
29 | org.apache.camel
30 | camel-core
31 | 3.14.3
32 |
33 |
34 | org.apache.camel
35 | camel-management
36 | 3.14.3
37 |
38 |
39 | org.apache.camel
40 | camel-management-api
41 | 3.14.3
42 |
43 |
44 | org.apache.camel
45 | camel-support
46 | 3.14.3
47 |
48 |
49 | org.apache.camel
50 | camel-test
51 | 3.14.3
52 |
53 |
54 | io.github.assimbly
55 | docconverter
56 | 1.5.0
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | org.apache.maven.plugins
65 | maven-toolchains-plugin
66 |
67 |
68 |
69 | toolchain
70 |
71 |
72 |
73 |
74 | 11
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/process.md:
--------------------------------------------------------------------------------
1 | ## Basic
2 | ```
3 | .process("myProcessor")
4 |
5 | .process(new myProcessor())
6 |
7 | .process(exchange -> exchange.getIn().setBody(fallbackResponse, EquipmentListResponse.class))
8 |
9 | .process(fileProcessor).log("Came out of file processor")
10 |
11 | .process(this::createShuttleObject)
12 | ```
13 |
14 |
15 | ## Exchange -->
16 | ```
17 | .process(exchange -> {
18 | System.out.println(exchange.getIn().getBody());
19 | })
20 |
21 | .process(exchange -> {
22 | throw new RuntimeException("No good Pal!");
23 | })
24 |
25 | .process(exchange -> {
26 | exchange.getIn().setBody("test message");
27 | })
28 |
29 | .process(exchange -> {
30 | Thread.sleep(10000);
31 | })
32 |
33 | .process(exchange -> {
34 | String body = exchange.getIn().getBody(String.class);
35 | variables.put("myBody", body);
36 | }
37 |
38 | .process(exchange -> {
39 | String[] dataArray = exchange.getIn().getBody(String.class).split(",", 2);
40 | channelName.append(dataArray[0]);
41 | exchange.getIn().setBody("{\"text\" : \"" + dataArray[1].trim() + "\"}");
42 | })
43 |
44 | .process(exchange -> {
45 | log.info("Colour decoded successfully.");
46 | String colour = exchange.getIn().getBody(String.class);
47 | exchange.setProperty("colour", colour);
48 | })
49 |
50 | .process(exchange -> {
51 | exchange.getMessage().setBody("modified", String.class);
52 | exchange.getMessage().setHeader("x", "y");
53 | })
54 | ```
55 |
56 |
57 |
58 | ## New processor()
59 | ```
60 | .process(new Processor() {
61 | @Override
62 | public void process(Exchange exchange) throws Exception {
63 | exchange.getIn().setHeader("JMSDeliveryMode", "1");
64 | }
65 | })
66 |
67 | .process(new Processor(){
68 | @Override
69 | public void process(Exchange exchange) throws Exception {
70 | String message = "Hello World";
71 | exchange.getIn().setBody(message);
72 | }
73 | })
74 |
75 | .process(new Processor() {
76 | @Override
77 | public void process(Exchange exchange) throws Exception {
78 | exchange.getIn().setBody(exchange.getIn().getBody(String.class));
79 | exchange.getIn().setHeader("CamelCacheKey", sourceId);
80 | exchange.getIn().setHeader("CamelCacheOperation", "Update");
81 | }
82 | })
83 |
84 | .process(new Processor() {
85 | private int failureCounter = 0;
86 | @Override
87 | public void process(Exchange exchange) throws Exception {
88 | if (exchange.getIn().getHeader("JMSRedelivered", Boolean.class)) {
89 | exchange.getIn().setHeader("failureCounter", ++failureCounter);
90 | }
91 | }
92 | })
93 |
94 | .process(new Processor() {
95 | public void process(Exchange msg) {
96 | String fileName = msg.getIn().getHeader("CamelFileName").toString();
97 | System.out.println("CamelFileName: " + fileName);
98 | FileDetails fileDetails = FileDetails.builder().build();
99 | fileDetails.setFileName(fileName);
100 | fileDetails.setFilePath(exchange.getIn().getBody());
101 | }
102 | })
103 | ```
104 |
--------------------------------------------------------------------------------
/dil/dovetail/xmltojson_dil.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | xmltojson_test1
7 | xmltojson_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | https://0.0.0.0:9001/1/XmlToJson
14 |
15 |
16 | 2
17 | sync
18 | out
19 |
20 |
21 |
22 |
23 | 2
24 | action
25 | setbody:
26 |
27 | John Doe
28 |
29 |
30 | Jane Doe
31 |
32 | ]]>
33 |
34 |
35 |
36 | 2
37 | sync
38 | in
39 |
40 |
41 | 3
42 | sync
43 | out
44 |
45 |
46 |
47 |
48 | 3
49 | action
50 | xmltojson
51 |
52 | false
53 | false
54 | false
55 | false
56 | ORIGINAL
57 |
58 |
59 |
60 | 3
61 | sync
62 | in
63 |
64 |
65 | 4
66 | sync
67 | out
68 |
69 |
70 |
71 |
72 |
73 | 4
74 | sink
75 | velocity:Message Body: ${bodyAs(String)}
76 |
77 |
78 | 4
79 | sync
80 | in
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/choice.md:
--------------------------------------------------------------------------------
1 | ## Check if present
2 |
3 | ```
4 | .choice()
5 | .when("MyHeader")
6 | .log("My header doesn't exist")
7 | .otherwise
8 | .log("My header doesn't exist")
9 | .end()
10 |
11 | .choice()
12 | .when(header("MyHeader"))
13 | .log("My header doesn't exist")
14 | .otherwise
15 | .log("My header doesn't exist")
16 | .end()
17 |
18 | .choice()
19 | .when(exchangeProperty("MyProperty"))
20 | .log("MyProperty exists")
21 | .otherwise
22 | .log("MyProperty does not exists")
23 | .end()
24 | ```
25 |
26 | ## Strings
27 |
28 | ```
29 | .choice()
30 | .when(header("MyHeader").("MyValue"))
31 | .log("My header is equal to MyValue")
32 | .otherwise
33 | .log("My header is not equal to MyValue")
34 | .end()
35 |
36 | .choice()
37 | .when(header("MyHeader").isEqualTo("MyValue"))
38 | .log("My header equals Myvalue")
39 | .otherwise
40 | .log("My header doesn't equals Myvalue")
41 | .end()
42 |
43 | .choice()
44 | .when(header("MyHeader").isNotEqualTo("MyValue"))
45 | .log("My header is not equal to Myvalue")
46 | .otherwise
47 | .log("My header equal Myvalue")
48 | .end()
49 |
50 | .choice()
51 | .when(simple("${in.header.CamelHttpResponseCode} == '404'"))
52 | .log("CamelHttpResponseCode is 404")
53 | .otherwise
54 | .log("CamelHttpResponseCode is not 404")
55 | .end()
56 |
57 | .choice()
58 | .when(simple("${in.header.EmployeeExist} == true && ${in.header.EventType} == 'remove'"))
59 | .log("Employee exist and eventype is remove")
60 | .otherwise
61 | .log("One or both are false")
62 | .end()
63 |
64 | .choice()
65 | .when(simple("${properties:someProperty} == 'true'"))
66 | .log("Some property has the value true")
67 | .otherwise
68 | .log("Some property doesn't have the value true")
69 | .end()
70 |
71 | .choice()
72 | .when(header(MyHeader).contains("MyValue"))
73 | .log("My header contain MyValue")
74 | .otherwise
75 | .log("My header doesn't contain MyValue")
76 | .end()
77 |
78 | .choice()
79 | .when(header("MyHeader").startsWith("My"))
80 | .log("My header start with My")
81 | .otherwise
82 | .log("My header doesn't start with My")
83 | .end()
84 |
85 | .choice()
86 | .when(header("MyHeader").startsWith("20"))
87 | .log("My header start with 20")
88 | .otherwise
89 | .log("My header doesn't start with 20")
90 | .end()
91 |
92 | .choice()
93 | .when(body().regex(",+\\$"))
94 | .log("Body contains $")
95 | .otherwise
96 | .log("Body does not contain $")
97 | .end()
98 | ```
99 |
100 | ## Integer
101 |
102 | ```
103 | .choice()
104 | .when(header(Exchange.HTTP_RESPONSE_CODE).isEqualTo(constant(200)))
105 | .log("HTTP Response code is 200")
106 | .otherwise
107 | .log("HTTP Response code is not 200")
108 | .end()
109 | ```
110 |
111 | ## Boolean
112 |
113 | ```
114 | .choice()
115 | .when().simple("${header.NotifyCamelFileComplete} != true")
116 | .log("NotifyCamelFileComplete is false")
117 | .otherwise
118 | .log("NotifyCamelFileComplete is true")
119 | .end()
120 |
121 | .choice()
122 | .when().simple("${header.NotifyCamelFileComplete} != true")
123 | .log("NotifyCamelFileComplete is false")
124 | .otherwise
125 | .log("NotifyCamelFileComplete is true")
126 | .end()
127 | ```
128 |
129 |
130 | ## Null checks
131 |
132 | ```
133 | .choice()
134 | .when().simple("${header.MyHeader} == null")
135 | .log("MyHeader is null")
136 | .otherwise
137 | .log("MyHeader is not null")
138 | .end()
139 |
140 | .choice()
141 | .when(header("MyHeader").isNotNull())
142 | .log("MyHeader is not null")
143 | .otherwise
144 | .log("MyHeader is null")
145 | .end()
146 | ```
147 |
148 | ## Jsonpath
149 |
150 | ```
151 | .choice()
152 | .when().jsonpath("$.Header[?(@.MessageType == 'Hello')]",true)
153 | .log("MyHeader is hello")
154 | .otherwise
155 | .log("MyHeader is not hello")
156 | .end()
157 | ```
158 |
159 | ## Xpath
160 |
161 | ```
162 | .choice()
163 | .when(xpath("//*[local-name()='ReturnCode']='200'"))
164 | .log("ReturnCode is 200")
165 | .otherwise
166 | .log("ReturnCode is not 200")
167 | .end()
168 | ```
169 |
--------------------------------------------------------------------------------
/dil/dovetail/xmltocsv_dil.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | xmltocsv_test1
7 | xmltocsv_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | https://0.0.0.0:9001/1/XmlToCsv
14 |
15 |
16 | 2
17 | action
18 | setbody:message:menu
19 |
20 |
21 | 3
22 | action
23 | xmltocsv://
24 |
25 | true
26 | false
27 | line
28 | UNORDERED
29 | ALL_FIELDS
30 | RAW(LA==)
31 | RAW(XG4=)
32 |
33 |
34 |
35 | 4
36 | sink
37 | velocity:Message Body: ${bodyAs(String)}
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | menu
48 |
49 |
50 | 1
51 | Belgian Waffles
52 | $5.95
53 |
54 | Two of our famous Belgian Waffles with plenty of real maple syrup
55 |
56 | 650
57 |
58 |
59 | 2
60 | Strawberry Belgian Waffles
61 | $7.95
62 |
63 | Light Belgian waffles covered with strawberries and whipped cream
64 |
65 | 900
66 |
67 |
68 | 3
69 | Berry-Berry Belgian Waffles
70 | $8.95
71 |
72 | Belgian waffles covered with assorted fresh berries and whipped cream
73 |
74 | 900
75 |
76 |
77 | 4
78 | French Toast
79 | $4.50
80 |
81 | Thick slices made from our homemade sourdough bread
82 |
83 | 600
84 |
85 |
86 | 5
87 | Homestyle Breakfast
88 | $6.95
89 |
90 | Two eggs, bacon or sausage, toast, and our ever-popular hash browns
91 |
92 | 950
93 |
94 |
95 | 6
96 | Homestyle Breakfast
97 | $6.95
98 |
99 | Two eggs, bacon or sausage, toast, and our ever-popular hash browns
100 |
101 | 950
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/headers.md:
--------------------------------------------------------------------------------
1 |
2 | ## Set header from constant
3 |
4 | ```
5 | .setHeader("MyHeader").constant("MyValue")
6 |
7 | .setHeader("MyHeader", constant("MyValue"))
8 |
9 | .setHeader("currentPage", constant(1))
10 |
11 | .setHeader("NotifyCamelFileComplete").constant(true)
12 |
13 | .setHeader("Accept").constant("*/*")
14 |
15 | .setHeader("Content-type", constant("application/x-www-form-urlencoded"))
16 |
17 | .setHeader("CamelJmsRequestTimeout").constant("90000")
18 |
19 | .setHeader(CxfConstants.OPERATION_NAME, constant("GetBook"))
20 |
21 | .setHeader("channelName", channelName.toString())
22 | ```
23 |
24 |
25 | ## Set header from simple expression
26 |
27 | ```
28 | .setHeader("MyHeader", simple("MyValue")
29 |
30 | .setHeader("MyHeader", simple("MyValue", String.class)
31 |
32 | .setHeader("MyInteger", simple("5", Integer.class))
33 |
34 | .setHeader("MyBoolean", simple("true", Boolean.class))
35 |
36 | .setHeader("Error",simple("${exception.message}"))
37 |
38 | .setHeader("Guid").simple("${exchangeId}")
39 |
40 | .setHeader("sObjectQuery", simple("SELECT name FROM account"))
41 |
42 | .setHeader("MyHeader").simple("resource:classpath:mysimple.txt")
43 |
44 | .setHeader("payrollId",simple("${body.payrollId}"))
45 |
46 | .setHeader("Id",simple("${body['ID']}"))
47 | ```
48 |
49 | ## Set header from body
50 |
51 | ```
52 | .setHeader("MyHeader", simple("${body}"))
53 |
54 | .setHeader("MyHeader").body()
55 | ```
56 |
57 | ## Set header from jsonpath
58 |
59 | ```
60 | .setHeader("MyHeader").jsonpath("$.ID")
61 |
62 | .setHeader("EmployeeID").jsonpath("$.employee.EmployeeID")
63 |
64 | .setHeader("idValue").jsonpath("workerID.idValue")
65 | ```
66 |
67 | ## Set header from xpath
68 |
69 | ```
70 | .setHeader("xml_namespace", xpath("namespace-uri(/*)").stringResult().saxon())
71 |
72 | .setHeader("category", xpath("/book/@category").stringResult())
73 |
74 | ```
75 |
76 |
77 | ## Set header from groovy
78 |
79 | ```
80 | .setHeader("MyHeader").groovy("new Date().getTime()")
81 |
82 | .setHeader("MyHeader").groovy("resource:classpath:mygroovy.groovy")
83 |
84 | ```
85 |
86 | ## Set header from exchange property
87 |
88 | ```
89 | .setHeader("CamelSplitComplete", exchangeProperty("CamelSplitComplete"))
90 |
91 | .setHeader("Authorization").simple("Bearer ${exchangeProperty.Token}")
92 | ```
93 |
94 | ## Set header from application property
95 |
96 | ```
97 | .setHeader("x-api-key").simple("{{api.key}}")
98 | ```
99 |
100 | Set header from external resource:
101 |
102 | ```
103 | .setHeader("myHeader").constant("resource:classpath:constant.txt")
104 | ```
105 |
106 | ## Set exchange headers
107 |
108 | ```
109 | .setHeader(Exchange.HTTP_PATH), simple("{{http.path}}")
110 | .setHeader(Exchange.HTTP_METHOD, constant("GET"))
111 | .setHeader(Exchange.CONTENT_TYPE, constant("application/json"))
112 | .setHeader(HttpHeaders.AUTHORIZATION, simple("${property.token}"))
113 | ```
114 |
115 | or
116 |
117 | ```
118 | .setHeader(Exchange.HTTP_PATH).simple("{{http.path}}")
119 | .setHeader(Exchange.HTTP_METHOD).simple("POST")
120 | .setHeader(Exchange.CONTENT_TYPE).simple("application/json")
121 | .setHeader(HttpHeaders.AUTHORIZATION, simple("${property.token}"))
122 | ```
123 |
124 | ```
125 | .setHeader(Exchange.HTTP_RESPONSE_CODE, constant(500))
126 | .setHeader(Exchange.FILE_NAME, body())
127 | .setHeader(Exchange.FILE_NAME, simple("${headers.category}.xml"))
128 | ```
129 |
130 | ## Set mail headers
131 |
132 | ```
133 | .setHeader('To', constant(mailTo))
134 | .setHeader('From', constant(mailFrom))
135 | .setHeader('Subject', constant(mailSubject))
136 | ```
137 |
138 | ## Set boolean headers
139 |
140 | ```
141 | .setHeader("param2").groovy("request.headers.param1.equals('on')")
142 | .setHeader("param2", simple("${header.param1} == 'on'", Boolean.class))
143 | .setHeader("param2").mvel("request.headers.param1 == 'on'")
144 | ```
145 |
146 | ## Removing header
147 |
148 | ### Remove specific header
149 |
150 | ```
151 | .removeHeader("MyHeader")
152 | ```
153 |
154 | ### Remove all headers
155 |
156 | ```
157 | .removeHeaders("*")
158 | ```
159 |
160 | ### Remove http headers
161 |
162 | ```
163 | .removeHeaders("CamelHttp*")
164 | ```
165 |
--------------------------------------------------------------------------------
/dil/assimbly/setbodyfrommessage.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | setbodyfromresource_test1
7 | setbodyfromresource_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | http://0.0.0.0:9001/1/setbodyfrommessage
14 |
15 |
16 | 2
17 | action
18 | setbody:message:edi
19 |
20 |
21 | 3
22 | sink
23 | print:Message Body: ${bodyAs(String)}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | edi
34 |
35 |
36 |
37 | UNOA
38 | 2
39 |
40 |
41 | 8714252014808
42 | 14
43 |
44 |
45 | 8714252011517
46 | 14
47 |
48 |
49 | 130402
50 | 1219
51 |
52 | 24535
53 |
54 |
55 |
56 | 24546
57 |
58 | IFTMIN
59 | D
60 | 96A
61 | UN
62 |
63 |
64 |
65 |
66 |
67 | 340
68 |
69 | 347605
70 | 9
71 |
72 |
73 |
74 | 137
75 | 20130402
76 | 102
77 |
78 |
79 |
80 |
81 | 2
82 | 20130404
83 | 102
84 |
85 |
86 |
87 |
88 | 200
89 | 20130403
90 | 102
91 |
92 |
93 |
94 |
95 | 11
96 |
97 |
98 | N
99 |
100 |
101 |
102 | DEL
103 |
104 | EXACT DONDERDAG 4.4 TUSSEN 8.15-12.00 UUR
105 | AFLEVEREN
106 |
107 |
108 |
109 |
110 | 6
111 |
112 | CIP
113 |
114 |
115 |
116 |
117 |
118 | DP
119 |
120 | DUMMY B.V.
121 |
122 |
123 | VERLENGDE VOORBEELDWEG 123
124 |
125 | AMSTERDAM
126 | 1234AB
127 | 670
128 |
129 |
130 |
131 |
132 | CZ
133 |
134 | DUMMY WIRE & CABLE B.V.
135 |
136 |
137 | INDUSTRIEGEBIED: 1234
138 | VOORBEELDWEG 10
139 |
140 | AMSTERDAM
141 | 1234 AB
142 | 670
143 |
144 |
145 |
146 | IC
147 |
148 | JANE DOE
149 |
150 |
151 |
152 |
153 | +31(0)12 3456789
154 | TE
155 |
156 |
157 |
158 |
159 |
160 |
161 | SF
162 |
163 | DUMMY WIRE & CABLE B.V.
164 |
165 |
166 | INDUSTRIEGEBIED: 1234
167 | VOORBEELDWEG 10
168 |
169 | AMSTERDAM
170 | 1234 AB
171 | 670
172 |
173 |
174 |
175 | IC
176 |
177 | JANE DOE
178 |
179 |
180 |
181 |
182 | +31(0)12 3456789
183 | TE
184 |
185 |
186 |
187 |
188 |
189 |
190 | FW
191 |
192 | LOGISTICS B.V.
193 |
194 | 1234 AB
195 | 670
196 |
197 |
198 |
199 |
200 | 1.0
201 |
202 | 1.0
203 | E827
204 | 9
205 |
206 |
207 |
208 |
209 | UST
210 | 9
211 |
212 |
213 |
214 |
215 | AAE
216 |
217 | G
218 |
219 |
220 | KGM
221 | 24.0
222 |
223 |
224 |
225 |
226 |
227 | AAE
228 |
229 | GMC
230 |
231 |
232 | MTQ
233 | 80.0
234 |
235 |
236 |
237 |
238 |
239 | 1
240 |
241 | MTR
242 | 41.0
243 | 41.0
244 | 48.0
245 |
246 |
247 |
248 |
249 |
250 | 33E
251 |
252 |
253 | BJ
254 |
255 | 00387142520086154710
256 |
257 |
258 |
259 |
260 |
261 |
262 | 98126
263 | 24546
264 |
265 |
266 |
267 | 1
268 | 24535
269 |
270 | ]]>
271 |
272 |
273 |
274 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/dil/dovetail/xmltoedifact_dil.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | xmltoedifact_test1
7 | xmltoedifact_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | https://0.0.0.0:9001/1/xmltoedifact
14 |
15 |
16 | 2
17 | action
18 | setbody:message:edifact
19 |
20 |
21 | 3
22 | action
23 | xmltoedifact
24 |
25 | d96a
26 |
27 |
28 |
29 | 4
30 | sink
31 | velocity:Message Body: ${bodyAs(String)}
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | edifact
42 |
43 |
44 |
45 | UNOA
46 | 2
47 |
48 |
49 | 8714252014808
50 | 14
51 |
52 |
53 | 8714252011517
54 | 14
55 |
56 |
57 | 130402
58 | 1219
59 |
60 | 24535
61 |
62 |
63 |
64 | 24546
65 |
66 | IFTMIN
67 | D
68 | 96A
69 | UN
70 |
71 |
72 |
73 |
74 |
75 | 340
76 |
77 | 347605
78 | 9
79 |
80 |
81 |
82 | 137
83 | 20130402
84 | 102
85 |
86 |
87 |
88 |
89 | 2
90 | 20130404
91 | 102
92 |
93 |
94 |
95 |
96 | 200
97 | 20130403
98 | 102
99 |
100 |
101 |
102 |
103 | 11
104 |
105 |
106 | N
107 |
108 |
109 |
110 | DEL
111 |
112 | EXACT DONDERDAG 4.4 TUSSEN 8.15-12.00 UUR
113 | AFLEVEREN
114 |
115 |
116 |
117 |
118 | 6
119 |
120 | CIP
121 |
122 |
123 |
124 |
125 |
126 | DP
127 |
128 | DUMMY B.V.
129 |
130 |
131 | VERLENGDE VOORBEELDWEG 123
132 |
133 | AMSTERDAM
134 | 1234AB
135 | 670
136 |
137 |
138 |
139 |
140 | CZ
141 |
142 | DUMMY WIRE & CABLE B.V.
143 |
144 |
145 | INDUSTRIEGEBIED: 1234
146 | VOORBEELDWEG 10
147 |
148 | AMSTERDAM
149 | 1234 AB
150 | 670
151 |
152 |
153 |
154 | IC
155 |
156 | JANE DOE
157 |
158 |
159 |
160 |
161 | +31(0)12 3456789
162 | TE
163 |
164 |
165 |
166 |
167 |
168 |
169 | SF
170 |
171 | DUMMY WIRE & CABLE B.V.
172 |
173 |
174 | INDUSTRIEGEBIED: 1234
175 | VOORBEELDWEG 10
176 |
177 | AMSTERDAM
178 | 1234 AB
179 | 670
180 |
181 |
182 |
183 | IC
184 |
185 | JANE DOE
186 |
187 |
188 |
189 |
190 | +31(0)12 3456789
191 | TE
192 |
193 |
194 |
195 |
196 |
197 |
198 | FW
199 |
200 | LOGISTICS B.V.
201 |
202 | 1234 AB
203 | 670
204 |
205 |
206 |
207 |
208 | 1.0
209 |
210 | 1.0
211 | E827
212 | 9
213 |
214 |
215 |
216 |
217 | UST
218 | 9
219 |
220 |
221 |
222 |
223 | AAE
224 |
225 | G
226 |
227 |
228 | KGM
229 | 24.0
230 |
231 |
232 |
233 |
234 |
235 | AAE
236 |
237 | GMC
238 |
239 |
240 | MTQ
241 | 80.0
242 |
243 |
244 |
245 |
246 |
247 | 1
248 |
249 | MTR
250 | 41.0
251 | 41.0
252 | 48.0
253 |
254 |
255 |
256 |
257 |
258 | 33E
259 |
260 |
261 | BJ
262 |
263 | 00387142520086154710
264 |
265 |
266 |
267 |
268 |
269 |
270 | 98126
271 | 24546
272 |
273 |
274 |
275 | 1
276 | 24535
277 |
278 | ]]>
279 |
280 |
281 |
282 |
--------------------------------------------------------------------------------
/dil/dovetail/edifactstandards_dil.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | edifactstandards_test1
7 | edifactstandards_test1
8 | esb
9 |
10 |
11 | 1
12 | source
13 | https://0.0.0.0:9001/1/xmltoedifactstandards
14 |
15 |
16 | 2
17 | action
18 | setbody:message:edifactstandards
19 |
20 |
21 | 3
22 | action
23 | edifact-standards:XML_TO_IFTFCC_D00B
24 |
25 |
26 | 4
27 | sink
28 | velocity:Message Body: ${bodyAs(String)}
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | edifactstandards
39 |
40 |
41 |
42 | 025647
43 |
44 | UNOC
45 | 3
46 |
47 |
48 | ICT
49 |
50 |
51 | DCH
52 |
53 |
54 | 190917
55 | 941
56 |
57 |
58 |
59 | 1
60 | 025647
61 |
62 |
63 |
64 |
65 | 1
66 |
67 | IFTMIN
68 | D
69 | 99B
70 | UN
71 |
72 |
73 |
74 | 9
75 |
76 | 340
77 |
78 |
79 | 467332
80 |
81 |
82 |
83 |
84 | 137
85 | 201909170941
86 | 203
87 |
88 |
89 |
90 |
91 | 63
92 | 201910071200
93 | 203
94 |
95 |
96 |
97 |
98 | 27
99 |
100 |
101 | 2
102 |
103 |
104 |
105 | AAI
106 |
107 | Vorlauf per Barge
108 |
109 |
110 |
111 |
112 | 7
113 | 10010
114 | KGM
115 |
116 |
117 |
118 |
119 | 11
120 | 11
121 | NMP
122 |
123 |
124 |
125 |
126 | 16
127 | 1
128 | NMP
129 |
130 |
131 |
132 | 39
133 | 1
134 |
135 |
136 |
137 |
138 | FF
139 | 910/USKC/73986
140 |
141 |
142 |
143 |
144 |
145 |
146 | AEW
147 | HAMVA3466600
148 |
149 |
150 |
151 |
152 |
153 |
154 | ER
155 | HAMVA3466600
156 |
157 |
158 |
159 |
160 |
161 |
162 | ERN
163 | 2009527741
164 |
165 |
166 |
167 |
168 |
169 | 10
170 |
171 | 1
172 |
173 |
174 | 16
175 |
176 |
177 | BARGE
178 |
179 |
180 |
181 |
182 | 133
183 | 20191001
184 | 102
185 |
186 |
187 |
188 |
189 |
190 | 20
191 | 123
192 |
193 | 1
194 |
195 |
196 | 13
197 |
198 |
199 | SANTA BARBARA
200 |
201 |
202 |
203 |
204 | 9
205 |
206 | NLRTM
207 | 6
208 | ROTTERDAM
209 |
210 |
211 |
212 |
213 | 133
214 | 20191008
215 | 102
216 |
217 |
218 |
219 |
220 |
221 | 12
222 |
223 | ZADUR
224 | 6
225 | DURBAN
226 |
227 |
228 |
229 |
230 | 132
231 | 20191101
232 | 102
233 |
234 |
235 |
236 |
237 |
238 |
239 | MS
240 |
241 | ICT
242 |
243 |
244 |
245 |
246 | IC
247 |
248 | V. Pachalkov
249 |
250 |
251 |
252 |
253 | 02131/9249227
254 | TE
255 |
256 |
257 |
258 |
259 | 02131/9249530
260 | FX
261 |
262 |
263 |
264 |
265 | v.pachalkov@ict-germany.de
266 | EM
267 |
268 |
269 |
270 |
271 |
272 |
273 | MR
274 |
275 | DCH
276 |
277 |
278 |
279 |
280 | EB
281 |
282 | Dispo
283 |
284 |
285 |
286 |
287 |
288 |
289 | AG
290 |
291 | ONE
292 |
293 |
294 |
295 |
296 |
297 | PW
298 | Erkrath
299 | 40699
300 | DE
301 |
302 | 528204
303 |
304 |
305 | Talke GmbH & Co.KG
306 | Lager Hendricks
307 |
308 |
309 | Am Tönisberg 6
310 |
311 |
312 |
313 |
314 |
315 | ERN
316 | 2009527741
317 |
318 |
319 |
320 |
321 | 200
322 | 201910011100
323 | 203
324 |
325 |
326 |
327 |
328 |
329 |
330 | SF
331 | Düsseldorf
332 | 40221
333 | DE
334 |
335 | 106
336 |
337 |
338 | DCH Düsseldorfer
339 | Container-Hafen GmbH
340 |
341 |
342 | Wesermünder Str. 17
343 |
344 |
345 |
346 |
347 |
348 | ST
349 | ROTTERDAM
350 | NL
351 |
352 | 75384
353 |
354 |
355 | APM TERMINALS
356 |
357 |
358 | Coloradoweg 50
359 |
360 |
361 |
362 |
363 |
364 | 1
365 |
366 | 11
367 | IBC
368 |
369 |
370 |
371 | AAA
372 |
373 | Sovermol® 805
374 | 850KG Steel/Plastics IBC
375 | HS-NO 38249992
376 |
377 |
378 |
379 |
380 | WT
381 |
382 | AAE
383 |
384 |
385 | KGM
386 | 10010
387 |
388 |
389 |
390 |
391 |
392 | WT
393 |
394 | AAL
395 |
396 |
397 | KGM
398 | 9350
399 |
400 |
401 |
402 |
403 |
404 |
405 | CN
406 | 2
407 |
408 | 22G0
409 | 4
410 |
411 |
412 |
413 |
414 |
415 |
416 | ]]>
417 |
418 |
419 |
420 |
--------------------------------------------------------------------------------