You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by lekkie <le...@gmail.com> on 2009/07/28 16:45:20 UTC

FTP Poller -> HTTP Consumer: Could not find route for exchange: InOnly

Hi Guys,

I know a could of ppl might have come across this.

I need to poll a file (xml formatted) over FTP and send the result file (of
course thru NMR) to a consumer http service. I have defined separate SUs for
the ftp poller and the http consumer and also an SU for the http provider.

I have the following xbeans:

xbeal.xml -> ftp poller
<beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0" 
       xmlns:app="http://services.app/"> 
  
  <!-- add the sender endpoint here --> 
  
  <!-- add the poller endpoint here -->     
  <ftp:poller service="app:ftppoller"
                     endpoint="appftppoller"
                     uri="ftp://app:app@localhost/"
                     targetService="app:orderIFServicesHttpConsumer"
                     targetEndpoint="orderIFServicesHttpConsumer"
                     recursive="true">
  </ftp:poller>   
</beans> 

xbean.xml -> http consumer
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
          xmlns:app="http://services.app">
    
    <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
    <http:endpoint service="app:orderIFServicesHttpConsumer"
                     endpoint="orderIFServicesHttpConsumer"
                     role="consumer"
                     soap="true"
                     targetService="app:OrderIFServices"
		     locationURI="http://0.0.0.0:9000/services/app/OrderIFServices"
		     defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
</beans>

xbean.xml -> http provider
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
          xmlns:app="http://services.app">
    
    <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
    
    <http:endpoint service="app:OrderIFServices"
                     endpoint="OrderIFServicesHttpSoap11Endpoint"
                     role="provider"
                     soap="true"
                    
locationURI="http://192.168.0.5/app/services/OrderIFServices"
                     defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
</beans>


When deployed, it says 
Failed to process file: //xxx_16_07_09_00123454487.xml. Reason:
javax.jbi.messaging.MessagingException: Could not find route for exchange:
InOnly[
  id: ID:192.168.0.3-122c175bca6-9:0
  status: Active
  role: provider
  service: {http://services.app/}OrderIFServicesConsumerHttp
  in: 


Note that I can see all the services/endpoints on the JConsole.
-- 
View this message in context: http://www.nabble.com/FTP-Poller--%3E-HTTP-Consumer%3A-Could-not-find-route-for-exchange%3A-InOnly-tp24699592p24699592.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: FTP Poller -> HTTP Consumer: Could not find route for exchange: InOnly

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

Agreeing with everything Jean-Baptiste told you.  Just wanted to add
one more thing: make sure to remove the trailing / in the ftp
xbean.xml namespace uri.  You'd better have those exactly the same in
all you xbean.xml files

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/7/28 Jean-Baptiste Onofré <jb...@nanthrax.net>:
> Hi Lekkie,
>
> There is something strange in your routing.
>
> Regarding your xbean.xml files, it seems that the ftp poller target a HTTP
> consumer.
> I think that your mistake is here.
>
> The ftp poller fires an action when a new file come into place. It reads the
> file content and send into the NMR as NormalizedMessage.
> But, on the other hand, the HTTP consumer is waiting for HTTP request on the
> defined URI. The HTTP consumer is a binding endpoint listening to "external"
> HTTP call. It doesn't wait for incoming NormalizedMessage.
>
> In your case, you can fire the polled file to a HTTP provider (this is
> correct). This HTTP provider can call an external WebService or another HTTP
> consumer :).
>
> Regards
> JB
>
> lekkie wrote:
>>
>> Hi Guys,
>>
>> I know a could of ppl might have come across this.
>>
>> I need to poll a file (xml formatted) over FTP and send the result file
>> (of
>> course thru NMR) to a consumer http service. I have defined separate SUs
>> for
>> the ftp poller and the http consumer and also an SU for the http provider.
>>
>> I have the following xbeans:
>>
>> xbeal.xml -> ftp poller
>> <beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0"
>> xmlns:app="http://services.app/">    <!-- add the sender endpoint here -->
>>  <!-- add the poller endpoint here -->      <ftp:poller
>> service="app:ftppoller"
>>                     endpoint="appftppoller"
>>                     uri="ftp://app:app@localhost/"
>>                     targetService="app:orderIFServicesHttpConsumer"
>>                     targetEndpoint="orderIFServicesHttpConsumer"
>>                     recursive="true">
>>  </ftp:poller>   </beans>
>> xbean.xml -> http consumer
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>          xmlns:app="http://services.app">
>>        <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
>>    <http:endpoint service="app:orderIFServicesHttpConsumer"
>>                     endpoint="orderIFServicesHttpConsumer"
>>                     role="consumer"
>>                     soap="true"
>>                     targetService="app:OrderIFServices"
>>
>> locationURI="http://0.0.0.0:9000/services/app/OrderIFServices"
>>                     defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
>> </beans>
>>
>> xbean.xml -> http provider
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>          xmlns:app="http://services.app">
>>        <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
>>        <http:endpoint service="app:OrderIFServices"
>>                     endpoint="OrderIFServicesHttpSoap11Endpoint"
>>                     role="provider"
>>                     soap="true"
>>
>>  locationURI="http://192.168.0.5/app/services/OrderIFServices"
>>                     defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
>> </beans>
>>
>>
>> When deployed, it says Failed to process file:
>> //xxx_16_07_09_00123454487.xml. Reason:
>> javax.jbi.messaging.MessagingException: Could not find route for exchange:
>> InOnly[
>>  id: ID:192.168.0.3-122c175bca6-9:0
>>  status: Active
>>  role: provider
>>  service: {http://services.app/}OrderIFServicesConsumerHttp
>>  in:
>>
>> Note that I can see all the services/endpoints on the JConsole.
>

Re: FTP Poller -> HTTP Consumer: Could not find route for exchange: InOnly

Posted by lekkie <le...@gmail.com>.
Hey Gert,

Ur right.

This is the kind or error I hate most, can make you unproductive for the
rest of the day.

Thanks, though I ve spent half a day faffing on this!

But something else came up, here:

09:52:50,734 | ERROR | pool-flow.seda.servicemix-http-thread-1 |
HttpComponent            | emix.common.AsyncBaseLifeCycle  512 | Error
processing exchange InOnly[
  id: ID:172.16.10.211-122c5ecf066-9:0
  status: Active
  role: provider
  service: {http://services.app}OrderIFServices
  endpoint: OrderIFServicesHttpSoap11Endpoint
  in: Unable to display: org.xml.sax.SAXParseException: Premature end of
file.
]
java.lang.Exception: Invalid status response: 500
	at
org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:182)
	at org.apache.servicemix.soap.SoapEndpoint.process(SoapEndpoint.java:367)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
	at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
	at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
	at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
	at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
	at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
	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)
09:52:50,765 | ERROR | pool-flow.seda.servicemix-http-thread-2 |
FtpComponent             | emix.common.AsyncBaseLifeCycle  512 | Error
processing exchange InOnly[
  id: ID:172.16.10.211-122c5ecf066-9:0
  status: Error
  role: consumer
  service: {http://services.app}OrderIFServices
  endpoint: OrderIFServicesHttpSoap11Endpoint
  in: Unable to display: org.xml.sax.SAXParseException: Premature end of
file.
  error: java.lang.Exception: Invalid status response: 500
]
java.lang.Exception: Invalid status response: 500
	at
org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:182)


Here is the content of my xml file polled from an FTP site:

<updateOrder xmlns="http://services.dms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">
	<SynchronizedRequest RequestType="updateOrder">
		<Order>
			<orderCode>Order000000000000001</orderCode>
			<paymentMethod>Cash</paymentMethod>
			<cashPayment>
				<cashPaid>50000</cashPaid>
				<cashChange>0</cashChange>
				<cashStatus>false</cashStatus>
			</cashPayment>
		</Order>
	</SynchronizedRequest>
</updateOrder>




Gert Vanthienen wrote:
> 
> L.S.,
> 
> Did you remove the trailing / from the namespace uri in the ftp
> xbean.xml?  This is probably being caused by the typo there...
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 
> 
> 
> 2009/7/28 lekkie <le...@gmail.com>:
>>
>> I thought about that and I changed to the provider, and I still ended up
>> have
>> same error.
>>
>> WARN  - FtpComponent                   - Target service
>> ({http://services.app/}OrderIFServices) and endpoint
>> (OrderIFServicesHttpSoap11Endpoint) specified, but no matching endpoint
>> found.  Only the service will be used for routing.
>> WARN  - DefaultBroker                  - ServiceName
>> ({http://services.app/}OrderIFServices) specified for routing, but can't
>> find it registered
>>
>> ] for service: {http://services.app/}OrderIFServices and interface: null
>> javax.jbi.messaging.MessagingException: Could not find route for
>> exchange:
>> InOnly[
>>  id: ID:192.168.0.3-122c175bca6-9:4
>>  status: Active
>>  role: provider
>>  service: {http://services.app/}OrderIFServices
>>  in: <?xml version="1.0" encoding="UTF-8"?>..............
>>
>> Note: The provider is an in-out MEP, does that have any effect?
>> Do I have to do any message translation op?
>>
>>
>>
>> Jean-Baptiste Onofré wrote:
>>>
>>> Hi Lekkie,
>>>
>>> There is something strange in your routing.
>>>
>>> Regarding your xbean.xml files, it seems that the ftp poller target a
>>> HTTP consumer.
>>> I think that your mistake is here.
>>>
>>> The ftp poller fires an action when a new file come into place. It reads
>>> the file content and send into the NMR as NormalizedMessage.
>>> But, on the other hand, the HTTP consumer is waiting for HTTP request on
>>> the defined URI. The HTTP consumer is a binding endpoint listening to
>>> "external" HTTP call. It doesn't wait for incoming NormalizedMessage.
>>>
>>> In your case, you can fire the polled file to a HTTP provider (this is
>>> correct). This HTTP provider can call an external WebService or another
>>> HTTP consumer :).
>>>
>>> Regards
>>> JB
>>>
>>> lekkie wrote:
>>>> Hi Guys,
>>>>
>>>> I know a could of ppl might have come across this.
>>>>
>>>> I need to poll a file (xml formatted) over FTP and send the result file
>>>> (of
>>>> course thru NMR) to a consumer http service. I have defined separate
>>>> SUs
>>>> for
>>>> the ftp poller and the http consumer and also an SU for the http
>>>> provider.
>>>>
>>>> I have the following xbeans:
>>>>
>>>> xbeal.xml -> ftp poller
>>>> <beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0"
>>>>        xmlns:app="http://services.app/">
>>>>
>>>>   <!-- add the sender endpoint here -->
>>>>
>>>>   <!-- add the poller endpoint here -->
>>>>   <ftp:poller service="app:ftppoller"
>>>>                      endpoint="appftppoller"
>>>>                      uri="ftp://app:app@localhost/"
>>>>                      targetService="app:orderIFServicesHttpConsumer"
>>>>                      targetEndpoint="orderIFServicesHttpConsumer"
>>>>                      recursive="true">
>>>>   </ftp:poller>
>>>> </beans>
>>>>
>>>> xbean.xml -> http consumer
>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>           xmlns:app="http://services.app">
>>>>
>>>>     <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
>>>>     <http:endpoint service="app:orderIFServicesHttpConsumer"
>>>>                      endpoint="orderIFServicesHttpConsumer"
>>>>                      role="consumer"
>>>>                      soap="true"
>>>>                      targetService="app:OrderIFServices"
>>>>                  
>>>> locationURI="http://0.0.0.0:9000/services/app/OrderIFServices"
>>>>                   defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
>>>> </beans>
>>>>
>>>> xbean.xml -> http provider
>>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>>           xmlns:app="http://services.app">
>>>>
>>>>     <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
>>>>
>>>>     <http:endpoint service="app:OrderIFServices"
>>>>                      endpoint="OrderIFServicesHttpSoap11Endpoint"
>>>>                      role="provider"
>>>>                      soap="true"
>>>>
>>>> locationURI="http://192.168.0.5/app/services/OrderIFServices"
>>>>                    
>>>>  defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
>>>> </beans>
>>>>
>>>>
>>>> When deployed, it says
>>>> Failed to process file: //xxx_16_07_09_00123454487.xml. Reason:
>>>> javax.jbi.messaging.MessagingException: Could not find route for
>>>> exchange:
>>>> InOnly[
>>>>   id: ID:192.168.0.3-122c175bca6-9:0
>>>>   status: Active
>>>>   role: provider
>>>>   service: {http://services.app/}OrderIFServicesConsumerHttp
>>>>   in:
>>>>
>>>>
>>>> Note that I can see all the services/endpoints on the JConsole.
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/FTP-Poller--%3E-HTTP-Consumer%3A-Could-not-find-route-for-exchange%3A-InOnly-tp24699592p24701927.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
> 

-- 
View this message in context: http://www.nabble.com/FTP-Poller--%3E-HTTP-Consumer%3A-Could-not-find-route-for-exchange%3A-InOnly-tp24699592p24715240.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: FTP Poller -> HTTP Consumer: Could not find route for exchange: InOnly

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

Did you remove the trailing / from the namespace uri in the ftp
xbean.xml?  This is probably being caused by the typo there...

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/7/28 lekkie <le...@gmail.com>:
>
> I thought about that and I changed to the provider, and I still ended up have
> same error.
>
> WARN  - FtpComponent                   - Target service
> ({http://services.app/}OrderIFServices) and endpoint
> (OrderIFServicesHttpSoap11Endpoint) specified, but no matching endpoint
> found.  Only the service will be used for routing.
> WARN  - DefaultBroker                  - ServiceName
> ({http://services.app/}OrderIFServices) specified for routing, but can't
> find it registered
>
> ] for service: {http://services.app/}OrderIFServices and interface: null
> javax.jbi.messaging.MessagingException: Could not find route for exchange:
> InOnly[
>  id: ID:192.168.0.3-122c175bca6-9:4
>  status: Active
>  role: provider
>  service: {http://services.app/}OrderIFServices
>  in: <?xml version="1.0" encoding="UTF-8"?>..............
>
> Note: The provider is an in-out MEP, does that have any effect?
> Do I have to do any message translation op?
>
>
>
> Jean-Baptiste Onofré wrote:
>>
>> Hi Lekkie,
>>
>> There is something strange in your routing.
>>
>> Regarding your xbean.xml files, it seems that the ftp poller target a
>> HTTP consumer.
>> I think that your mistake is here.
>>
>> The ftp poller fires an action when a new file come into place. It reads
>> the file content and send into the NMR as NormalizedMessage.
>> But, on the other hand, the HTTP consumer is waiting for HTTP request on
>> the defined URI. The HTTP consumer is a binding endpoint listening to
>> "external" HTTP call. It doesn't wait for incoming NormalizedMessage.
>>
>> In your case, you can fire the polled file to a HTTP provider (this is
>> correct). This HTTP provider can call an external WebService or another
>> HTTP consumer :).
>>
>> Regards
>> JB
>>
>> lekkie wrote:
>>> Hi Guys,
>>>
>>> I know a could of ppl might have come across this.
>>>
>>> I need to poll a file (xml formatted) over FTP and send the result file
>>> (of
>>> course thru NMR) to a consumer http service. I have defined separate SUs
>>> for
>>> the ftp poller and the http consumer and also an SU for the http
>>> provider.
>>>
>>> I have the following xbeans:
>>>
>>> xbeal.xml -> ftp poller
>>> <beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0"
>>>        xmlns:app="http://services.app/">
>>>
>>>   <!-- add the sender endpoint here -->
>>>
>>>   <!-- add the poller endpoint here -->
>>>   <ftp:poller service="app:ftppoller"
>>>                      endpoint="appftppoller"
>>>                      uri="ftp://app:app@localhost/"
>>>                      targetService="app:orderIFServicesHttpConsumer"
>>>                      targetEndpoint="orderIFServicesHttpConsumer"
>>>                      recursive="true">
>>>   </ftp:poller>
>>> </beans>
>>>
>>> xbean.xml -> http consumer
>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>           xmlns:app="http://services.app">
>>>
>>>     <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
>>>     <http:endpoint service="app:orderIFServicesHttpConsumer"
>>>                      endpoint="orderIFServicesHttpConsumer"
>>>                      role="consumer"
>>>                      soap="true"
>>>                      targetService="app:OrderIFServices"
>>>                   locationURI="http://0.0.0.0:9000/services/app/OrderIFServices"
>>>                   defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
>>> </beans>
>>>
>>> xbean.xml -> http provider
>>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>>           xmlns:app="http://services.app">
>>>
>>>     <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
>>>
>>>     <http:endpoint service="app:OrderIFServices"
>>>                      endpoint="OrderIFServicesHttpSoap11Endpoint"
>>>                      role="provider"
>>>                      soap="true"
>>>
>>> locationURI="http://192.168.0.5/app/services/OrderIFServices"
>>>                      defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
>>> </beans>
>>>
>>>
>>> When deployed, it says
>>> Failed to process file: //xxx_16_07_09_00123454487.xml. Reason:
>>> javax.jbi.messaging.MessagingException: Could not find route for
>>> exchange:
>>> InOnly[
>>>   id: ID:192.168.0.3-122c175bca6-9:0
>>>   status: Active
>>>   role: provider
>>>   service: {http://services.app/}OrderIFServicesConsumerHttp
>>>   in:
>>>
>>>
>>> Note that I can see all the services/endpoints on the JConsole.
>>
>>
>
> --
> View this message in context: http://www.nabble.com/FTP-Poller--%3E-HTTP-Consumer%3A-Could-not-find-route-for-exchange%3A-InOnly-tp24699592p24701927.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: FTP Poller -> HTTP Consumer: Could not find route for exchange: InOnly

Posted by lekkie <le...@gmail.com>.
I thought about that and I changed to the provider, and I still ended up have
same error.

WARN  - FtpComponent                   - Target service
({http://services.app/}OrderIFServices) and endpoint
(OrderIFServicesHttpSoap11Endpoint) specified, but no matching endpoint
found.  Only the service will be used for routing.
WARN  - DefaultBroker                  - ServiceName
({http://services.app/}OrderIFServices) specified for routing, but can't
find it registered

] for service: {http://services.app/}OrderIFServices and interface: null
javax.jbi.messaging.MessagingException: Could not find route for exchange:
InOnly[
  id: ID:192.168.0.3-122c175bca6-9:4
  status: Active
  role: provider
  service: {http://services.app/}OrderIFServices
  in: <?xml version="1.0" encoding="UTF-8"?>..............

Note: The provider is an in-out MEP, does that have any effect?
Do I have to do any message translation op?



Jean-Baptiste Onofré wrote:
> 
> Hi Lekkie,
> 
> There is something strange in your routing.
> 
> Regarding your xbean.xml files, it seems that the ftp poller target a 
> HTTP consumer.
> I think that your mistake is here.
> 
> The ftp poller fires an action when a new file come into place. It reads 
> the file content and send into the NMR as NormalizedMessage.
> But, on the other hand, the HTTP consumer is waiting for HTTP request on 
> the defined URI. The HTTP consumer is a binding endpoint listening to 
> "external" HTTP call. It doesn't wait for incoming NormalizedMessage.
> 
> In your case, you can fire the polled file to a HTTP provider (this is 
> correct). This HTTP provider can call an external WebService or another 
> HTTP consumer :).
> 
> Regards
> JB
> 
> lekkie wrote:
>> Hi Guys,
>> 
>> I know a could of ppl might have come across this.
>> 
>> I need to poll a file (xml formatted) over FTP and send the result file
>> (of
>> course thru NMR) to a consumer http service. I have defined separate SUs
>> for
>> the ftp poller and the http consumer and also an SU for the http
>> provider.
>> 
>> I have the following xbeans:
>> 
>> xbeal.xml -> ftp poller
>> <beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0" 
>>        xmlns:app="http://services.app/"> 
>>   
>>   <!-- add the sender endpoint here --> 
>>   
>>   <!-- add the poller endpoint here -->     
>>   <ftp:poller service="app:ftppoller"
>>                      endpoint="appftppoller"
>>                      uri="ftp://app:app@localhost/"
>>                      targetService="app:orderIFServicesHttpConsumer"
>>                      targetEndpoint="orderIFServicesHttpConsumer"
>>                      recursive="true">
>>   </ftp:poller>   
>> </beans> 
>> 
>> xbean.xml -> http consumer
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>           xmlns:app="http://services.app">
>>     
>>     <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
>>     <http:endpoint service="app:orderIFServicesHttpConsumer"
>>                      endpoint="orderIFServicesHttpConsumer"
>>                      role="consumer"
>>                      soap="true"
>>                      targetService="app:OrderIFServices"
>> 		     locationURI="http://0.0.0.0:9000/services/app/OrderIFServices"
>> 		     defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
>> </beans>
>> 
>> xbean.xml -> http provider
>> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>>           xmlns:app="http://services.app">
>>     
>>     <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
>>     
>>     <http:endpoint service="app:OrderIFServices"
>>                      endpoint="OrderIFServicesHttpSoap11Endpoint"
>>                      role="provider"
>>                      soap="true"
>>                     
>> locationURI="http://192.168.0.5/app/services/OrderIFServices"
>>                      defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
>> </beans>
>> 
>> 
>> When deployed, it says 
>> Failed to process file: //xxx_16_07_09_00123454487.xml. Reason:
>> javax.jbi.messaging.MessagingException: Could not find route for
>> exchange:
>> InOnly[
>>   id: ID:192.168.0.3-122c175bca6-9:0
>>   status: Active
>>   role: provider
>>   service: {http://services.app/}OrderIFServicesConsumerHttp
>>   in: 
>> 
>> 
>> Note that I can see all the services/endpoints on the JConsole.
> 
> 

-- 
View this message in context: http://www.nabble.com/FTP-Poller--%3E-HTTP-Consumer%3A-Could-not-find-route-for-exchange%3A-InOnly-tp24699592p24701927.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: FTP Poller -> HTTP Consumer: Could not find route for exchange: InOnly

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Lekkie,

There is something strange in your routing.

Regarding your xbean.xml files, it seems that the ftp poller target a 
HTTP consumer.
I think that your mistake is here.

The ftp poller fires an action when a new file come into place. It reads 
the file content and send into the NMR as NormalizedMessage.
But, on the other hand, the HTTP consumer is waiting for HTTP request on 
the defined URI. The HTTP consumer is a binding endpoint listening to 
"external" HTTP call. It doesn't wait for incoming NormalizedMessage.

In your case, you can fire the polled file to a HTTP provider (this is 
correct). This HTTP provider can call an external WebService or another 
HTTP consumer :).

Regards
JB

lekkie wrote:
> Hi Guys,
> 
> I know a could of ppl might have come across this.
> 
> I need to poll a file (xml formatted) over FTP and send the result file (of
> course thru NMR) to a consumer http service. I have defined separate SUs for
> the ftp poller and the http consumer and also an SU for the http provider.
> 
> I have the following xbeans:
> 
> xbeal.xml -> ftp poller
> <beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0" 
>        xmlns:app="http://services.app/"> 
>   
>   <!-- add the sender endpoint here --> 
>   
>   <!-- add the poller endpoint here -->     
>   <ftp:poller service="app:ftppoller"
>                      endpoint="appftppoller"
>                      uri="ftp://app:app@localhost/"
>                      targetService="app:orderIFServicesHttpConsumer"
>                      targetEndpoint="orderIFServicesHttpConsumer"
>                      recursive="true">
>   </ftp:poller>   
> </beans> 
> 
> xbean.xml -> http consumer
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>           xmlns:app="http://services.app">
>     
>     <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
>     <http:endpoint service="app:orderIFServicesHttpConsumer"
>                      endpoint="orderIFServicesHttpConsumer"
>                      role="consumer"
>                      soap="true"
>                      targetService="app:OrderIFServices"
> 		     locationURI="http://0.0.0.0:9000/services/app/OrderIFServices"
> 		     defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
> </beans>
> 
> xbean.xml -> http provider
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>           xmlns:app="http://services.app">
>     
>     <!-- wsdlResource="classpath:OrderIFServices.wsdl" -->
>     
>     <http:endpoint service="app:OrderIFServices"
>                      endpoint="OrderIFServicesHttpSoap11Endpoint"
>                      role="provider"
>                      soap="true"
>                     
> locationURI="http://192.168.0.5/app/services/OrderIFServices"
>                      defaultMep="http://www.w3.org/2004/08/wsdl/in-out"/>
> </beans>
> 
> 
> When deployed, it says 
> Failed to process file: //xxx_16_07_09_00123454487.xml. Reason:
> javax.jbi.messaging.MessagingException: Could not find route for exchange:
> InOnly[
>   id: ID:192.168.0.3-122c175bca6-9:0
>   status: Active
>   role: provider
>   service: {http://services.app/}OrderIFServicesConsumerHttp
>   in: 
> 
> 
> Note that I can see all the services/endpoints on the JConsole.