camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r711762 - in /activemq/camel/branches/camel-1.x: ./ components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/ components/camel-cxf/src/main/resources/schema/ components/camel-cxf/src/test/java/org/apache/camel/component/cxf/...
Date Thu, 06 Nov 2008 03:15:03 GMT
Author: ningjiang
Date: Wed Nov  5 19:15:03 2008
New Revision: 711762

URL: http://svn.apache.org/viewvc?rev=711762&view=rev
Log:
Merged revisions 711756 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r711756 | ningjiang | 2008-11-06 10:45:49 +0800 (Thu, 06 Nov 2008) | 1 line
  
  CAMEL-1056 Patch applied with thanks to William
........

Added:
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/wsdl_first/JaxwsTestHandler.java
      - copied unchanged from r711756, activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/wsdl_first/JaxwsTestHandler.java
Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBean.java
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanDefinitionParser.java
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstProcessorTest.java
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeans.xml
    activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstProcessor.xml

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov  5 19:15:03 2008
@@ -1 +1 @@
-/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531
+/activemq/camel/trunk:709850,711200,711206,711219-711220,711523,711531,711756

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Nov  5 19:15:03 2008
@@ -1 +1 @@
-/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-710013,711200,711206,711219-711220,711523,711531,711599,711655-711656
+/activemq/camel/trunk:1-708421,708553-709447,709449-709612,709614-709634,709636-710013,711200,711206,711219-711220,711523,711531,711599,711655-711656,711756

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBean.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBean.java?rev=711762&r1=711761&r2=711762&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBean.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBean.java
Wed Nov  5 19:15:03 2008
@@ -17,6 +17,8 @@
 package org.apache.camel.component.cxf.spring;
 
 
+import java.util.List;
+
 import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
 
@@ -24,7 +26,17 @@
  *
  */
 public class CxfEndpointBean extends AbstractWSDLBasedEndpointFactory {
+    private List handlers;
+
     public CxfEndpointBean() {
         setServiceFactory(new ReflectionServiceFactoryBean());
     }
+    
+    public List getHandlers() {
+        return handlers;
+    }
+    
+    public void setHandlers(List handlers) {
+        this.handlers = handlers;
+    }
 }

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanDefinitionParser.java?rev=711762&r1=711761&r2=711762&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanDefinitionParser.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanDefinitionParser.java
Wed Nov  5 19:15:03 2008
@@ -55,7 +55,8 @@
             setFirstChildAsProperty(el, ctx, bean, "bindingConfig");
         } else if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name)
             || "outInterceptors".equals(name) || "outFaultInterceptors".equals(name)
-            || "features".equals(name) || "schemaLocations".equals(name)) {
+            || "features".equals(name) || "schemaLocations".equals(name)
+            || "handlers".equals(name)) {
             java.util.List list = (java.util.List)ctx.getDelegate().parseListElement(el,
bean.getBeanDefinition());
             bean.addPropertyValue(name, list);
         } else {

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd?rev=711762&r1=711761&r2=711762&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/main/resources/schema/cxfEndpoint.xsd
Wed Nov  5 19:15:03 2008
@@ -41,6 +41,7 @@
             <xsd:element name="inFaultInterceptors" type="xsd:anyType" minOccurs="0"/>
           
             <xsd:element name="outInterceptors" type="xsd:anyType" minOccurs="0"/>
             <xsd:element name="outFaultInterceptors" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="handlers" type="xsd:anyType" minOccurs="0"/>
             <xsd:element name="properties" type="beans:mapType" minOccurs="0"/>
             <xsd:element name="schemaLocations" type="schemasType" minOccurs="0"/>
             <xsd:element name="serviceBean" type="xsd:anyType" minOccurs="0"/>

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstProcessorTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstProcessorTest.java?rev=711762&r1=711761&r2=711762&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstProcessorTest.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstProcessorTest.java
Wed Nov  5 19:15:03 2008
@@ -16,22 +16,6 @@
  */
 package org.apache.camel.component.cxf;
 
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Endpoint;
-import javax.xml.ws.Holder;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spring.SpringTestSupport;
-import org.apache.camel.wsdl_first.Person;
-import org.apache.camel.wsdl_first.PersonImpl;
-import org.apache.camel.wsdl_first.PersonService;
-import org.apache.camel.wsdl_first.UnknownPersonFault;
-import org.apache.cxf.endpoint.ServerImpl;
-import org.apache.cxf.frontend.ClientProxy;
-import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class CxfWsdlFirstProcessorTest extends CxfWsdlFirstTest {
@@ -41,4 +25,13 @@
         return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/WsdlFirstProcessor.xml");
     }
 
+    @Override
+    protected int getExpectedJaxwsHandlerMessageCount() {
+        return 4;
+    }
+    
+    @Override
+    protected int getExpectedJaxwsHandlerFaultCount() {
+        return 2;
+    }
 }

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java?rev=711762&r1=711761&r2=711762&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java
Wed Nov  5 19:15:03 2008
@@ -21,7 +21,6 @@
 import java.util.List;
 
 import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.Holder;
 import javax.xml.ws.WebServiceException;
@@ -31,13 +30,12 @@
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.wsdl_first.JaxwsTestHandler;
 import org.apache.camel.wsdl_first.Person;
 import org.apache.camel.wsdl_first.PersonImpl;
 import org.apache.camel.wsdl_first.PersonService;
 import org.apache.camel.wsdl_first.UnknownPersonFault;
 import org.apache.cxf.endpoint.ServerImpl;
-import org.apache.cxf.frontend.ClientProxy;
-import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.cxf.jaxws.EndpointImpl;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -86,6 +84,8 @@
 
     public void testInvokingServiceFromCXFClient() throws Exception {
 
+        JaxwsTestHandler myHandler = getMandatoryBean(JaxwsTestHandler.class, "myJaxwsHandler");
+        myHandler.reset();
         URL wsdlURL = getClass().getClassLoader().getResource("person.wsdl");
         PersonService ss = new PersonService(wsdlURL, new QName("http://camel.apache.org/wsdl-first",
"PersonService"));
         Person client = ss.getSoap();
@@ -112,7 +112,18 @@
             // Caught expected WebServiceException here
             assertTrue("Should get the xml vaildate error!", ex.getMessage().indexOf("MyStringType")
> 0);         
         }
+        
+        assertEquals(getExpectedJaxwsHandlerFaultCount(), myHandler.getFaultCount());
+        assertEquals(getExpectedJaxwsHandlerMessageCount(), myHandler.getMessageCount());
+
+    }
+
+    protected int getExpectedJaxwsHandlerMessageCount() {
+        return 11;
+    }
 
+    protected int getExpectedJaxwsHandlerFaultCount() {
+        return 8;
     }
 
     @SuppressWarnings("unchecked")

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeans.xml
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeans.xml?rev=711762&r1=711761&r2=711762&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeans.xml
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstBeans.xml
Wed Nov  5 19:15:03 2008
@@ -34,7 +34,10 @@
                    xmlns:person="http://camel.apache.org/wsdl-first">
       <cxf:properties>            
             <entry key="schema-validation-enabled" value="true" />
-      </cxf:properties>           
+      </cxf:properties>      
+      <cxf:handlers>
+          <ref bean="myJaxwsHandler"/> 
+      </cxf:handlers>     
   </cxf:cxfEndpoint> 
 
 
@@ -58,5 +61,7 @@
 
     </camelContext>
 
+    <bean id="myJaxwsHandler" class="org.apache.camel.wsdl_first.JaxwsTestHandler"/>
+
 
 </beans>

Modified: activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstProcessor.xml
URL: http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstProcessor.xml?rev=711762&r1=711761&r2=711762&view=diff
==============================================================================
--- activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstProcessor.xml
(original)
+++ activemq/camel/branches/camel-1.x/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/WsdlFirstProcessor.xml
Wed Nov  5 19:15:03 2008
@@ -36,6 +36,9 @@
         <cxf:properties>            
             <entry key="schema-validation-enabled" value="true" />
         </cxf:properties>
+        <cxf:handlers>
+          <ref bean="myJaxwsHandler"/> 
+      </cxf:handlers>     
     </cxf:cxfEndpoint> 
 
 	<cxf:cxfEndpoint id="serviceEndpoint"
@@ -63,6 +66,8 @@
 
 
 	</camelContext>
+	
+	<bean id="myJaxwsHandler" class="org.apache.camel.wsdl_first.JaxwsTestHandler"/>
 
 
 </beans>



Mime
View raw message