Hi Gert,

  I made the foolowing changes in the  code

public OpererationResponse operation(OpererationRequest request) {
        // throw new UnsupportedOperationException();    
        
        OpererationResponse responseobj = new OpererationResponse ();

        try{

   /* Code to access the normalised message of the jsr-181 component 

   */                   
        MessageExchange exchange =
org.apache.servicemix.jsr181.JBIContext.getMessageExchange() ;  
        
        NormalizedMessage msg = exchange.getMessage("out");
        if (msg == null) { 
                System.out.println("2");
             msg = exchange.createMessage(); 
             exchange.setMessage(msg,"out"); 
             
        }
        /* Setting the property 
    */
    
msg.setProperty(JbiConstants.HTTP_DESTINATION_URI,"http://localhost:9080/AlternateService";);
        
    /* service object is a property declared in a xbean.xml of jsr-181
component. Calling the webservice.
     */
        String responsestring = service.operation(request);
        
        
        responseobj.setOperationResponse(responsestring);
        return responseobj;
        }catch(Exception e){
                String ex= e.getMessage();
                return responseobj;
        }
    }

However, the endpoint address is stiil pointing to
http://localhost:9080/OriginalService that I have configured in Xbean.xml. 
The end point address is not getting dynamically changed.

Regards,
nautilis22


-- 
View this message in context: 
http://www.nabble.com/JSR-0rchestration-Dynamic-Rouing-tp16790679p16833347.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to