Hi,

I have an operation change password which works fine in 3.2.2 but when I
built and deploy  the same in 3.3.1 it does not work. The requirement
scenario is that in case of servicemix send message to any application and
if application is down it gets connection error. My camel component handles
that error and creates a custom message gives that message to response
generator and then response generator sends an out message. My routing
service waits for an out message which it gets with 3.2.2 but not in 3.3.1.
In 3.3.1 the message flow just stops at Response generator.

This is my code:

package com.in2m.servicemix.operations.changepassword;

import org.apache.camel.builder.RouteBuilder;

public class Validation extends RouteBuilder {

    public void configure() {

        exception(java.lang.Throwable.class)
                .setBody(constant("<response><status>"+ 
ErrorConstants.SYSTEM_ERROR
+"</status><message>System Error</message></response>"))
        
.to("jbi:service:http://servicemix.in2m.com/operations/changepassword/ResponseGeneratorService?mep=in-out";);
        
    
exception(org.apache.camel.processor.validation.SchemaValidationException.class)
        
.setBody(constant("<response><status>"+ErrorConstants.VALIDATION_ERROR+"</status><message>Validation
Error</message></response>"))
        
.to("jbi:service:http://servicemix.in2m.com/operations/changepassword/ResponseGeneratorService?mep=in-out";);
                
        
from("jbi:service:http://servicemix.in2m.com/operations/changepassword/ValidateService";)
                .to("validator:updatepassword.xsd")  
        
.to("jbi:service:http://servicemix.in2m.com/operations/changepassword/RoutingService?mep=in-out";);

    }
}


MessageRouting class


package com.in2m.servicemix.operations.changepassword;

import org.apache.camel.builder.RouteBuilder;
import com.in2m.servicemix.common.errorhandling.ErrorConstants;

public class MessageRouting extends RouteBuilder {

    public void configure() {
        exception(java.lang.Throwable.class)
                .setBody(constant("<response><status>"+ 
ErrorConstants.SYSTEM_ERROR
+"</status><message>System Error</message></response>"))
        
.to("jbi:service:http://servicemix.in2m.com/operations/changepassword/ResponseGeneratorService?mep=in-out";);
        
        exception(java.net.SocketException.class)
                .setBody(constant("<response><status>"+ 
ErrorConstants.SOCKET_ERROR
+"</status><message>Connection Error</message></response>"))
        
.to("jbi:service:http://servicemix.in2m.com/operations/changepassword/ResponseGeneratorService?mep=in-out";);
        
    
from("jbi:service:http://servicemix.in2m.com/operations/changepassword/RoutingService";)
        .choice()
        .when(header("userPrincipals").contains("director"))
        
.to("jbi:service:http://servicemix.in2m.com/operations/changepassword/PortalService?mep=in-out";)
        .when(header("userPrincipals").contains("portal"))
        
.to("jbi:service:http://servicemix.in2m.com/operations/changepassword/DirectorService?mep=in-out";);
    }
}

-- 
View this message in context: 
http://old.nabble.com/An-Operation-working-with-3.2.2-now-does-not-work-with-3.3.1-tp27873544p27873544.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to