Author: ningjiang
Date: Fri Sep 16 06:22:38 2011
New Revision: 1171397
URL: http://svn.apache.org/viewvc?rev=1171397&view=rev
Log:
CAMEL-4452 Added unit test for the WSDL only route
Added:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterWSDLOnlyRouterTest.java
(with props)
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWSDLOnlyBeans.xml
(with props)
Added:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterWSDLOnlyRouterTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterWSDLOnlyRouterTest.java?rev=1171397&view=auto
==============================================================================
---
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterWSDLOnlyRouterTest.java
(added)
+++
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterWSDLOnlyRouterTest.java
Fri Sep 16 06:22:38 2011
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.cxf;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.AvailablePortFinder;
+import org.apache.hello_world_soap_http.GreeterImpl;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * The Greeter test with the PAYLOAD date format
+ */
+public class CxfGreeterWSDLOnlyRouterTest extends
AbstractCXFGreeterRouterTest {
+ protected static Endpoint endpoint;
+ @AfterClass
+ public static void stopService() {
+ if (endpoint != null) {
+ endpoint.stop();
+ }
+ }
+
+ @BeforeClass
+ public static void startService() {
+ Object implementor = new GreeterImpl();
+ String address = "http://localhost:" + getPort1() +
"/CxfGreeterWSDLOnlyRouterTest/SoapContext/SoapPort";
+ endpoint = Endpoint.publish(address, implementor);
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ public void configure() {
+
from("cxf:bean:routerEndpoint?dataFormat=PAYLOAD&publishedEndpointUrl=http://www.simple.com/services/test")
+ .to("cxf:bean:serviceEndpoint?dataFormat=PAYLOAD");
+ }
+ };
+ }
+
+
+ @Override
+ protected ClassPathXmlApplicationContext createApplicationContext() {
+ return new
ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEndpointWSDLOnlyBeans.xml");
+ }
+
+
+
+}
Propchange:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterWSDLOnlyRouterTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterWSDLOnlyRouterTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWSDLOnlyBeans.xml
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWSDLOnlyBeans.xml?rev=1171397&view=auto
==============================================================================
---
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWSDLOnlyBeans.xml
(added)
+++
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWSDLOnlyBeans.xml
Fri Sep 16 06:22:38 2011
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cxf="http://camel.apache.org/schema/cxf"
+
+ 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
+ ">
+
+ <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+ <import resource="classpath:META-INF/cxf/cxf.xml"/>
+ <!-- Added the import for testing the CAMEL-329 -->
+
+
+ <cxf:cxfEndpoint id="routerEndpoint"
address="http://localhost:${CXFTestSupport.port2}/CxfGreeterWSDLOnlyRouterTest/CamelContext/RouterPort"
+ wsdlURL="testutils/hello_world.wsdl"
+ endpointName="s:SoapPort"
+ serviceName="s:SOAPService"
+ xmlns:s="http://apache.org/hello_world_soap_http" />
+
+ <cxf:cxfEndpoint id="serviceEndpoint"
address="http://localhost:${CXFTestSupport.port1}/CxfGreeterWSDLOnlyRouterTest/SoapContext/SoapPort"
+ wsdlURL="testutils/hello_world.wsdl"
+ endpointName="s:SoapPort"
+ serviceName="s:SOAPService"
+ xmlns:s="http://apache.org/hello_world_soap_http" />
+
+</beans>
\ No newline at end of file
Propchange:
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWSDLOnlyBeans.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWSDLOnlyBeans.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointWSDLOnlyBeans.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml