-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2c061f
commit 7e1588f
Showing
5 changed files
with
219 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
camel/src/main/java/com/integration/camel/services/SimpleServiceOrderService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
|