Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmmartins committed Dec 19, 2017
1 parent b2c061f commit 7e1588f
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 8 deletions.
4 changes: 2 additions & 2 deletions camel/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
Expand Down
6 changes: 3 additions & 3 deletions camel/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.source=1.8
156 changes: 153 additions & 3 deletions camel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,168 @@
<groupId>com.integration</groupId>
<artifactId>camel</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<packaging>bundle</packaging>
<name>camel</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<camel.version>2.16.5</camel.version>
<cxf.version>3.1.9</cxf.version>
<spring.version>3.1.4.RELEASE</spring.version>
<activemq.version>5.14.5</activemq.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<category>OSGi</category>
</properties>

<dependencies>

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-stream</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jdbc</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-http</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>${activemq.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-servlet</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jackson</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-blueprint</artifactId>
<version>2.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.integration</groupId>
<artifactId>camel.module</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<configuration>
<useBlueprint>true</useBlueprint>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.2.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<DynamicImport-Package>*;oracle.jdbc;javax.naming.spi;javax.naming;javax.security.auth;javax.net;javax.net.ssl;javax.management;javax.security.auth.callback;org.omg.CORBA;javax.security.auth.login;org.springframework.aop;org.springframework.aop.framework;org.aopalliance.aop</DynamicImport-Package>
</instructions>
<unpackBundle>false</unpackBundle>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.integration.camel.services;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;

import com.integration.camel.module.to.SimpleServiceOrder;

@Path("/serviceorder")
public interface SimpleServiceOrderService {

@GET
@Path("/so/{label}/")
@Produces("application/json")
public SimpleServiceOrder getServiceOrderByLabel(@PathParam("label") String label);

@GET
@Path("/so/")
@Produces("application/json")
public List<SimpleServiceOrder> getServiceOrderList();

@POST
@Path("/so/")
public Response createNewServiceOrder(SimpleServiceOrder serviceOrder);

}
30 changes: 30 additions & 0 deletions camel/src/main/resources/OSGI-INF/blueprint/blueprint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

<cm:property-placeholder persistent-id="simpleProperties"
update-strategy="reload">
<cm:default-properties>
<cm:property name="CXFserver" value="http://localhost:8989/" />
<cm:property name="service" value="rest" />
</cm:default-properties>
</cm:property-placeholder>

<cxf:rsServer id="rsServer" address="${CXFserver}${service}"
serviceClass="com.integration.camel.services.SimpleServiceOrderService"
loggingFeatureEnabled="true" loggingSizeLimit="20" />

<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route id="SimpleServiceOrderRoute">
<from uri="cxfrs:bean:rsServer?bindingStyle=SimpleConsumer" />
<recipientList>
<simple>direct-vm:${header.operationName}</simple>
</recipientList>
</route>
</camelContext>
</blueprint>

0 comments on commit 7e1588f

Please sign in to comment.