thanks for your reply.

i couldnt get the clear idea so plz read the content and give me your
valuable suggessions. the following code i have tested but its not fulfill
my requirement. 

public class MyRouteBuilder extends RouteBuilder {

    public void configure() 
   {
        ClientConfig config1 = new DefaultClientConfig();
                 Client client = Client.create(config1);
                 WebResource service =
client.resource(UriBuilder.fromUri("http://10.163.14.72:8080/rto_vehicle/resources";).build());
 
//Webservice running in SystemA
                 String xmlvalue =
service.path("rto_record").path("maruthi").path("red").accept(MediaType.APPLICATION_XML).get(String.class);

from("timer://tutorial?fixedRate=true&delay=3000&period=10000").setBody(constant
(xmlvalue)).to("file:SystemB/route_test"); 
      }
}

This is the sample Servicemix myRouteBuilder.java file running on systemB.
here im getting the xml values by calling the webservice url from systemA
and stored the result in systemB/route_test folder. here two parameters are
hardcoded (maruthi and red) directly. 

the following are our requirements.
1. how to pass the two parameters (maruthi and red) from client (ex:
systemC)
2. how to send back the result to client (ex:systemC).
3. likewise im having multiple webservices running on various system. based
on the client request servicemix will decide which service will be call.
        
here im giving the sample requirement need for me.
Ex: 
http://10.163.14.72:8080/TN/resources
http://10.163.14.73:8080/KE/resources
http://10.163.14.74:8080/AN/resources
http://10.163.14.75:8080/UP/resources
   suppose if the clientA want to access the TN service, then the servicemix
will decide to invoke the resources from 
http://10.163.14.72:8080/TN/resources and send back the output to the
clientA. 

   same like, if the clientB want to access the UP service, then the
servicemix will decide to invoke the resources from 
http://10.163.14.75:8080/UP/resources and send back the output to the
clientB. 

i just want to know the above things are possible in servicemix or camel or
anyother interfaces are needed for our requirement. i couldnt get any sample
codes (Both servicemix and camel) reg. to solve the above issues. 

kindly give me the solution and sample codes.
-- 
View this message in context: 
http://servicemix.396122.n5.nabble.com/ServiceMix-Routing-with-various-host-tp2847927p2854886.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to