cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r663147 - in /cxf/branches/2.0.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java systests/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java systests/src/test/resources/extrajaxbclass.xml
Date Wed, 04 Jun 2008 15:00:00 GMT
Author: dkulp
Date: Wed Jun  4 08:00:00 2008
New Revision: 663147

URL: http://svn.apache.org/viewvc?rev=663147&view=rev
Log:
Merged revisions 663131 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r663131 | dkulp | 2008-06-04 10:44:57 -0400 (Wed, 04 Jun 2008) | 2 lines
  
  [CXF-1629] Make sure endpoint properties are copied into the factory
........

Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
    cxf/branches/2.0.x-fixes/systests/src/test/resources/extrajaxbclass.xml

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java?rev=663147&r1=663146&r2=663147&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
Wed Jun  4 08:00:00 2008
@@ -282,6 +282,11 @@
             serverFactory.setFeatures(features);
             serverFactory.setInvoker(invoker);
             serverFactory.setSchemaLocations(schemaLocations);
+            if (serverFactory.getProperties() != null) {
+                serverFactory.getProperties().putAll(properties);
+            } else {
+                serverFactory.setProperties(properties);
+            }
             
             // Be careful not to override any serverfactory settings as a user might
             // have supplied their own.

Modified: cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java?rev=663147&r1=663146&r2=663147&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
(original)
+++ cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
Wed Jun  4 08:00:00 2008
@@ -22,6 +22,7 @@
 import java.net.URL;
 
 import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
 
 import org.w3c.dom.Document;
 
@@ -54,6 +55,19 @@
 
         assertEquals(expected, widgetFromService);
     }
+
+    @Test
+    public void testExtraSubClassWithJaxbFromEndpoint() throws Throwable {
+        Widget expected = new ExtendedWidget(42, "blah", "blah", true, true);
+        
+        ((BindingProvider)testClient).getRequestContext()
+            .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
+                 "http://localhost:7081/service/TestEndpoint");
+        Widget widgetFromService = testClient.getWidgetById((long)42);
+
+        assertEquals(expected, widgetFromService);
+    }
+
     
     @Test
     public void testSchema() throws Exception {

Modified: cxf/branches/2.0.x-fixes/systests/src/test/resources/extrajaxbclass.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/resources/extrajaxbclass.xml?rev=663147&r1=663146&r2=663147&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/systests/src/test/resources/extrajaxbclass.xml (original)
+++ cxf/branches/2.0.x-fixes/systests/src/test/resources/extrajaxbclass.xml Wed Jun  4 08:00:00
2008
@@ -55,6 +55,24 @@
 		
 	</jaxws:server>
 	
+	<!-- Endpoint -->
+	<jaxws:endpoint id="testEndpoint" 
+		implementor="org.apache.cxf.systest.jaxb.service.TestServiceImpl" 
+		address="http://localhost:7081/service/TestEndpoint">
+	
+		<jaxws:properties>
+			<entry key="jaxb.additionalContextClasses">
+				<bean class="org.apache.cxf.systest.jaxb.util.ClassArrayFactoryBean">
+					<property name="classNames">
+						<list>
+							<value>org.apache.cxf.systest.jaxb.model.ExtendedWidget</value>
+						</list>
+					</property>
+				</bean>
+			</entry>
+		</jaxws:properties>
+	</jaxws:endpoint>
+	
 	
 	<!-- Client Proxy -->
 	<jaxws:client id="testClient" address="http://localhost:7081/service/TestService" serviceClass="org.apache.cxf.systest.jaxb.service.TestService">



Mime
View raw message