Right, but don't forget, SM defaulted to the only endpoint it could find. If you had more then one then you would have different issues. The bottom line is If you specify targetEndpoint (which you don't have to if you only have one), make sure the endpoint with such name exists on the targetService.
-----Original Message----- From: mgenov [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 17, 2007 9:28 AM To: [email protected] Subject: RE: bean component Hi again, I solved my problem and the problem was in the bean defenition. I've forgot to replace the namespace and the namespace was not correctly set. Now it works. Thanks a lot. Zhurakousky, Oleg wrote: > > Here is what I see > > Your target bean defines a service (="identinficazioneAssistito:encode") > with endpoint (endpoint="test") > > Your consumer attempts to forward to the right service > (targetService="identinficazioneAssistito:encode"), but wrong endpoint > (targetEndpoint="endpoint") > > Endpoint with the name "endpoint" is not present on the target service. > So change to targetEndpoint="test" > > Oleg > > -----Original Message----- > From: mgenov [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 17, 2007 5:18 AM > To: [email protected] > Subject: bean component > > > Hello guys, > > I'm trying to use the servicemix's bean component but I having problems > with > it. > > That is bean-su's definition: > > <beans xmlns:bean="http://servicemix.apache.org/bean/1.0" > > xmlns:identinficazioneAssistito="http://servicemix.apache.org/replaceMe" >> > > <bean:endpoint service="identinficazioneAssistito:encode" > endpoint="test" bean="#encodingBean" /> > > <bean id="encodingBean" > class="cis.servicemix.identinficazioneAssistito.MyBean" > /> > > </beans> > > And the source code of the bean listener: > > package cis.servicemix.identinficazioneAssistito; > > import javax.annotation.Resource; > import javax.jbi.messaging.DeliveryChannel; > import javax.jbi.messaging.ExchangeStatus; > import javax.jbi.messaging.MessageExchange; > import javax.jbi.messaging.MessagingException; > > import org.apache.servicemix.MessageExchangeListener; > import org.apache.servicemix.jbi.util.MessageUtil; > > public class MyBean implements MessageExchangeListener { > @Resource > private DeliveryChannel channel; > > public void onMessageExchange(MessageExchange exchange) > throws MessagingException { > > if (exchange.getStatus() == ExchangeStatus.ACTIVE) { > System.out.println("Received exchange: " + > exchange); > MessageUtil.transferInToOut(exchange, exchange); > channel.send(exchange); > } > } > > } > > > That is the definition of http-su: > <beans xmlns:http="http://servicemix.apache.org/http/1.0" > > xmlns:identinficazioneAssistito="http://servicemix.apache.org/identinfic > azioneAssistito"> > > <http:endpoint service="identinficazioneAssistito:httpService" > endpoint="endpoint" > role="consumer" > locationURI="http://0.0.0.0:8080/identinficazioneAssistito/" > targetService="identinficazioneAssistito:encode" > targetEndpoint="endpoint" > defaultMep="http://www.w3.org/2004/08/wsdl/in-out" > soap="true" /> > </beans> > > > > > > This is the request message which I'm sending: > <?xml version="1.0" encoding="UTF-8"?> > <e:Envelope xmlns:e="http://schemas.xmlsoap.org/soap/envelope/"> > <e:Body> > <ping> > <pingRequest> > <message xmlns="http://soap">hello</message> > </pingRequest> > </ping> > </e:Body> > </e:Envelope> > > > This is the response from service mix: > STATUS: 500 > <?xml version='1.0' encoding='UTF-8'?><e:Envelope > xmlns:e="http://schemas.xmlsoap.org/soap/envelope/"><e:Body><e:Fault><fa > ultcode>e:Server</faultcode><faultstring>javax.jbi.messaging.MessagingEx > ception: > Could not find route for exchange: InOut[ > id: ID:10.134.4.102-115acffe1dd-9:0 > status: Active > role: provider > service: > {http://servicemix.apache.org/identinficazioneAssistito}encode > operation: ping > in: <?xml version="1.0" encoding="UTF-8"?><ping > xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
 > <pingRequest>
 > <message xmlns="http://soap">hel lo</message>
 > </pingRequest>
 > </ping> > ] for service: > {http://servicemix.apache.org/identinficazioneAssistito}encode and > interface: null</faultstring></e:Fault></e:Body></e:Envelope> > > > > Any idea where I'm going wrong? > > > -- > View this message in context: > http://www.nabble.com/bean-component-tf4639100s12049.html#a13249846 > Sent from the ServiceMix - User mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/bean-component-tf4639100s12049.html#a13253740 Sent from the ServiceMix - User mailing list archive at Nabble.com.
