42 changed files with 801 additions and 0 deletions
Split View
Diff Options
-
38camel-cxf-maven-example-master/.classpath
-
2camel-cxf-maven-example-master/.gitignore
-
23camel-cxf-maven-example-master/.project
-
8camel-cxf-maven-example-master/.settings/org.eclipse.jdt.core.prefs
-
4camel-cxf-maven-example-master/.settings/org.eclipse.m2e.core.prefs
-
11camel-cxf-maven-example-master/README.md
-
174camel-cxf-maven-example-master/pom.xml
-
12camel-cxf-maven-example-master/src/main/java/com/steve/research/CamelMain.java
-
41camel-cxf-maven-example-master/src/main/java/com/steve/research/MyRoute.java
-
43camel-cxf-maven-example-master/src/main/java/com/steve/research/ProductServiceImpl.java
-
30camel-cxf-maven-example-master/src/main/resources/example-camel-context.xml
-
65camel-cxf-maven-example-master/src/main/resources/wsdl/HelloService.wsdl
-
63camel-cxf-maven-example-master/src/main/resources/wsdl/ProductService.wsdl
-
30camel-cxf-maven-example-master/src/test/java/com/steve/research/MyRouteTest.java
-
BINcamel-cxf-maven-example-master/target/camel-cxf-maven-example-1.0-SNAPSHOT.jar
-
BINcamel-cxf-maven-example-master/target/classes/com/moodykettle/webservice/helloworld/HelloWorld.class
-
BINcamel-cxf-maven-example-master/target/classes/com/moodykettle/webservice/helloworld/HelloWorldService.class
-
BINcamel-cxf-maven-example-master/target/classes/com/moodykettle/webservice/helloworld/ObjectFactory.class
-
BINcamel-cxf-maven-example-master/target/classes/com/moodykettle/webservice/helloworld/Product.class
-
BINcamel-cxf-maven-example-master/target/classes/com/moodykettle/webservice/helloworld/ProductRequest.class
-
BINcamel-cxf-maven-example-master/target/classes/com/moodykettle/webservice/helloworld/ProductResponse.class
-
BINcamel-cxf-maven-example-master/target/classes/com/moodykettle/webservice/helloworld/ProductService.class
-
BINcamel-cxf-maven-example-master/target/classes/com/moodykettle/webservice/helloworld/SayHello.class
-
BINcamel-cxf-maven-example-master/target/classes/com/moodykettle/webservice/helloworld/SayHelloResponse.class
-
BINcamel-cxf-maven-example-master/target/classes/com/moodykettle/webservice/helloworld/package-info.class
-
BINcamel-cxf-maven-example-master/target/classes/com/steve/research/CamelMain.class
-
BINcamel-cxf-maven-example-master/target/classes/com/steve/research/MyRoute.class
-
BINcamel-cxf-maven-example-master/target/classes/com/steve/research/ProductServiceImpl$Product.class
-
BINcamel-cxf-maven-example-master/target/classes/com/steve/research/ProductServiceImpl.class
-
30camel-cxf-maven-example-master/target/classes/example-camel-context.xml
-
65camel-cxf-maven-example-master/target/classes/wsdl/HelloService.wsdl
-
63camel-cxf-maven-example-master/target/classes/wsdl/ProductService.wsdl
-
BINcamel-cxf-maven-example-master/target/cxf-codegen-plugin-markers/.03BA8A379A1C11045D1B73515CFEEC0594F0D3C6
-
BINcamel-cxf-maven-example-master/target/cxf-codegen-plugin-markers/.6916CA2A5478EADC9F34E4CDF39BE8BFB10429B0
-
5camel-cxf-maven-example-master/target/maven-archiver/pom.properties
-
11camel-cxf-maven-example-master/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
-
13camel-cxf-maven-example-master/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
-
0camel-cxf-maven-example-master/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
-
1camel-cxf-maven-example-master/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
-
65camel-cxf-maven-example-master/target/surefire-reports/TEST-com.steve.research.MyRouteTest.xml
-
4camel-cxf-maven-example-master/target/surefire-reports/com.steve.research.MyRouteTest.txt
-
BINcamel-cxf-maven-example-master/target/test-classes/com/steve/research/MyRouteTest.class
@ -0,0 +1,38 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<classpath> |
|||
<classpathentry kind="src" output="target/classes" path="src/main/java"> |
|||
<attributes> |
|||
<attribute name="optional" value="true"/> |
|||
<attribute name="maven.pomderived" value="true"/> |
|||
</attributes> |
|||
</classpathentry> |
|||
<classpathentry kind="src" output="target/classes" path="src/main/generated"> |
|||
<attributes> |
|||
<attribute name="optional" value="true"/> |
|||
<attribute name="maven.pomderived" value="true"/> |
|||
</attributes> |
|||
</classpathentry> |
|||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> |
|||
<attributes> |
|||
<attribute name="maven.pomderived" value="true"/> |
|||
</attributes> |
|||
</classpathentry> |
|||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> |
|||
<attributes> |
|||
<attribute name="optional" value="true"/> |
|||
<attribute name="maven.pomderived" value="true"/> |
|||
<attribute name="test" 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"> |
|||
<attributes> |
|||
<attribute name="maven.pomderived" value="true"/> |
|||
</attributes> |
|||
</classpathentry> |
|||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> |
|||
<attributes> |
|||
<attribute name="maven.pomderived" value="true"/> |
|||
</attributes> |
|||
</classpathentry> |
|||
<classpathentry kind="output" path="target/classes"/> |
|||
</classpath> |
|||
@ -0,0 +1,2 @@ |
|||
.idea |
|||
src/main/generated |
|||
@ -0,0 +1,23 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<projectDescription> |
|||
<name>camel-cxf-maven-example</name> |
|||
<comment></comment> |
|||
<projects> |
|||
</projects> |
|||
<buildSpec> |
|||
<buildCommand> |
|||
<name>org.eclipse.jdt.core.javabuilder</name> |
|||
<arguments> |
|||
</arguments> |
|||
</buildCommand> |
|||
<buildCommand> |
|||
<name>org.eclipse.m2e.core.maven2Builder</name> |
|||
<arguments> |
|||
</arguments> |
|||
</buildCommand> |
|||
</buildSpec> |
|||
<natures> |
|||
<nature>org.eclipse.jdt.core.javanature</nature> |
|||
<nature>org.eclipse.m2e.core.maven2Nature</nature> |
|||
</natures> |
|||
</projectDescription> |
|||
@ -0,0 +1,8 @@ |
|||
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.problem.enablePreviewFeatures=disabled |
|||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning |
|||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore |
|||
org.eclipse.jdt.core.compiler.release=disabled |
|||
org.eclipse.jdt.core.compiler.source=1.5 |
|||
@ -0,0 +1,4 @@ |
|||
activeProfiles= |
|||
eclipse.preferences.version=1 |
|||
resolveWorkspaceProjects=true |
|||
version=1 |
|||
@ -0,0 +1,11 @@ |
|||
## Camel / CXF Maven Example |
|||
|
|||
This is a Hello World project using Apache Camel and Apache CXF |
|||
|
|||
A simple web service, HelloService.wsdl is exposed. |
|||
|
|||
Build and run the main class. |
|||
|
|||
The url is http://localhost:8080/HelloService?wsdl |
|||
|
|||
Test via SOAP-UI. |
|||
@ -0,0 +1,174 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<groupId>com.steve.research</groupId> |
|||
<artifactId>camel-cxf-maven-example</artifactId> |
|||
<version>1.0-SNAPSHOT</version> |
|||
|
|||
<properties> |
|||
<!-- <camel.version>2.14.1</camel.version> --> |
|||
<!-- <cxf.version>3.0.2</cxf.version> --> |
|||
<!-- <spring.version>3.1.0.RELEASE</spring.version> --> |
|||
<log4j.version>1.2.12</log4j.version> |
|||
<slf4j.version>1.6.4</slf4j.version> |
|||
<camel.version>2.17.0.redhat-630187</camel.version> |
|||
<cxf.version>3.1.5.redhat-630187</cxf.version> |
|||
<activemq.camel.version>5.11.0.redhat-630187</activemq.camel.version> |
|||
<spring.version>3.2.16.RELEASE</spring.version> |
|||
<cxf.codegen.version>3.1.5.redhat-630187</cxf.codegen.version> |
|||
</properties> |
|||
|
|||
<dependencies> |
|||
<!-- camel --> |
|||
<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.springframework</groupId> |
|||
<artifactId>spring-context</artifactId> |
|||
<version>${spring.version}</version> |
|||
</dependency> |
|||
|
|||
<!-- logging --> |
|||
<dependency> |
|||
<groupId>org.slf4j</groupId> |
|||
<artifactId>slf4j-api</artifactId> |
|||
<version>${slf4j.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.slf4j</groupId> |
|||
<artifactId>slf4j-simple</artifactId> |
|||
<version>${slf4j.version}</version> |
|||
</dependency> |
|||
|
|||
<!-- test --> |
|||
<dependency> |
|||
<groupId>org.apache.camel</groupId> |
|||
<artifactId>camel-test</artifactId> |
|||
<version>${camel.version}</version> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework</groupId> |
|||
<artifactId>spring-test</artifactId> |
|||
<version>${spring.version}</version> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
<repositories> |
|||
<repository> |
|||
<id>red-hat-ga</id> |
|||
<url>https://maven.repository.redhat.com/ga</url> |
|||
</repository> |
|||
</repositories> |
|||
|
|||
<pluginRepositories> |
|||
<pluginRepository> |
|||
<id>Fuse - repo</id> |
|||
<url>http://repo.fusesource.com/nexus/content/groups/public/</url> |
|||
</pluginRepository> |
|||
<pluginRepository> |
|||
<id>Apache Snapshot</id> |
|||
<url>http://repository.apache.org/snapshots/</url> |
|||
</pluginRepository> |
|||
<pluginRepository> |
|||
<id>central</id> |
|||
<name>Central Repository</name> |
|||
<url>https://repo.maven.apache.org/maven2</url> |
|||
<layout>default</layout> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
<releases> |
|||
<updatePolicy>never</updatePolicy> |
|||
</releases> |
|||
</pluginRepository> |
|||
<pluginRepository> |
|||
<id>red-hat-ga</id> |
|||
<url>https://maven.repository.redhat.com/ga</url> |
|||
<releases> |
|||
<enabled>true</enabled> |
|||
</releases> |
|||
<snapshots> |
|||
<enabled>false</enabled> |
|||
</snapshots> |
|||
</pluginRepository> |
|||
</pluginRepositories> |
|||
<build> |
|||
<defaultGoal>clean install</defaultGoal> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.apache.cxf</groupId> |
|||
<artifactId>cxf-codegen-plugin</artifactId> |
|||
<!-- <version>2.6.0.fuse-71-047</version> --> |
|||
<version>${cxf.codegen.version}</version> |
|||
<executions> |
|||
<execution> |
|||
<phase>generate-sources</phase> |
|||
<goals> |
|||
<goal>wsdl2java</goal> |
|||
</goals> |
|||
<configuration> |
|||
<sourceRoot>${basedir}/src/main/generated</sourceRoot> |
|||
<wsdlOptions> |
|||
<wsdlOption> |
|||
<wsdl>${basedir}/src/main/resources/wsdl/HelloService.wsdl</wsdl> |
|||
</wsdlOption> |
|||
</wsdlOptions> |
|||
</configuration> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.codehaus.mojo</groupId> |
|||
<artifactId>build-helper-maven-plugin</artifactId> |
|||
<version>1.7</version> |
|||
<executions> |
|||
<execution> |
|||
<id>test</id> |
|||
<phase>generate-sources</phase> |
|||
<goals> |
|||
<goal>add-source</goal> |
|||
</goals> |
|||
<configuration> |
|||
<sources> |
|||
<source>${basedir}/src/main/generated</source> |
|||
</sources> |
|||
</configuration> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-clean-plugin</artifactId> |
|||
<version>2.4.1</version> |
|||
<configuration> |
|||
<filesets> |
|||
<fileset> |
|||
<directory>${basedir}/src/main/generated</directory> |
|||
<includes> |
|||
<include>**/*</include> |
|||
</includes> |
|||
</fileset> |
|||
</filesets> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
|
|||
</project> |
|||
@ -0,0 +1,12 @@ |
|||
package com.steve.research; |
|||
|
|||
import org.springframework.context.support.ClassPathXmlApplicationContext; |
|||
|
|||
public class CamelMain { |
|||
public static void main(String[] args) throws Exception { |
|||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("/example-camel-context.xml"); |
|||
context.start(); |
|||
context.registerShutdownHook(); |
|||
Thread.currentThread().join(); |
|||
} |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
package com.steve.research; |
|||
|
|||
import org.apache.camel.builder.RouteBuilder; |
|||
|
|||
import com.moodykettle.webservice.helloworld.ProductResponse; |
|||
|
|||
public class MyRoute extends RouteBuilder { |
|||
private String webserviceEndpoint = "cxf:bean:helloService"; |
|||
private String productWebserviceEndpoint = "cxf:bean:productService?defaultOperationName=getProductDetails"; |
|||
|
|||
@Override |
|||
public void configure() throws Exception { |
|||
from("timer:foo?period=1s&repeatCount=1") |
|||
.log("Hello!!!") |
|||
; |
|||
|
|||
from(webserviceEndpoint) |
|||
.log("WebService opearation: ${header.operationName}") |
|||
.log("WebService body: ${body}") |
|||
.setBody(simple("Hello, ${body}")) |
|||
; |
|||
|
|||
ProductResponse response = new ProductResponse(); |
|||
response.setId("001"); |
|||
response.setDescription("Test"); |
|||
response.setPrice(101); |
|||
from(productWebserviceEndpoint) |
|||
.log("WebService opearation: ${header.operationName}") |
|||
.log("WebService body: ${body}") |
|||
.bean(ProductServiceImpl.class) |
|||
; |
|||
} |
|||
|
|||
public void setWebserviceEndpoint(String webserviceEndpoint) { |
|||
this.webserviceEndpoint = webserviceEndpoint; |
|||
} |
|||
|
|||
public void setProductWebserviceEndpoint(String w) { |
|||
this.productWebserviceEndpoint = w; |
|||
} |
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
package com.steve.research; |
|||
|
|||
|
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
import com.moodykettle.webservice.helloworld.ProductResponse; |
|||
|
|||
public class ProductServiceImpl { |
|||
public ProductResponse getProductDetails(com.moodykettle.webservice.helloworld.ProductRequest request) { |
|||
Product product = PRODUCT_DETAILS.get(request.getId()); |
|||
/*if (product == null) { |
|||
throw new ProductNotFoundException(request.getId()); |
|||
}*/ |
|||
|
|||
ProductResponse response = new ProductResponse(); |
|||
response.setId(product.id); |
|||
response.setDescription(product.description); |
|||
response.setPrice(product.price); |
|||
System.out.println("Coming HERE >>>>>>>>>>>>>>>>>>"); |
|||
return response; |
|||
} |
|||
|
|||
private static Map<String, Product> PRODUCT_DETAILS = new HashMap<String, Product>(); |
|||
|
|||
private static class Product { |
|||
private String id; |
|||
private String description; |
|||
private int price; |
|||
|
|||
Product(String id, String desc, int price) { |
|||
this.id = id; |
|||
this.description = desc; |
|||
this.price = price; |
|||
} |
|||
} |
|||
|
|||
static { |
|||
PRODUCT_DETAILS.put("P01", new Product("P01", "Laptop", 40000)); |
|||
PRODUCT_DETAILS.put("P02", new Product("P02", "Mobile", 14000)); |
|||
PRODUCT_DETAILS.put("P03", new Product("P03", "Tablet", 30000)); |
|||
} |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<beans xmlns="http://www.springframework.org/schema/beans" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" |
|||
xmlns:cxf="http://camel.apache.org/schema/cxf" xmlns:beans="http://www.springframework.org/schema/beans" |
|||
xsi:schemaLocation=" |
|||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd |
|||
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd |
|||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> |
|||
|
|||
<import resource="classpath:META-INF/cxf/cxf.xml" /> |
|||
|
|||
<cxf:cxfEndpoint id="helloService" |
|||
address="http://localhost:8080/HelloService" serviceClass="com.moodykettle.webservice.helloworld.HelloWorld" |
|||
wsdlURL="wsdl/HelloService.wsdl"> |
|||
</cxf:cxfEndpoint> |
|||
|
|||
<cxf:cxfEndpoint id="productService" |
|||
address="http://localhost:8081/ProductService" serviceClass="com.moodykettle.webservice.helloworld.Product" |
|||
wsdlURL="wsdl/ProductService.wsdl"> |
|||
</cxf:cxfEndpoint> |
|||
|
|||
|
|||
|
|||
<beans:bean id="myRoute" class="com.steve.research.MyRoute"/> |
|||
|
|||
<camel:camelContext> |
|||
<camel:routeBuilder ref="myRoute"/> |
|||
</camel:camelContext> |
|||
|
|||
</beans> |
|||
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|||
<wsdl:definitions xmlns:impl="http://helloworld.webservice.moodykettle.com" |
|||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" |
|||
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" |
|||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|||
targetNamespace="http://helloworld.webservice.moodykettle.com"> |
|||
|
|||
<wsdl:types> |
|||
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://helloworld.webservice.moodykettle.com"> |
|||
<element name="sayHello"> |
|||
<complexType> |
|||
<sequence> |
|||
<element name="name" type="xsd:string"/> |
|||
</sequence> |
|||
</complexType> |
|||
</element> |
|||
<element name="sayHelloResponse"> |
|||
<complexType> |
|||
<sequence> |
|||
<element name="sayHelloReturn" type="xsd:string"/> |
|||
</sequence> |
|||
</complexType> |
|||
</element> |
|||
</schema> |
|||
</wsdl:types> |
|||
|
|||
<wsdl:message name="sayHelloResponse"> |
|||
<wsdl:part element="impl:sayHelloResponse" name="parameters"> |
|||
</wsdl:part> |
|||
</wsdl:message> |
|||
|
|||
<wsdl:message name="sayHelloRequest"> |
|||
<wsdl:part element="impl:sayHello" name="parameters"> |
|||
</wsdl:part> |
|||
</wsdl:message> |
|||
|
|||
<wsdl:portType name="HelloWorld"> |
|||
<wsdl:operation name="sayHello"> |
|||
<wsdl:input message="impl:sayHelloRequest" name="sayHelloRequest"> |
|||
</wsdl:input> |
|||
<wsdl:output message="impl:sayHelloResponse" name="sayHelloResponse"> |
|||
</wsdl:output> |
|||
</wsdl:operation> |
|||
</wsdl:portType> |
|||
|
|||
<wsdl:binding name="HelloWorldSoapBinding" type="impl:HelloWorld"> |
|||
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> |
|||
<wsdl:operation name="sayHello"> |
|||
<wsdlsoap:operation soapAction=""/> |
|||
<wsdl:input name="sayHelloRequest"> |
|||
<wsdlsoap:body use="literal"/> |
|||
</wsdl:input> |
|||
<wsdl:output name="sayHelloResponse"> |
|||
<wsdlsoap:body use="literal"/> |
|||
</wsdl:output> |
|||
</wsdl:operation> |
|||
</wsdl:binding> |
|||
|
|||
<wsdl:service name="HelloWorldService"> |
|||
<wsdl:port binding="impl:HelloWorldSoapBinding" name="HelloWorld"> |
|||
<wsdlsoap:address location="http://localhost:8080/WebService/services/HelloWorld"/> |
|||
</wsdl:port> |
|||
</wsdl:service> |
|||
|
|||
</wsdl:definitions> |
|||
@ -0,0 +1,63 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|||
<wsdl:definitions xmlns:impl="http://helloworld.webservice.moodykettle.com" |
|||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" |
|||
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" |
|||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|||
targetNamespace="http://helloworld.webservice.moodykettle.com"> |
|||
|
|||
<wsdl:types> |
|||
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://helloworld.webservice.moodykettle.com"> |
|||
<element name="productRequest"> |
|||
<complexType> |
|||
<sequence> |
|||
<element name="id" type="xsd:string" /> |
|||
</sequence> |
|||
</complexType> |
|||
</element> |
|||
<element name="productResponse"> |
|||
<complexType> |
|||
<sequence> |
|||
<element name="id" type="xsd:string" /> |
|||
<element name="description" type="xsd:string" /> |
|||
<element name="price" type="xsd:int" /> |
|||
</sequence> |
|||
</complexType> |
|||
</element> |
|||
</schema> |
|||
</wsdl:types> |
|||
|
|||
<wsdl:message name="getProductDetails"> |
|||
<wsdl:part element="impl:productRequest" name="parameters"> </wsdl:part> |
|||
</wsdl:message> |
|||
|
|||
<wsdl:message name="getProductDetailsResponse"> |
|||
<wsdl:part element="impl:productResponse" name="parameters"> </wsdl:part> |
|||
</wsdl:message> |
|||
|
|||
<wsdl:portType name="Product"> |
|||
<wsdl:operation name="getProductDetails"> |
|||
<wsdl:input message="impl:getProductDetails" name="getProductDetails"> </wsdl:input> |
|||
<wsdl:output message="impl:getProductDetailsResponse" name="getProductDetailsResponse"> </wsdl:output> |
|||
</wsdl:operation> |
|||
</wsdl:portType> |
|||
|
|||
<wsdl:binding name="ProductServiceSoapBinding" type="impl:Product"> |
|||
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> |
|||
<wsdl:operation name="getProductDetails"> |
|||
<wsdlsoap:operation soapAction=""/> |
|||
<wsdl:input name="getProductDetails"> |
|||
<wsdlsoap:body use="literal"/> |
|||
</wsdl:input> |
|||
<wsdl:output name="getProductDetailsResponse"> |
|||
<wsdlsoap:body use="literal"/> |
|||
</wsdl:output> |
|||
</wsdl:operation> |
|||
</wsdl:binding> |
|||
|
|||
<wsdl:service name="ProductService"> |
|||
<wsdl:port binding="impl:ProductServiceSoapBinding" name="ProductPort"> |
|||
<wsdlsoap:address location="http://localhost:8080/WebService/services/Product"/> |
|||
</wsdl:port> |
|||
</wsdl:service> |
|||
|
|||
</wsdl:definitions> |
|||
@ -0,0 +1,30 @@ |
|||
package com.steve.research; |
|||
|
|||
import org.apache.camel.Produce; |
|||
import org.apache.camel.ProducerTemplate; |
|||
import org.apache.camel.builder.RouteBuilder; |
|||
import org.apache.camel.test.junit4.CamelTestSupport; |
|||
import org.junit.Test; |
|||
|
|||
public class MyRouteTest extends CamelTestSupport { |
|||
|
|||
@Produce(uri = "direct:webservice") |
|||
ProducerTemplate webservice; |
|||
|
|||
@Produce(uri = "direct:webservice2") |
|||
ProducerTemplate webservice2; |
|||
|
|||
@Test |
|||
public void testFoo() throws InterruptedException { |
|||
Object result = webservice.requestBody("Dude"); |
|||
System.out.println("Result from web service call was: " + result); |
|||
} |
|||
|
|||
@Override |
|||
protected RouteBuilder createRouteBuilder() throws Exception { |
|||
MyRoute myRoute = new MyRoute(); |
|||
myRoute.setWebserviceEndpoint("direct:webservice"); |
|||
myRoute.setProductWebserviceEndpoint("direct:webservice2"); |
|||
return myRoute; |
|||
} |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<beans xmlns="http://www.springframework.org/schema/beans" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" |
|||
xmlns:cxf="http://camel.apache.org/schema/cxf" xmlns:beans="http://www.springframework.org/schema/beans" |
|||
xsi:schemaLocation=" |
|||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd |
|||
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd |
|||
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> |
|||
|
|||
<import resource="classpath:META-INF/cxf/cxf.xml" /> |
|||
|
|||
<cxf:cxfEndpoint id="helloService" |
|||
address="http://localhost:8080/HelloService" serviceClass="com.moodykettle.webservice.helloworld.HelloWorld" |
|||
wsdlURL="wsdl/HelloService.wsdl"> |
|||
</cxf:cxfEndpoint> |
|||
|
|||
<cxf:cxfEndpoint id="productService" |
|||
address="http://localhost:8081/ProductService" serviceClass="com.moodykettle.webservice.helloworld.Product" |
|||
wsdlURL="wsdl/ProductService.wsdl"> |
|||
</cxf:cxfEndpoint> |
|||
|
|||
|
|||
|
|||
<beans:bean id="myRoute" class="com.steve.research.MyRoute"/> |
|||
|
|||
<camel:camelContext> |
|||
<camel:routeBuilder ref="myRoute"/> |
|||
</camel:camelContext> |
|||
|
|||
</beans> |
|||
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|||
<wsdl:definitions xmlns:impl="http://helloworld.webservice.moodykettle.com" |
|||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" |
|||
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" |
|||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|||
targetNamespace="http://helloworld.webservice.moodykettle.com"> |
|||
|
|||
<wsdl:types> |
|||
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://helloworld.webservice.moodykettle.com"> |
|||
<element name="sayHello"> |
|||
<complexType> |
|||
<sequence> |
|||
<element name="name" type="xsd:string"/> |
|||
</sequence> |
|||
</complexType> |
|||
</element> |
|||
<element name="sayHelloResponse"> |
|||
<complexType> |
|||
<sequence> |
|||
<element name="sayHelloReturn" type="xsd:string"/> |
|||
</sequence> |
|||
</complexType> |
|||
</element> |
|||
</schema> |
|||
</wsdl:types> |
|||
|
|||
<wsdl:message name="sayHelloResponse"> |
|||
<wsdl:part element="impl:sayHelloResponse" name="parameters"> |
|||
</wsdl:part> |
|||
</wsdl:message> |
|||
|
|||
<wsdl:message name="sayHelloRequest"> |
|||
<wsdl:part element="impl:sayHello" name="parameters"> |
|||
</wsdl:part> |
|||
</wsdl:message> |
|||
|
|||
<wsdl:portType name="HelloWorld"> |
|||
<wsdl:operation name="sayHello"> |
|||
<wsdl:input message="impl:sayHelloRequest" name="sayHelloRequest"> |
|||
</wsdl:input> |
|||
<wsdl:output message="impl:sayHelloResponse" name="sayHelloResponse"> |
|||
</wsdl:output> |
|||
</wsdl:operation> |
|||
</wsdl:portType> |
|||
|
|||
<wsdl:binding name="HelloWorldSoapBinding" type="impl:HelloWorld"> |
|||
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> |
|||
<wsdl:operation name="sayHello"> |
|||
<wsdlsoap:operation soapAction=""/> |
|||
<wsdl:input name="sayHelloRequest"> |
|||
<wsdlsoap:body use="literal"/> |
|||
</wsdl:input> |
|||
<wsdl:output name="sayHelloResponse"> |
|||
<wsdlsoap:body use="literal"/> |
|||
</wsdl:output> |
|||
</wsdl:operation> |
|||
</wsdl:binding> |
|||
|
|||
<wsdl:service name="HelloWorldService"> |
|||
<wsdl:port binding="impl:HelloWorldSoapBinding" name="HelloWorld"> |
|||
<wsdlsoap:address location="http://localhost:8080/WebService/services/HelloWorld"/> |
|||
</wsdl:port> |
|||
</wsdl:service> |
|||
|
|||
</wsdl:definitions> |
|||
@ -0,0 +1,63 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|||
<wsdl:definitions xmlns:impl="http://helloworld.webservice.moodykettle.com" |
|||
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" |
|||
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" |
|||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
|||
targetNamespace="http://helloworld.webservice.moodykettle.com"> |
|||
|
|||
<wsdl:types> |
|||
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://helloworld.webservice.moodykettle.com"> |
|||
<element name="productRequest"> |
|||
<complexType> |
|||
<sequence> |
|||
<element name="id" type="xsd:string" /> |
|||
</sequence> |
|||
</complexType> |
|||
</element> |
|||
<element name="productResponse"> |
|||
<complexType> |
|||
<sequence> |
|||
<element name="id" type="xsd:string" /> |
|||
<element name="description" type="xsd:string" /> |
|||
<element name="price" type="xsd:int" /> |
|||
</sequence> |
|||
</complexType> |
|||
</element> |
|||
</schema> |
|||
</wsdl:types> |
|||
|
|||
<wsdl:message name="getProductDetails"> |
|||
<wsdl:part element="impl:productRequest" name="parameters"> </wsdl:part> |
|||
</wsdl:message> |
|||
|
|||
<wsdl:message name="getProductDetailsResponse"> |
|||
<wsdl:part element="impl:productResponse" name="parameters"> </wsdl:part> |
|||
</wsdl:message> |
|||
|
|||
<wsdl:portType name="Product"> |
|||
<wsdl:operation name="getProductDetails"> |
|||
<wsdl:input message="impl:getProductDetails" name="getProductDetails"> </wsdl:input> |
|||
<wsdl:output message="impl:getProductDetailsResponse" name="getProductDetailsResponse"> </wsdl:output> |
|||
</wsdl:operation> |
|||
</wsdl:portType> |
|||
|
|||
<wsdl:binding name="ProductServiceSoapBinding" type="impl:Product"> |
|||
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> |
|||
<wsdl:operation name="getProductDetails"> |
|||
<wsdlsoap:operation soapAction=""/> |
|||
<wsdl:input name="getProductDetails"> |
|||
<wsdlsoap:body use="literal"/> |
|||
</wsdl:input> |
|||
<wsdl:output name="getProductDetailsResponse"> |
|||
<wsdlsoap:body use="literal"/> |
|||
</wsdl:output> |
|||
</wsdl:operation> |
|||
</wsdl:binding> |
|||
|
|||
<wsdl:service name="ProductService"> |
|||
<wsdl:port binding="impl:ProductServiceSoapBinding" name="ProductPort"> |
|||
<wsdlsoap:address location="http://localhost:8080/WebService/services/Product"/> |
|||
</wsdl:port> |
|||
</wsdl:service> |
|||
|
|||
</wsdl:definitions> |
|||
@ -0,0 +1,5 @@ |
|||
#Generated by Maven |
|||
#Sat Mar 27 01:27:46 IST 2021 |
|||
version=1.0-SNAPSHOT |
|||
groupId=com.steve.research |
|||
artifactId=camel-cxf-maven-example |
|||
@ -0,0 +1,11 @@ |
|||
com\moodykettle\webservice\helloworld\HelloWorldService.class |
|||
com\moodykettle\webservice\helloworld\ProductService.class |
|||
com\moodykettle\webservice\helloworld\ProductRequest.class |
|||
com\moodykettle\webservice\helloworld\HelloWorld.class |
|||
com\moodykettle\webservice\helloworld\ProductResponse.class |
|||
com\steve\research\CamelMain.class |
|||
com\moodykettle\webservice\helloworld\ObjectFactory.class |
|||
com\moodykettle\webservice\helloworld\package-info.class |
|||
com\moodykettle\webservice\helloworld\Product.class |
|||
com\moodykettle\webservice\helloworld\SayHelloResponse.class |
|||
com\moodykettle\webservice\helloworld\SayHello.class |
|||
@ -0,0 +1,13 @@ |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\java\com\steve\research\CamelMain.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\generated\com\moodykettle\webservice\helloworld\SayHelloResponse.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\java\com\steve\research\MyRoute.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\generated\com\moodykettle\webservice\helloworld\ProductService.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\generated\com\moodykettle\webservice\helloworld\package-info.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\generated\com\moodykettle\webservice\helloworld\HelloWorldService.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\generated\com\moodykettle\webservice\helloworld\ObjectFactory.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\java\com\steve\research\ProductServiceImpl.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\generated\com\moodykettle\webservice\helloworld\Product.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\generated\com\moodykettle\webservice\helloworld\ProductResponse.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\generated\com\moodykettle\webservice\helloworld\ProductRequest.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\generated\com\moodykettle\webservice\helloworld\HelloWorld.java |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\main\generated\com\moodykettle\webservice\helloworld\SayHello.java |
|||
@ -0,0 +1 @@ |
|||
C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\src\test\java\com\steve\research\MyRouteTest.java |
|||
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<testsuite tests="1" failures="0" name="com.steve.research.MyRouteTest" time="0.485" errors="0" skipped="0"> |
|||
<properties> |
|||
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/> |
|||
<property name="sun.boot.library.path" value="C:\Java\jdk1.8.0_281\jre\bin"/> |
|||
<property name="java.vm.version" value="25.281-b09"/> |
|||
<property name="java.vm.vendor" value="Oracle Corporation"/> |
|||
<property name="maven.multiModuleProjectDirectory" value="C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master"/> |
|||
<property name="java.vendor.url" value="http://java.oracle.com/"/> |
|||
<property name="path.separator" value=";"/> |
|||
<property name="guice.disable.misplaced.annotation.check" value="true"/> |
|||
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/> |
|||
<property name="file.encoding.pkg" value="sun.io"/> |
|||
<property name="user.script" value=""/> |
|||
<property name="user.country" value="IN"/> |
|||
<property name="sun.java.launcher" value="SUN_STANDARD"/> |
|||
<property name="sun.os.patch.level" value=""/> |
|||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/> |
|||
<property name="user.dir" value="C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master"/> |
|||
<property name="java.runtime.version" value="1.8.0_281-b09"/> |
|||
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/> |
|||
<property name="java.endorsed.dirs" value="C:\Java\jdk1.8.0_281\jre\lib\endorsed"/> |
|||
<property name="os.arch" value="amd64"/> |
|||
<property name="java.io.tmpdir" value="C:\Users\macko\AppData\Local\Temp\"/> |
|||
<property name="line.separator" value=" |
|||
"/> |
|||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/> |
|||
<property name="user.variant" value=""/> |
|||
<property name="os.name" value="Windows 10"/> |
|||
<property name="classworlds.conf" value="C:\Users\macko\eclipse-workspace-casestudy3\.metadata\.plugins\org.eclipse.m2e.launching\launches\m2conf2229280176160758005.tmp"/> |
|||
<property name="sun.jnu.encoding" value="Cp1252"/> |
|||
<property name="java.library.path" value="C:\Java\jdk1.8.0_281\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Users/macko/Downloads/eclipse-java-2020-12-R-win32-x86_64/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;C:/Users/macko/Downloads/eclipse-java-2020-12-R-win32-x86_64/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Users\macko\AppData\Local\Microsoft\WindowsApps;C:\Users\macko\.dotnet\tools;C:\Users\macko\Downloads\eclipse-java-2020-12-R-win32-x86_64\eclipse;;."/> |
|||
<property name="java.specification.name" value="Java Platform API Specification"/> |
|||
<property name="java.class.version" value="52.0"/> |
|||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/> |
|||
<property name="os.version" value="10.0"/> |
|||
<property name="user.home" value="C:\Users\macko"/> |
|||
<property name="user.timezone" value="Asia/Calcutta"/> |
|||
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/> |
|||
<property name="java.specification.version" value="1.8"/> |
|||
<property name="file.encoding" value="Cp1252"/> |
|||
<property name="user.name" value="macko"/> |
|||
<property name="java.class.path" value="C:\Users\macko\Downloads\eclipse-java-2020-12-R-win32-x86_64\eclipse\plugins\org.eclipse.m2e.maven.runtime_1.16.0.20200610-1735\jars\plexus-classworlds-2.6.0.jar"/> |
|||
<property name="java.vm.specification.version" value="1.8"/> |
|||
<property name="sun.arch.data.model" value="64"/> |
|||
<property name="java.home" value="C:\Java\jdk1.8.0_281\jre"/> |
|||
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -B install"/> |
|||
<property name="java.specification.vendor" value="Oracle Corporation"/> |
|||
<property name="user.language" value="en"/> |
|||
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/> |
|||
<property name="java.vm.info" value="mixed mode"/> |
|||
<property name="java.version" value="1.8.0_281"/> |
|||
<property name="java.ext.dirs" value="C:\Java\jdk1.8.0_281\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/> |
|||
<property name="sun.boot.class.path" value="C:\Java\jdk1.8.0_281\jre\lib\resources.jar;C:\Java\jdk1.8.0_281\jre\lib\rt.jar;C:\Java\jdk1.8.0_281\jre\lib\sunrsasign.jar;C:\Java\jdk1.8.0_281\jre\lib\jsse.jar;C:\Java\jdk1.8.0_281\jre\lib\jce.jar;C:\Java\jdk1.8.0_281\jre\lib\charsets.jar;C:\Java\jdk1.8.0_281\jre\lib\jfr.jar;C:\Java\jdk1.8.0_281\jre\classes"/> |
|||
<property name="java.vendor" value="Oracle Corporation"/> |
|||
<property name="maven.home" value="C:\Users\macko\Desktop\gyno-fuse\camel-cxf-maven-example-master\camel-cxf-maven-example-master\EMBEDDED"/> |
|||
<property name="file.separator" value="\"/> |
|||
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/> |
|||
<property name="sun.cpu.endian" value="little"/> |
|||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/> |
|||
<property name="sun.desktop" value="windows"/> |
|||
<property name="sun.cpu.isalist" value="amd64"/> |
|||
</properties> |
|||
<testcase classname="com.steve.research.MyRouteTest" name="testFoo" time="0.485"/> |
|||
</testsuite> |
|||
@ -0,0 +1,4 @@ |
|||
------------------------------------------------------------------------------- |
|||
Test set: com.steve.research.MyRouteTest |
|||
------------------------------------------------------------------------------- |
|||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.576 sec |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue