Hi,
A clarification:
I am no longer doing
@WebMethod
>>>> public void sayHello(DefaultMessage defaultMessage) {
>>>> System.out.println("ExampleJSRService123 says hello! "+
>>>> defaultMessage);
>>>> System.out.println(defaultMessage.getBody());
>>>> // return "<sayHello><name>hai</name></sayHello>";
>>>> }
this function is now:
public void sayHello(String string)
I use a camel SU with a camel-context.xml and a separate SU with bean.xml for
my jsr181 endpoints.
And then, in the camel routes, make sure you use the jbi uri format to route
to/from these JSR181 components
Yes I am already doing this. But I'm still stuck. Maybe this is a more general
problem because (as i said earlier) even when I do:
from(SERVICE_IN).process(new Processor(){
public void process(Exchange exchange) throws Exception {
// TODO Auto-generated method stub
System.out.println("The message is: "+exchange.toString());
}
}).to(SERVICEOUT1);
I get the same error.
Sylvester
Ramon Buckland wrote:
Hi Sylvester,
You will need to deploy your JSR181 components in a separate SU
http://servicemix.apache.org/servicemix-jsr181.html
my-camel-su/
|-- pom.xml
|-- src
`-- main
`-- resources
`-- camel-context.xml
my-jsr181-su/
|-- pom.xml
|-- src
`-- main
`-- resources
`-- xbean.xml
And then, in the camel routes, make sure you use the jbi uri format to route
to/from these JSR181 components.
http://activemq.apache.org/camel/jbi.html
Hope that helps
Regards
Ramon
On Sat, Dec 6, 2008 at 23:53, Claus Ibsen <[EMAIL PROTECTED]> wrote:
Hi
Sorry I am yet a ServiceMix deployment expert. Have you asked on the
ServiceMix user/dev forum as well?
However it's weekend so not all is sitting in front of the computer.
And please provide information of the version of ServiceMix, Camel, OS
etc. you are running. And how you deploy/start.
Also the exact logging output/error that states the problem would be great.
/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/
On Sat, Dec 6, 2008 at 1:53 PM, Sylvester <[EMAIL PROTECTED]>
wrote:
Hi,
I'm having the same Unable to find suitable deployer for Service Unit
when
deploying this:
from(SERVICE_IN).process(new Processor(){
public void process(Exchange exchange) throws Exception {
// TODO Auto-generated method stub
System.out.println("The message is: "+exchange.toString());
}
}).to(SERVICEOUT1);
Any ideas?
Thanks,
Sylvester
Sylvester wrote:
The problematic routing slip is:
from(SERVICE_IN).setHeader("routingSlipHeader", SERVICEOUT1+ ","+
SERVICEOUT2).routingSlip("routingSlipHeader", ",");
deploying this gives me a Unable to find suitable deployer for Service
Unit 'CamelJSRSU'. This is my main problem. SERVICEOUT1 etc are JSR 181
endpoints
Ramon Buckland wrote:
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