Oops,  I meant wiretap eip source code to figure out how to write the custom
bean component...

Cheers,

Ashwin...


Ashwin Karpe wrote:
> 
> Hi Sylvester,
> 
> I believe, I might have run into this before. The trouble is that the
> routing slip does not propagate an operation name in the Message Exchange
> and hence the request cannot be mapped to an implementation method in the
> JSR181 or CXF-SE.
> 
> I would raise an JIRA issue in this regard... It is possile to set a hard
> operation name to a method in the xbean but there is no way to change this
> upon deployment. The only good way available at present is to write a
> custom bean component that does the said routing within the bean code. You
> could refer to the routing slip source code to figure out how to write
> this code.
> 
> Hope this helps.
> 
> Cheers,
> 
> Ashwin...
> 
> 
> Sylvester Steele 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
>> 
>> 
> 
> 


-----
--- 
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
--- 
+1-972-304-9084 (Office) 
+1-972-971-1700 (Mobile) 
---- 
Blog: http://opensourceknowledge.blogspot.com/


-- 
View this message in context: 
http://www.nabble.com/Camel-in-servicemix-problems-with-routing-slip-tp20867324p20870293.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to