cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dand...@apache.org
Subject svn commit: r531501 - in /incubator/cxf/trunk: distribution/src/main/release/samples/spring_http/webapp/WEB-INF/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/ systests/src/tes...
Date Mon, 23 Apr 2007 15:29:31 GMT
Author: dandiep
Date: Mon Apr 23 08:29:28 2007
New Revision: 531501

URL: http://svn.apache.org/viewvc?view=rev&rev=531501
Log:
o Remove requirement inside CXFServlet for setting the default bus
  to null by wiring in the CXF Bus bean via the definition parsers.
o Fix the spring_http demo by using the correct URL
o Apply Jeff's CXF-590 patch which corrects our getServiceName() impl 


Modified:
    incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/webapp/WEB-INF/beans.xml
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ServerBeanDefinitionParser.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/webapp/WEB-INF/beans.xml?view=diff&rev=531501&r1=531500&r2=531501
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/webapp/WEB-INF/beans.xml
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/spring_http/webapp/WEB-INF/beans.xml
Mon Apr 23 08:29:28 2007
@@ -32,7 +32,7 @@
 	<jaxws:endpoint 
 	  id="helloWorld" 
 	  implementor="demo.spring.HelloWorldImpl" 
-	  address="http://localhost/HelloWorld" />
+	  address="/HelloWorld" />
 	  
 </beans>
 <!-- END SNIPPET: beans -->

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java?view=diff&rev=531501&r1=531500&r2=531501
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
Mon Apr 23 08:29:28 2007
@@ -50,6 +50,11 @@
     @Override
     protected void doParse(Element element, ParserContext ctx, BeanDefinitionBuilder bean)
{
         NamedNodeMap atts = element.getAttributes();
+        String bus = element.getAttribute("bus");
+        if (bus == null && ctx.getRegistry().containsBeanDefinition("cxf")) {
+            bean.addConstructorArgReference("cxf");
+        } 
+        
         for (int i = 0; i < atts.getLength(); i++) {
             Attr node = (Attr) atts.item(i);
             String val = node.getValue();
@@ -58,7 +63,7 @@
 
             if ("createdFromAPI".equals(name)) {
                 bean.setAbstract(true);
-            } else if (isAttribute(pre, name) && !"publish".equals(name)) {
+            } else if (isAttribute(pre, name) && !"publish".equals(name) &&
!"bus".equals(name)) {
                 if ("endpointName".equals(name) || "serviceName".equals(name)) {
                     QName q = parseQName(element, val);
                     bean.addPropertyValue(name, q);

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java?view=diff&rev=531501&r1=531500&r2=531501
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/JaxWsProxyFactoryBeanDefinitionParser.java
Mon Apr 23 08:29:28 2007
@@ -49,7 +49,7 @@
         NamedNodeMap atts = element.getAttributes();
         String id = null;
         boolean createdFromAPI = false;
-        
+        boolean setBus = false;
         for (int i = 0; i < atts.getLength(); i++) {
             Attr node = (Attr) atts.item(i);
             String val = node.getValue();
@@ -65,6 +65,9 @@
                     QName q = parseQName(element, val);
                     bean.addPropertyValue(name, q);
                 } else {
+                    if ("bus".equals(name)) {
+                        setBus = true;
+                    }
                     mapToProperty(bean, name, val);
                 }
             } else if ("id".equals(name)) {
@@ -73,7 +76,10 @@
                 bean.setAbstract(true);
                 clientBean.setAbstract(true);
             }
-            
+        }
+        
+        if (!setBus && ctx.getRegistry().containsBeanDefinition("cxf")) {
+            bean.addPropertyReference("bus", "cxf");
         }
         
         NodeList children = element.getChildNodes();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ServerBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ServerBeanDefinitionParser.java?view=diff&rev=531501&r1=531500&r2=531501
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ServerBeanDefinitionParser.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/ServerBeanDefinitionParser.java
Mon Apr 23 08:29:28 2007
@@ -42,6 +42,7 @@
     @Override
     protected void doParse(Element element, ParserContext ctx, BeanDefinitionBuilder bean)
{
         NamedNodeMap atts = element.getAttributes();
+        boolean setBus = false;
         for (int i = 0; i < atts.getLength(); i++) {
             Attr node = (Attr) atts.item(i);
             String val = node.getValue();
@@ -54,8 +55,15 @@
             } else if ("abstract".equals(name)) {
                 bean.setAbstract(true);
             } else {
+                if ("bus".equals(name)) {
+                    setBus = true;
+                }
                 mapToProperty(bean, name, val);
             }
+        }
+        
+        if (!setBus && ctx.getRegistry().containsBeanDefinition("cxf")) {
+            bean.addPropertyReference("bus", "cxf");
         }
         
         NodeList children = element.getChildNodes();

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java?view=diff&rev=531501&r1=531500&r2=531501
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsImplementorInfo.java
Mon Apr 23 08:29:28 2007
@@ -97,10 +97,10 @@
         String namespace = null;
 
         for (WebService service : wsAnnotations) {
-            if (!StringUtils.isEmpty(service.serviceName())) {
+            if (!StringUtils.isEmpty(service.serviceName()) && serviceName == null)
{
                 serviceName = service.serviceName();
             }
-            if (!StringUtils.isEmpty(service.targetNamespace())) {
+            if (!StringUtils.isEmpty(service.targetNamespace()) && namespace == null)
{
                 namespace = service.targetNamespace();
             }
         }
@@ -131,10 +131,10 @@
         String portName = null;
         String namespace = null;
         for (WebService service : wsAnnotations) {
-            if (!StringUtils.isEmpty(service.portName())) {
+            if (!StringUtils.isEmpty(service.portName()) && portName == null) {
                 portName = service.portName();
             }
-            if (!StringUtils.isEmpty(service.targetNamespace())) {
+            if (!StringUtils.isEmpty(service.targetNamespace()) && namespace == null)
{
                 namespace = service.targetNamespace();
             }
             
@@ -175,10 +175,10 @@
             }
         } else {
             for (WebService service : wsAnnotations) {
-                if (!StringUtils.isEmpty(service.name())) {
+                if (!StringUtils.isEmpty(service.name()) && name == null) {
                     name = service.name();
                 }
-                if (!StringUtils.isEmpty(service.targetNamespace())) {
+                if (!StringUtils.isEmpty(service.targetNamespace()) && namespace
== null) {
                     namespace = service.targetNamespace();
                 }
             }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java?view=diff&rev=531501&r1=531500&r2=531501
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
Mon Apr 23 08:29:28 2007
@@ -51,7 +51,6 @@
         URL resource = getClass().getResource("/wsdl/hello_world.wsdl");
         assertNotNull(resource);
         svr.getServiceFactory().setWsdlURL(resource.toString());
-//        svr.setBus(getBus());
         svr.setServiceClass(GreeterImpl.class);
         svr.setAddress("http://localhost/services/Greeter");
         GreeterImpl greeter = new GreeterImpl();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java?view=diff&rev=531501&r1=531500&r2=531501
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/servlet/SpringServletTest.java
Mon Apr 23 08:29:28 2007
@@ -41,8 +41,6 @@
         return null;
     }
 
-
-
     @Test
     public void testInvokingSpringBeans() throws Exception {
 



Mime
View raw message