On 5/3/07, dr.jeff <[EMAIL PROTECTED]> wrote:
<camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd"> <endpoint id="endpoint1" uri="mock:endpoint1"/> <routes> </routes> </camelContext> This looks good, but how do I use it? I've tried things like: <from uri="endpoint1"/> and <from uri="#endpoint1"/> and <from endpoint="endpoint1"/> and <from endpoint="#endpoint1/>, but all of them fail, mostly for different reasons (eg. #endpoint1 is not an NMTOKEN). Surely it's obvious, but I'm missing it?
Ah I'd not done that bit yet :) I'd done it so that you can refer to Endpoint instances as bean references inside a spring <property name="foo" ref="someName"/>. I've just implemented this so that now the <from> and <to> can be used with the references <from uri="theURI"/> or <from ref="theReference"/> I've added a test case to show it in action... http://svn.apache.org/repos/asf/activemq/camel/trunk/camel-spring/src/test/resources/org/apache/camel/spring/endpointReference.xml Along the way I also removed the unnecesary <routes> element, so a context can look like <camelContext> <endpoint ... /> <endpoint ... /> <route ... /> <route ... /> </camelContext> So you'll wanna so an 'svn up' of all of camel and try the new xsd etc. -- James ------- http://macstrac.blogspot.com/