yes but you have to set the target service for the http-consumer
component that the http request is routed to a target service

Guillaume Nodet wrote:
> The target destination on an exchange can be set
> using the setEndpoint, setService or setInterfaceName
> methods.  You can set them explicitely from your code
> if you need, else they will be set by the container with
> the values configured on the activationSpec.
> 
> On 9/26/06, allfonsiva <[EMAIL PROTECTED]> wrote:
>>
>> hi thomas
>>
>> i tried working on it.its is working fine.
>>
>>
>> the prob now i have is my i have to route the message got my the
>> httpconnector to the destination service. i want to route it inside the
>> httpconnector itself. but onmessage exchange is not working in case of it
>>
>>
>> thanks
>>
>> Siva
>>
>>
>> tterm wrote:
>> >
>> > Look at the following:
>> >
>> > servicemix.xml
>> >
>> > ...
>> >
>> > <sm:activationSpec destinationService="bes:remote-request-start"
>> >                  endpoint="LocalAsyncComponentOneProvider"
>> >                    service="bes:LocalAsyncComponentOneService">
>> >   <sm:component>
>> >     <bean class="com.bes.LocalAsyncComponentOne">
>> >     </bean>
>> >   </sm:component>
>> > </sm:activationSpec>
>> >
>> > ....
>> >
>> > You can see here that I declare a service componente
>> > bes:LocalAsyncComponentOneService. The new message exchange will be
>> > routed to the destination service bes:remote-request-start
>> >
>> > This is the code snippet of the component:
>> >
>> >
>> > public class LocalAsyncComponentOne extends ComponentSupport implements
>> >     MessageExchangeListener
>> > {
>> >   public void onMessageExchange(MessageExchange exchange)
>> >       throws MessagingException
>> >   {
>> >
>> >       ... other code here
>> >
>> >
>> >        // Message Exchange with the destinationService here
>> >       InOut inOutExchange = getExchangeFactory().createInOutExchange();
>> >       NormalizedMessage newMessageForComponentTwo =
>> > inOutExchange.createMessage();
>> >
>> >       newMessageForComponentTwo.setContent(
>> >          inMessageFromClient.getContent());
>> >       inOutExchange.setInMessage(newMessageForComponentTwo);
>> >       inOutExchange.setProperty("exchangeID",
>> exchange.getExchangeId());
>> >
>> >       // send to the destination
>> >       send(inOutExchange);
>> >
>> >        ... other code here
>> >
>> >    }
>> > }
>> >
>> > You don't have to set anything in the code then!
>> >
>> >
>> >
>> > allfonsiva wrote:
>> >> hi thomas
>> >>
>> >> in my component i can able  to initiate all my components. my
>> problem is
>> >>
>> >>
>> >> i have to specify the route of message in the coding itself
>> >>
>> >> what are the thing i have to set for send my message to my
>> destination?
>> >>
>> >> can you please explain me with a small snippet of code?
>> >>
>> >> thanks in advance
>> >>
>> >> Siva
>> >>
>> >>
>> >> tterm wrote:
>> >>> allfonsiva wrote:
>> >>>> hi all,
>> >>>>
>> >>>>
>> >>>> i am trying to develop my own component using http. I activated
>> my http
>> >>>> component as shown in the http-binding example. i build my client
>> which
>> >>>> creates an xml and sends it to that http component. now that
>> component
>> >>>> has
>> >>>> get  xml and send to my specified component.
>> >>>>
>> >>>> i don know how to route that message to another compoent..
>> >>>>
>> >>>> can anyone help me out in this regard...
>> >>>>
>> >>> But you can also use EIP patterns for routing. Look at servicemix.org
>> >>> for more information on eip's.
>> >>>
>> >>> Thomas
>> >>>
>> >>>
>> >>
>> >
>> >
>> >
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Route-for-exchange-tf2338092.html#a6506800
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 

Reply via email to