Hi, Thanks for the reply. You are correct, that's the flow that I am aiming for. But I just can't get it right apperently.
The messages just doesn't get routed through, and I can't really make any sense of the error message. This is what I get in the log when I try with the client.html from the wsdl-first example (with the personservice as the target): HTTP ERROR: 500</h2><pre>org.drools.spi.ConsequenceException: javax.jbi.messaging.MessagingException: Could not find route for exchange: InOut[ id: ID:192.168.240.224-1193844d13c-6:22 status: Active role: provider service: {accesslayer}httpprovider in: <?xml version="1.0" encoding="UTF-8"?><tns:GetPerson xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <tns:personId>world</tns:personId> </tns:GetPerson> ] The whole thing: STATUS: 500 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 500 </title> </head> <body><h2>HTTP ERROR: 500</h2><pre>org.drools.spi.ConsequenceException: javax.jbi.messaging.MessagingException: Could not find route for exchange: InOut[ id: ID:192.168.240.224-1193844d13c-6:22 status: Active role: provider service: {accesslayer}httpprovider in: <?xml version="1.0" encoding="UTF-8"?><tns:GetPerson xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <tns:personId>world</tns:personId> </tns:GetPerson> ] for service: {accesslayer}httpprovider and interface: null</pre> <p>RequestURI=/servicerouter/</p><h3>Caused by:</h3><pre>java.lang.Exception: org.drools.spi.ConsequenceException: javax.jbi.messaging.MessagingException: Could not find route for exchange: InOut[ id: ID:192.168.240.224-1193844d13c-6:22 status: Active role: provider service: {accesslayer}httpprovider in: <?xml version="1.0" encoding="UTF-8"?><tns:GetPerson xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <tns:personId>world</tns:personId> </tns:GetPerson> ] for service: {accesslayer}httpprovider and interface: null at org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:194) at org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:375) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396) at org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectChannelConnector.java:511) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: org.drools.spi.ConsequenceException: javax.jbi.messaging.MessagingException: Could not find route for exchange: InOut[ id: ID:192.168.240.224-1193844d13c-6:22 status: Active role: provider service: {accesslayer}httpprovider in: <?xml version="1.0" encoding="UTF-8"?><tns:GetPerson xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <tns:personId>world</tns:personId> </tns:GetPerson> ] for service: {accesslayer}httpprovider and interface: null at org.drools.common.DefaultAgenda.fireActivation(Unknown Source) at org.drools.common.DefaultAgenda.fireNextItem(Unknown Source) at org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown Source) at org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown Source) at org.apache.servicemix.drools.DroolsEndpoint.drools(DroolsEndpoint.java:182) at org.apache.servicemix.drools.DroolsEndpoint.process(DroolsEndpoint.java:173) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: javax.jbi.messaging.MessagingException: Could not find route for exchange: InOut[ id: ID:192.168.240.224-1193844d13c-6:22 status: Active role: provider service: {accesslayer}httpprovider in: <?xml version="1.0" encoding="UTF-8"?><tns:GetPerson xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <tns:personId>world</tns:personId> </tns:GetPerson> ] for service: {accesslayer}httpprovider and interface: null at org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:297) at org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:81) at org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:830) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:395) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:470) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:442) at org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDeliveryChannel.java:95) at org.apache.servicemix.drools.model.JbiHelper.route(JbiHelper.java:109) at org.apache.servicemix.drools.Rule_anything_0.consequence(Rule_anything_0.java:11) at org.apache.servicemix.drools.Rule_anything_0ConsequenceInvoker.evaluate(Rule_anything_0ConsequenceInvoker.java:19) ... 16 more </pre> <h3>Caused by:</h3><pre>org.drools.spi.ConsequenceException: javax.jbi.messaging.MessagingException: Could not find route for exchange: InOut[ id: ID:192.168.240.224-1193844d13c-6:22 status: Active role: provider service: {accesslayer}httpprovider in: <?xml version="1.0" encoding="UTF-8"?><tns:GetPerson xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <tns:personId>world</tns:personId> </tns:GetPerson> ] for service: {accesslayer}httpprovider and interface: null at org.drools.common.DefaultAgenda.fireActivation(Unknown Source) at org.drools.common.DefaultAgenda.fireNextItem(Unknown Source) at org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown Source) at org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown Source) at org.apache.servicemix.drools.DroolsEndpoint.drools(DroolsEndpoint.java:182) at org.apache.servicemix.drools.DroolsEndpoint.process(DroolsEndpoint.java:173) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: javax.jbi.messaging.MessagingException: Could not find route for exchange: InOut[ id: ID:192.168.240.224-1193844d13c-6:22 status: Active role: provider service: {accesslayer}httpprovider in: <?xml version="1.0" encoding="UTF-8"?><tns:GetPerson xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <tns:personId>world</tns:personId> </tns:GetPerson> ] for service: {accesslayer}httpprovider and interface: null at org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:297) at org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:81) at org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:830) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:395) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:470) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:442) at org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDeliveryChannel.java:95) at org.apache.servicemix.drools.model.JbiHelper.route(JbiHelper.java:109) at org.apache.servicemix.drools.Rule_anything_0.consequence(Rule_anything_0.java:11) at org.apache.servicemix.drools.Rule_anything_0ConsequenceInvoker.evaluate(Rule_anything_0ConsequenceInvoker.java:19) ... 16 more </pre> <h3>Caused by:</h3><pre>javax.jbi.messaging.MessagingException: Could not find route for exchange: InOut[ id: ID:192.168.240.224-1193844d13c-6:22 status: Active role: provider service: {accesslayer}httpprovider in: <?xml version="1.0" encoding="UTF-8"?><tns:GetPerson xmlns:tns="http://servicemix.apache.org/samples/wsdl-first/types" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <tns:personId>world</tns:personId> </tns:GetPerson> ] for service: {accesslayer}httpprovider and interface: null at org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:297) at org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:81) at org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:830) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:395) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:470) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:442) at org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDeliveryChannel.java:95) at org.apache.servicemix.drools.model.JbiHelper.route(JbiHelper.java:109) at org.apache.servicemix.drools.Rule_anything_0.consequence(Rule_anything_0.java:11) at org.apache.servicemix.drools.Rule_anything_0ConsequenceInvoker.evaluate(Rule_anything_0ConsequenceInvoker.java:19) at org.drools.common.DefaultAgenda.fireActivation(Unknown Source) at org.drools.common.DefaultAgenda.fireNextItem(Unknown Source) at org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown Source) at org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown Source) at org.apache.servicemix.drools.DroolsEndpoint.drools(DroolsEndpoint.java:182) at org.apache.servicemix.drools.DroolsEndpoint.process(DroolsEndpoint.java:173) at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538) at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490) at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) </pre> <p><small> http://jetty.mortbay.org/ Powered by Jetty:// </small></p><br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </body> </html> This is my rule now: rule "anything" when eval(true) then jbi.route( "service:accesslayer:httpprovider" ); // jbi.fault( "<fault>Id must be > 0</fault>" ); end This is my drools endpoint: <drools:endpoint service="accesslayer:servicerouter" endpoint="servicerouterEndpoint" ruleBaseResource="classpath:router.drl" namespaceContext="#nsContext" /> These are my http endpoints: <http:endpoint service="accesslayer:httplistener" endpoint="listenerEndpoint" role="consumer" locationURI="http://localhost:8192/servicerouter/" defaultMep="http://www.w3.org/2004/08/wsdl/in-out" targetService="accesslayer:servicerouter" targetEndpoint="servicerouterEndpoint" soap="true" > <http:policies /> </http:endpoint> <http:endpoint service="accesslayer:httpprovider" endpoint="providerEndpoint" role="provider" locationURI="http://localhost:8192/PersonService" soap="true" > <http:policies /> </http:endpoint> lhein wrote: > > Bence, > > if it's correct what you wrote then your flow is the following: > > 1. Somebody calls the webservice "http://localhost:8192/servicerouter/" > 2. the soap call will be forwarded to the drools SU > 3. Rule "anything" is executed > 4. the soap call is routed to "http://localhost:8080/testservice" > > If you turn on Debug Mode in <smx install folder>/conf/log4j.xml you will > see the message flow. > It might be a problem that the incoming soap message from /servicerouter/ > is not compatible to use as soap request for /testservice/ so you need to > put a transformation somewhere between I suppose. > > Regards, > Lars > > > > > > Bence wrote: >> >> Hi, >> >> I am trying to create the easiest drools routing of SOAP messages >> example. >> >> At the moment i have 2 SUs: >> service-router-su - from the maven archetype >> servicemix-drools-service-unit >> service-router-http-su - from the maven archetype >> servicemix-http-consumer-service-unit >> >> I only want to send a SOAP message to the BC, and have it routed back to >> another endpoint in the same BC no matter what. >> So I have this rule: >> rule "anything" >> when >> eval(true) >> then >> jbi.route( "service::test:httpprovider" ); >> end >> >> in the BC I have 2 endpoints: >> <http:endpoint service="test:httplistener" >> endpoint="listenerEndpoint" >> role="consumer" >> locationURI="http://localhost:8192/servicerouter/" >> defaultMep="http://www.w3.org/2004/08/wsdl/in-out" >> targetService="test:servicerouter" >> targetEndpoint="servicerouterEndpoint" >> soap="true" /> >> <http:endpoint service="test:httpprovider" >> endpoint="providerEndpoint" >> role="provider" >> locationURI="http://localhost:8080/testservice /> >> >> The drools endpoint is: >> <drools:endpoint service="test:servicerouter" >> endpoint="servicerouterEndpoint" >> ruleBaseResource="classpath:router.drl" >> namespaceContext="#nsContext" /> >> >> Now this is not really working, and there are a few things which I don't >> understand. >> >> Since the SOAP message is routed to a webservice outside of servicemix, >> how would the drools SU expose teh WSDL of that service? What kind of >> SOAP message do I have to write so that it gets recognized by drools and >> routed forward to that other service? >> >> Thanks in advance >> > > -- View this message in context: http://www.nabble.com/SOAP-%2B-drools-problem-tp16537434p16608371.html Sent from the ServiceMix - User mailing list archive at Nabble.com.