You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ay...@apache.org on 2011/11/30 19:41:03 UTC
svn commit: r1208687 - in
/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring:
SpringBeansTest.java endpoints2.xml
Author: ay
Date: Wed Nov 30 18:41:02 2011
New Revision: 1208687
URL: http://svn.apache.org/viewvc?rev=1208687&view=rev
Log:
add another two endpoints two buses wiring test
Added:
cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints2.xml (with props)
Modified:
cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
Modified: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java?rev=1208687&r1=1208686&r2=1208687&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java Wed Nov 30 18:41:02 2011
@@ -398,5 +398,38 @@ public class SpringBeansTest extends Ass
}
+ @Test
+ public void testTwoEndpointsWithTwoBuses() throws Exception {
+ ClassPathXmlApplicationContext ctx = null;
+ Bus cxf1 = null;
+ Bus cxf2 = null;
+ try {
+ ctx = new ClassPathXmlApplicationContext("/org/apache/cxf/jaxws/spring/endpoints2.xml");
+ EndpointImpl ep1 = (EndpointImpl) ctx.getBean("ep1");
+ assertNotNull(ep1);
+ cxf1 = (Bus) ctx.getBean("cxf1");
+ assertNotNull(cxf1);
+ assertEquals(cxf1, ep1.getBus());
+ assertEquals("barf", ep1.getBus().getProperty("foo"));
+
+ EndpointImpl ep2 = (EndpointImpl) ctx.getBean("ep2");
+ assertNotNull(ep2);
+ cxf2 = (Bus) ctx.getBean("cxf2");
+ assertNotNull(cxf2);
+ assertEquals(cxf2, ep2.getBus());
+ assertEquals("snarf", ep2.getBus().getProperty("foo"));
+
+ } finally {
+ if (cxf1 != null) {
+ cxf1.shutdown(true);
+ }
+ if (cxf2 != null) {
+ cxf2.shutdown(true);
+ }
+ if (ctx != null) {
+ ctx.close();
+ }
+ }
+ }
}
Added: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints2.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints2.xml?rev=1208687&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints2.xml (added)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints2.xml Wed Nov 30 18:41:02 2011
@@ -0,0 +1,51 @@
+<?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://cxf.apache.org/core"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+
+ <cxf:bus bus="cxf1">
+ <cxf:properties>
+ <entry key="foo" value="barf"/>
+ </cxf:properties>
+ </cxf:bus>
+
+ <cxf:bus bus="cxf2">
+ <cxf:properties>
+ <entry key="foo" value="snarf"/>
+ </cxf:properties>
+ </cxf:bus>
+
+ <jaxws:endpoint id="ep1" address="/path/one"
+ implementor="org.apache.hello_world_soap_http.GreeterImpl"
+ bus="cxf1"/>
+
+ <jaxws:endpoint id="ep2" address="/path/two"
+ implementor="org.apache.hello_world_soap_http.GreeterImpl"
+ bus="cxf2"/>
+
+</beans>
\ No newline at end of file
Propchange: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints2.xml
------------------------------------------------------------------------------
svn:executable = *