Hi,
I have following configuration in my camel Route builder 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() {
onException(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");
onException(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");
}
}
I am sending a message suppose <request>bbb</request</> which reaches
jbi:service:http://servicemix.in2m.com/operations/changepassword/RoutingService.
After that the message reaches DirectorService and tries to connect to some
application represented by Directorservice. It gets connection error hece
following gets executed:
onException(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");
ResponseGenerator creates out message but that message is not sent back to
jbi:service:http://servicemix.in2m.com/operations/changepassword/RoutingService
even after I give ResponseGeneratorService?mep=in-out what is the cause.
This was working with 3.2.2
Please help
--
View this message in context:
http://old.nabble.com/How-would-the-message-flow-in-following-case-of-Servicemix3.3.1-tp27874114p27874114.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.