Hi,

I've made a very simple SA composed as follow

- CXF-BC(InputOutput) <-> SMX-BEAN ( With a bean class that simpy do the echo of the original message ).

When i run some test against this, an exception is raised on smx-bean sayng Out not supported.

I've founf that the problem is that the done message from cxf is not handled correctly by onMessage method in TransformBeanSupport, because the exchange role when the done message is received by smx-bean is "provider" so the execeution according to the following code is delegated to "processFirstMessage" method.

Instead it should be delegated to "processOngoingExchange" method, where the done is managed correctly.

This is the current code of "onMessageExchange" method.

public void onMessageExchange(MessageExchange exchange) throws MessagingException {
       System.out.println(exchange);
       if (exchange.getRole() == MessageExchange.Role.CONSUMER
               || exchange.getProperty(correlation) != null) {
           processOngoingExchange(exchange);
       } else {
processFirstExchange(exchange); }
   }

I've fixed in the following way,

public void onMessageExchange(MessageExchange exchange) throws MessagingException {
       System.out.println(exchange);
       if (exchange.getRole() == MessageExchange.Role.CONSUMER
               || exchange.getProperty(correlation) != null) {
           processOngoingExchange(exchange);
       } else {
           if (exchange.getStatus() == ExchangeStatus.ACTIVE){
               processFirstExchange(exchange);
           }else{
                processOngoingExchange(exchange);
           }
       }
   }

but i've not clear if is a cxf-bc or a servicemix-bean problem.

Any idea??? I supsect is probably a cxf-bc problem because if i use http input output binding component it's working.

Reply via email to