You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by puneetjain <pu...@wipro.com> on 2008/02/01 10:56:34 UTC

Problem in running a sample code

Hi,

 

I am new with service mix. Problem details is as follow:

 

Target:

===== 

Send a string as an input to servicemix by http consumer su, 

Route it to eip su component using static routing slip pattern. 

Get the message printed using EchoComponent. 

 

Environment:

=========

 

Windows xp

Servicemix 3.2.1

 

 

Step Performed:

===========

I have created http component SU and configured the xbean as: 
 

<beans xmlns:http="http://servicemix.apache.org/http/1.0"

       xmlns:b="http://servicemix.apache.org/samples/myexample">

 

            <http:endpoint service="b:http"

                 endpoint="endpoint"

                 targetService="b:routingSlip"

                 role="consumer"

                 locationURI="http://localhost:8192/test/"

                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />

</beans>

 

 

I have created eip component SU and configured the xbean as: 
 

<beans xmlns:eip="http://servicemix.apache.org/eip/1.0"

       xmlns:b="http://servicemix.apache.org/samples/myexample"

               xmlns:sm="http://servicemix.apache.org/config/1.0">

 

  <eip:static-routing-slip service="b:routingSlip" endpoint="endpoint" >

    <eip:targets>

      <eip:exchange-target service="b:echo" />

      <eip:exchange-target service="b:echo" />

    </eip:targets>

  </eip:static-routing-slip>

 

  <sm:activationSpec id="echo" service="b:echo">

            <sm:component>

                        <bean
class="org.apache.servicemix.components.util.EchoComponent"/>

            </sm:component>

  </sm:activationSpec>

</beans>

 

I have created a service assembly and build it using mvn (mvn clear
install). 
I placed the jar file in servicemix’s hot deploy folder and can see my
service available at http://localhost:8192 link. 
I have created an Html page as client and call the service
http://localhost:8080/test/ and pass the string. 
My message is routing from http component to eip component but there is some
exception while calling the EchoComponent. 
 

Exception details are:

 

WARN  - jetty                          - /test/

java.lang.Exception: javax.jbi.messaging.MessagingException: Could not find
route for exchange: InOut[

  id: ID:10.105.115.61-117d38ad9a4-7:0

  status: Active

  role: provider

  service: {http://servicemix.apache.org/samples/myexample}echo

  in: <?xml version="1.0" encoding="UTF-8"?><e:Envelope
xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">

  <e:Body>

    <ping>

      <pingRequest>

        <message xmlns="http://endpoint">test message</message>

      </pingRequest>

    </ping>

  </e:Body>

</e:Envelope>

] for service: {http://servicemix.apache.org/samples/myexample}echo 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: javax.jbi.messaging.MessagingException: Could not find route for
exchange: InOut[

  id: ID:10.105.115.61-117d38ad9a4-7:0

  status: Active

  role: provider

  service: {http://servicemix.apache.org/samples/myexample}echo

  in: <?xml version="1.0" encoding="UTF-8"?><e:Envelope
xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">

  <e:Body>

    <ping>

      <pingRequest>

        <message xmlns="http://endpoint">test message</message>

      </pingRequest>

    </ping>

  </e:Body>

</e:Envelope>

] for service: {http://servicemix.apache.org/samples/myexample}echo 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.send(DeliveryChannelImpl.java:431)

        at
org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryChannel.java:79)

        at
org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.java:67)

        at
org.apache.servicemix.eip.patterns.StaticRoutingSlip.processProviderAsync(StaticRoutingSlip.java:174)

        at
org.apache.servicemix.eip.patterns.StaticRoutingSlip.processAsync(StaticRoutingSlip.java:141)

        at
org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)

        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)

 

 

 

            Please help me to resolve my problem

 

            Thanks,

            Puneet

-- 
View this message in context: http://www.nabble.com/Problem-in-running-a-sample-code-tp15223370s12049p15223370.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.