Hi Slyvester,
You need a camel-context.xml
my-camel-su/
|-- pom.xml
|-- src
`-- main
`-- resources
`-- camel-context.xml
Make sure that your pom.xml either includes servicemix-camel as a
dependency, (and it's a JBI component for tooling) or that you set the
property
<properties>
<componentName>servicemix-camel</componentName>
</properties>
so that, when the SA is generated with Maven (and it has a dependency on the
my-camel-su), it knows to deploy the my-camel-su to the servicemix-camel
service engine. (written into the "sa.zip:/META-INF/jbi.xml"
Also, ensure that the servicemix-camel-2008.01-installer.zip is in the
/hotdeploy (and the servicemix-shared...zip as well).
regards
Ramon
On Sat, Dec 6, 2008 at 17:41, Sylvester <[EMAIL PROTECTED]> wrote:
> Hi,
> I have managed to deploy a simple camel component in service mix. I am now
> having problems with the routing slip pattern.
>
> Structure:
>
> A JMS BC receives the JMS message. This is then forwarded to the camel
> endpoint which routs it to various JSR181 endpoints specified in the routing
> slip header. Now, I have no problem hitting the first endpoint. The problem
> starts when the output of the first endpoint is not compatible with the
> input needed by the second endpoint.
>
> So *Question#1* - How do I control the output of the first endpoint?
>
> Also, in my search to solve question#1- I did this to my fist JSR181
> endpoint:
>
> WebService(serviceName = "ExampleJSRService123", targetNamespace = "
> http://example.com/exampleServiceJSR123")
> public class ExampleService {
>
> @WebMethod
> public void sayHello(DefaultMessage defaultMessage) {
> System.out.println("ExampleJSRService123 says hello! "+
> defaultMessage);
> System.out.println(defaultMessage.getBody());
> // return "<sayHello><name>hai</name></sayHello>";
> }
>
> Maven builds this just fine, but servicemix says the following when I
> deploy it:
>
>
> <component-task-result xmlns="
> http://java.sun.com/xml/ns/jbi/management-message"
> >
> <component-name>servicemix-jsr181</component-name>
> <component-task-result-details>
> <task-result-details>
> <task-id>deploy</task-id>
> <task-result>FAILED</task-result>
> <message-type>ERROR</message-type>
> <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Unable to find suitable deployer for Service Unit
> 'CamelJSRSU'</loc
> -message>
> </msg-loc-info>
> </task-status-msg>
> </task-result-details>
> </component-task-result-details>
> </component-task-result>
> </jbi-task-result>
> </jbi-task>
>
> I read on previous posts that the camel component needs a camel-context and
> not an xbean so I tried the following combinations in the SU:
>
> 1. Only xbean
> 2. Xbean and camel context
> 3. only camel context initializing the endpoints like:
>
> !-- START SNIPPET: camel -->
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://activemq.apache.org/camel/schema/spring
> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
> ">
>
> <!--
> from("seda:a").to("seda:b");
> -->
> <camelContext id="camel"
> xmlns="http://activemq.apache.org/camel/schema/spring">
> <package>org.CamelJSRSU</package>
>
>
> </camelContext>
> <jsr181:endpoint pojoClass="org.CamelJSRSU.ExampleService" />
> <jsr181:endpoint pojoClass="org.CamelJSRSU.ExampleService2" />
> </beans>
>
> My hunch is that a camel-context is not needed here, but thought I should
> try it out before I post it here.
>
> *Question#2: *How do I correctly deploy this component (xbean?
> camel-context? anything else?)
>
> Thanks.
> Sylvester
>
>
>
>
>
>
>