cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r986412 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/
Date Tue, 17 Aug 2010 17:45:04 GMT
Author: dkulp
Date: Tue Aug 17 17:45:03 2010
New Revision: 986412

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

........
  r986402 | dkulp | 2010-08-17 13:20:49 -0400 (Tue, 17 Aug 2010) | 2 lines
  
  [CXF-2945] Support the publish=false use case on jaxws:endpoint
  Patch from Eric Pederson applied
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml

Propchange: cxf/branches/2.2.x-fixes/
            ('svn:mergeinfo' removed)

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

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java?rev=986412&r1=986411&r2=986412&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
Tue Aug 17 17:45:03 2010
@@ -63,6 +63,7 @@ public class EndpointDefinitionParser ex
     @Override
     protected void doParse(Element element, ParserContext ctx, BeanDefinitionBuilder bean)
{
         boolean isAbstract = false;
+        boolean publish = true;
         NamedNodeMap atts = element.getAttributes();
         String bus = element.getAttribute("bus");
         if (StringUtils.isEmpty(bus)) {
@@ -93,6 +94,8 @@ public class EndpointDefinitionParser ex
             } else if ("abstract".equals(name)) {
                 bean.setAbstract(true);
                 isAbstract = true;
+            } else if ("publish".equals(name)) {
+                publish = "true".equals(val);
             }
         }
         
@@ -119,7 +122,9 @@ public class EndpointDefinitionParser ex
             elem = DOMUtils.getNextElement(elem);
         }
         if (!isAbstract) {
-            bean.setInitMethodName("publish");
+            if (publish) {
+                bean.setInitMethodName("publish");
+            }
             bean.setDestroyMethodName("stop");
         }
         // We don't want to delay the registration of our Server

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java?rev=986412&r1=986411&r2=986412&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java
Tue Aug 17 17:45:03 2010
@@ -162,6 +162,9 @@ public class SpringBeansTest extends Ass
         }
         assertTrue("Could not find server factory with autogenerated id", found);
 
+        ep = getEndpointImplBean("unpublishedEndpoint", ctx);
+        assertFalse("Unpublished endpoint is published", ep.isPublished());
+
         testInterceptors(ctx);
     }
 

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml?rev=986412&r1=986411&r2=986412&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/endpoints.xml
Tue Aug 17 17:45:03 2010
@@ -141,4 +141,9 @@ http://cxf.apache.org/jaxws http://cxf.a
     implementor="#greeter"
     address="http://localhost:8080/publishedEndpointUrl"
     publishedEndpointUrl="http://cxf.apache.org/Greeter"/>
+
+  <jaxws:endpoint id="unpublishedEndpoint"
+    implementor="#greeter"
+    address="http://localhost:8080/unpublished"
+    publish="false"/>
 </beans>



Mime
View raw message