camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <>
Subject Re: Invoking web services with Camel Using CXF
Date Thu, 05 Mar 2009 16:50:42 GMT
On Wed, Mar 4, 2009 at 10:55 PM, Claus Ibsen <> wrote:
> There is a <setHeader> tag you can use to add the header, just like
> the Java DSL below.
> It might use a expression as subtype so you need to wrap it with
> <constant> for string litterals
> Something like this:
> <setHeader name="foo"><constant>Bar</constant></setHeader>

Thanks, Claus. I missed this element in the XSD.

>> The problem with this flavor is the following error:
>> org.apache.camel.RuntimeCamelException: Can't find the operation name
>> in the message!
>> To my knowledge, there is no way to add headers to a message exchange
>> via the XML. If I'm wrong about this I'd appreciate some suggestions
>> on how to get beyond the error.
>> 2) Below is the same route using the Java API:
>>    public void configure() {
>>                from("file:src/data?noop=true").process(new Processor() {
>>            public void process(Exchange exchange) throws Exception {
>>                Message in = exchange.getIn();
>>                in.setHeader("operationName", "sayHi");
>>            }
>>                }).
>>                to("cxf:http://localhost:9002/HelloWorld?serviceClass=demo.spring.HelloWorld");
>>        }
>> The problem with this route is that Camel hangs on the following line
>> indefinitely and I can't get it beyond it:
>> ...
>> INFO: Apache Camel 1.6.0 (CamelContext:camelContext) started
>> Mar 4, 2009 2:01:06 PM org.apache.camel.util.MainSupport generateDot
>> INFO: Generating DOT file for routes:
>> /Users/bsnyder/Desktop/eclipse-3.4/workspace-amq-trunk/camel-example-two/target/site/cameldoc
>> for: org.apache.camel.spring.SpringCamelContext@dd6a83 with name:
>> camelContext
>> If anyone can tell me how to move beyond this then I could move on to
>> the next issue.
>> Incidentally, patched the org.apache.camel.spring.Main class to add
>> the ability to disable the DOT file generation. But there is already a
>> property in the RunMojo named dotEnabled but it's read-only. Why is
>> this?
> Strange, as according to this you should be able to disable it:

I've now disabled this in the POM using the following configuration
and it's still hanging in the same location:


> Maybe we should let it be disabled by default as most people will NOT
> have Graphviz installed by default.

That's not a bad idea, but there should be some logging that indicates
the situation, i.e., Unable to locate the Graphviz executable,
disabling DOT generation.

>> Additionally, I've enabled debug logging on org.apache.camel and I'm
>> still only seeing info level output, even after cleaning and
>> rebuilding.
> Have you added log4j to the classpath and in
> src/main/resources?
> CXF is sadly using JDK Logging (This is really terrible IMHO, always
> use JCL as all the other frameworks does)
> Willem Jiang wrote something somewhere how to get CXF to use log4j.

Yeah, I'm aware of this as I added a tip to the CXF wiki some time ago:

But this is not the issue. I'm no longer using the camel-cxf component
and I still cannot see debug level logging.

perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"

Apache ActiveMQ -
Apache Camel -
Apache ServiceMix -


View raw message