Skip to content

Commit

Permalink
Merge pull request #138 from assimbly/feature/issue-137/xml-to-json-c…
Browse files Browse the repository at this point in the history
…ustom-component---replicate-json-lib-behaviour

XML to JSON custom component - replicate Json-lib behaviour
  • Loading branch information
brunovg authored Jul 6, 2023
2 parents be7652d + 258b8d6 commit f5e196d
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.assimbly.dil.blocks.templates;

import org.apache.camel.builder.RouteBuilder;

public class JsonToXmlLegacy extends RouteBuilder {

@Override
public void configure() throws Exception {

routeTemplate("jsontoxmllegacy-action")
.templateParameter("routeconfiguration_id","0")
.templateOptionalParameter("options")
.templateParameter("in")
.templateParameter("out")
.from("{{in}}")
.routeConfigurationId("{{routeconfiguration_id}}")
.to("dataformat:custom-xmljsonlegacy:unmarshal?{{options}}")
.to("{{out}}");

routeTemplate("jsontoxmllegacy-sink")
.templateParameter("routeconfiguration_id","0")
.templateOptionalParameter("options")
.templateParameter("in")
.from("{{in}}")
.routeConfigurationId("{{routeconfiguration_id}}")
.to("dataformat:custom-xmljsonlegacy:unmarshal?{{options}}");

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.assimbly.dil.blocks.templates;

import org.apache.camel.builder.RouteBuilder;

public class XmlToJsonLegacy extends RouteBuilder {

@Override
public void configure() throws Exception {

routeTemplate("xmltojsonlegacy-action")
.templateParameter("routeconfiguration_id","0")
.templateOptionalParameter("options")
.templateParameter("in")
.templateParameter("out")
.from("{{in}}")
.routeConfigurationId("{{routeconfiguration_id}}")
.to("dataformat:custom-xmljsonlegacy:marshal?{{options}}")
.to("{{out}}");

routeTemplate("xmltojsonlegacy-sink")
.templateParameter("routeconfiguration_id","0")
.templateOptionalParameter("options")
.templateParameter("in")
.from("{{in}}")
.routeConfigurationId("{{routeconfiguration_id}}")
.to("dataformat:custom-xmljsonlegacy:marshal?{{options}}");

}

}

0 comments on commit f5e196d

Please sign in to comment.