Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 65197 invoked from network); 12 Mar 2009 08:02:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Mar 2009 08:02:11 -0000 Received: (qmail 16878 invoked by uid 500); 12 Mar 2009 08:02:11 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 16853 invoked by uid 500); 12 Mar 2009 08:02:11 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 16842 invoked by uid 500); 12 Mar 2009 08:02:11 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 16839 invoked by uid 99); 12 Mar 2009 08:02:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Mar 2009 01:02:11 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Mar 2009 08:02:02 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2F0FC234C04B for ; Thu, 12 Mar 2009 01:01:41 -0700 (PDT) Message-ID: <2039020808.1236844901191.JavaMail.jira@brutus> Date: Thu, 12 Mar 2009 01:01:41 -0700 (PDT) From: "Willem Jiang (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Assigned: (CAMEL-1431) camel-cxf and spring DSL does not work very well In-Reply-To: <1707846623.1236354524698.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned CAMEL-1431: ----------------------------------- Assignee: Willem Jiang > camel-cxf and spring DSL does not work very well > ------------------------------------------------ > > Key: CAMEL-1431 > URL: https://issues.apache.org/activemq/browse/CAMEL-1431 > Project: Apache Camel > Issue Type: Sub-task > Components: camel-cxf > Affects Versions: 2.0-M1 > Reporter: Charles Moulliard > Assignee: Willem Jiang > > Hi, > Camel-cxf and camel works very well when the routing is defined like this : > public class ReportIncidentRoutes extends RouteBuilder { > public void configure() throws Exception { > // webservice response for OK > OutputReportIncident OK = new OutputReportIncident(); > OK.setCode("0"); > // endpoint to our CXF webservice > String cxfEndpoint = "cxf://http://localhost:8080/camel-example/incident" > + "?serviceClass=org.apache.camel.example.reportincident.ReportIncidentEndpoint" > + "&wsdlURL=wsdl/report_incident.wsdl"; > // first part from the webservice -> file backup > from(cxfEndpoint) > // we need to convert the CXF payload to InputReportIncident that FilenameGenerator and velocity expects > .convertBodyTo(InputReportIncident.class) > // return OK as response > .transform(constant(OK)); > } > @ContextConfiguration > public class ReportIncidentRoutesTest extends AbstractJUnit4SpringContextTests { > > private static final transient Log LOG = LogFactory.getLog(ReportIncidentRoutesTest.class); > > @Autowired > protected CamelContext camelContext; > // should be the same address as we have in our route > private final static String ADDRESS = "http://localhost:8080/camel-example/incident"; > //private final static QName endpointName = new QName("http://reportincident.example.camel.apache.org", "ReportIncidentEndpoint"); > protected static ReportIncidentEndpoint createCXFClient() { > // we use CXF to create a client for us as its easier than JAXWS and works > JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); > factory.setServiceClass(ReportIncidentEndpoint.class); > factory.setAddress(ADDRESS); > //factory.setEndpointName(endpointName); > return (ReportIncidentEndpoint) factory.create(); > } > @Test > public void testRendportIncident() throws Exception { > > assertNotNull(camelContext); > // create input parameter > InputReportIncident input = new InputReportIncident(); > input.setIncidentId("123"); > input.setIncidentDate("2008-08-18"); > input.setGivenName("Claus"); > input.setFamilyName("Ibsen"); > input.setSummary("Bla"); > input.setDetails("Bla bla"); > input.setEmail("davsclaus@apache.org"); > input.setPhone("0045 2962 7576"); > // create the webservice client and send the request > ReportIncidentEndpoint client = createCXFClient(); > OutputReportIncident out = client.reportIncident(input); > // assert we got a OK back > assertEquals("0", out.getCode()); > } > > } > but not when the routing is defined in spring DSL > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:camel="http://camel.apache.org/schema/spring" > xmlns:cxf="http://camel.apache.org/schema/cxf" > xsi:schemaLocation=" http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.5.xsd > http://camel.apache.org/schema/osgi > http://camel.apache.org/schema/osgi/camel-osgi.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd > http://camel.apache.org/schema/cxf > http://camel.apache.org/schema/cxf/camel-cxf.xsd"> > > > > > > > > > address="http://localhost:8080/camel-example/incident" > wsdlURL="wsdl/report_incident.wsdl" > serviceClass="org.apache.camel.example.reportincident.ReportIncidentEndpoint" > xmlns:s="http://reportincident.example.camel.apache.org"> > > > > org.apache.camel.example.reportincident.routing > > > > > > > > > > > > > > In debugging mode, I see that the outputreportincident object is null when we call the method declared in the web service. So something happens with Spring & Cxf. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.