That appeared to work for creating the consumerTemplate and allowing me to
Autowire it.

But I am not able to get the mock to validate then. Maybe something simple
now:

*Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 20.122 sec
<<< FAILURE!
testReceiveGameStateUpdateMessage(com.wiredducks.service.test.TableServiceTest)
Time elapsed: 20.019 sec  <<< FAILURE!
java.lang.AssertionError: mock://result Received message count. Expected:
<1> but was: <0>
*

This is my Mock:
    @EndpointInject(uri = "mock:result")
    protected MockEndpoint mock;


This is all I see from the logs:

*5371 [main] INFO  org.apache.camel.component.mock.MockEndpoint  -
Asserting: Endpoint[mock://result] is satisfied
*


But this is good progress I think.


---
Thank You…

Mick Knutson, President

BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233

Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---



On Sun, Aug 2, 2009 at 8:09 PM, Willem Jiang <willem.ji...@gmail.com> wrote:

> Hi,
>
> I just found this is a bug of Camel.  I'm working on the quick fix now[1].
> Here is a way that you can walk around this issue, by putting the
> consumerTemplate definition inside the camel context.
>
>
>     <camel:camelContext id="camel">
>         <camel:consumerTemplate id="consumer"/>
>     </camel:camelContext>
>     <camel:template id="producer"/>
>
>
> [1] https://issues.apache.org/activemq/browse/CAMEL-1870
>
>
> Willem
>
> Mick Knutson wrote:
>
>> I am using 2.0-M3
>>
>> Should be trying the trunk instead?
>>
>> ---
>> Thank You…
>>
>> Mick Knutson, President
>>
>> BASE Logic, Inc.
>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>> p. (866) BLiNC-411: (254-6241-1)
>> f. (415) 685-4233
>>
>> Website: http://baselogic.com
>> Linked IN: http://linkedin.com/in/mickknutson
>> Vacation Rental: http://tahoe.baselogic.com
>> ---
>>
>>
>>
>> On Sun, Aug 2, 2009 at 7:43 PM, Willem Jiang <willem.ji...@gmail.com>
>> wrote:
>>
>>  Which version of Camel are you using ?
>>> I just checked current Camel 2.0 trunk code, the <camel:consumer> tag
>>> should work. Can you try to use the recent released Camel 2.0 M3 ?
>>>
>>> Willem
>>>
>>>
>>> Mick Knutson wrote:
>>>
>>>  I am trying to follow:
>>>> http://camel.apache.org/polling-consumer.html
>>>>
>>>> Now in my camel-client.xml I defined:
>>>> *<beans xmlns="http://www.springframework.org/schema/beans"*
>>>> *       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"*
>>>> *       xmlns:camel="http://camel.apache.org/schema/spring"*
>>>> *       xsi:schemaLocation="*
>>>> *        http://www.springframework.org/schema/beans
>>>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd*
>>>> *        http://camel.apache.org/schema/spring
>>>> http://camel.apache.org/schema/spring/camel-spring.xsd";>*
>>>>
>>>>
>>>> *    <!-- START SNIPPET: e2 -->*
>>>> *    <camel:camelContext id="camel"/>*
>>>> *    <camel:template id="producer"/>*
>>>> *   <camel:consumerTemplate id="consumer"/> *
>>>>
>>>> But I keep getting:
>>>>
>>>> *The matching wildcard is strict, but no declaration can be found for
>>>> element 'camel:consumerTemplate'.*
>>>>
>>>> Then I changed it to:
>>>> *<camel:consumer id="consumer"/> *
>>>> **
>>>> **
>>>> But still get*
>>>> *
>>>> *Caused by:
>>>>
>>>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
>>>> Configuration problem: Cannot locate BeanDefinitionParser for element
>>>> [consumer]*
>>>> *Offending resource: class path resource [camel-client.xml]*
>>>>
>>>>
>>>>
>>>>
>>>> ---
>>>> Thank You…
>>>>
>>>> Mick Knutson, President
>>>>
>>>> BASE Logic, Inc.
>>>> Enterprise Architecture, Design, Mentoring & Agile Consulting
>>>> p. (866) BLiNC-411: (254-6241-1)
>>>> f. (415) 685-4233
>>>>
>>>> Website: http://baselogic.com
>>>> Linked IN: http://linkedin.com/in/mickknutson
>>>> Vacation Rental: http://tahoe.baselogic.com
>>>> ---
>>>>
>>>>
>>>>
>>
>

Reply via email to