camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandros Karypidis <akary...@yahoo.gr>
Subject Newbiew: from(cxf).to(file) doesn't work
Date Sun, 22 Nov 2009 21:41:37 GMT
Hi,

I'm trying to create my "hello world" of  CXF 2.2.4 + Camel 2.0.0. The 
idea is simple: I publish a WSDL as a camel-cxf endpoint and add a route 
to a file endpoint. If I understand correctly, that would lead to files 
being created in a folder, containing the SOAP xml of the web service. 
When I call the web service, camel logs:

23:32:12,375 DEBUG DefaultErrorHandler:197 - Failed delivery for 
exchangeId: ID-athka536anb-1479-1258925491062-0-0. On delivery attempt: 
0 caught: 
org.apache.camel.component.file.GenericFileOperationFailedException: 
Cannot store file: \outfiles\ID-athka536anb-1479-1258925491062-1-0
23:32:12,375 DEBUG DefaultErrorHandler:361 - This exchange is not 
handled so its marked as failed: Exchange[Message: 
[com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl@72e235]]

My Spring beans.xml looks like:

    ...
    xmlns:camel-cfg="http://camel.apache.org/schema/spring"
    xmlns:camel-cxf="http://camel.apache.org/schema/cxf"
    ...

    <camel-cxf:cxfEndpoint id="asyncMessagingProvider"
        address="/AsyncMessagingServiceProvider" 
serviceClass="svc.impl.messaging.AsyncMessagingServiceProvider"
        wsdlURL="WEB-INF/wsdl/AsyncMessaging-Oneway-SOAP11.wsdl" />

    <bean id="asyncRouteBuilder" 
class="svc.impl.messaging.AsyncRouteBuilder" />

    <camel-cfg:camelContext id="camelContext">
        <camel-cfg:routeBuilder ref="asyncRouteBuilder" />
    </camel-cfg:camelContext>

The router has a configure() as follows:

    @Override
    public void configure() throws Exception {
        from("cxf:bean:asyncMessagingProvider").to("file:///outfiles/");
    }

When I call the web service, the folder "/outfiles" is created, which 
makes it appear that the route is connected properly, but no file is put 
inside it. Again, all I see (I have enabled debug-level logging) is:

23:32:12,375 DEBUG DefaultErrorHandler:197 - Failed delivery for 
exchangeId: ID-athka536anb-1479-1258925491062-0-0. On delivery attempt: 
0 caught: 
org.apache.camel.component.file.GenericFileOperationFailedException: 
Cannot store file: \outfiles\ID-athka536anb-1479-1258925491062-1-0
23:32:12,375 DEBUG DefaultErrorHandler:361 - This exchange is not 
handled so its marked as failed: Exchange[Message: 
[com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl@72e235]]


Mime
View raw message