You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by sandeep reddy <sa...@in2m.com> on 2008/06/20 18:49:25 UTC

Problem regarding Custom Bean

I have servicemix-camel 3.2.2 snapshot in my ServiceMix 3.2.1 instance.

Sample flow:
Application 1 -->  Http-SU(consumer) --> Bean-SU --> Camel-SU -->
Http-SU(provider) --> Application 2

My Bean-SU gets message from Http-SU, adds properties to Normalized message
and forwards the message to Camel-SU. My property is a collection object
which contains string elements. Following is the code of bean:

    public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
        try {
        NormalizedMessage message = exchange.getMessage("in");
        ServiceEndpoint endpoint = exchange.getEndpoint();
        message.setProperty("userPrincipals",
message.getSecuritySubject().getPrincipals());
        Set<Principal> principals =
message.getSecuritySubject().getPrincipals();
        List roles = new ArrayList();
        Iterator<Principal> principalIterator = principals.iterator();
        while (principalIterator.hasNext()) {
            Principal element = (Principal) principalIterator.next();
            roles.add(element.getName());
        }
       
        ClientFactory factory = (ClientFactory) new
InitialContext().lookup(ClientFactory.DEFAULT_JNDI_NAME);
        ServiceMixClient client = factory.createClient();
        Destination destination =
client.createDestination("service:http://servicemix.in2m.com/operations/changepassword/validateService");
        InOut inOutExchange = destination.createInOutExchange();
        NormalizedMessage inMessage = inOutExchange.getInMessage();
        inMessage.setProperty("userPrincipals",roles);
        inMessage.setContent(message.getContent());
        client.sendSync(inOutExchange);
       
        exchange.setStatus(ExchangeStatus.DONE);
        channel.send(exchange);
       
        } catch (Exception e) {
            logger.debug(e);
            System.out.println("Exception occured " + e.getMessage());
        }
       
    }


I am able to route message to specific service based on the property from
Camel using header("userPrincipals").contains("portal"). But the problem is
that an exception occurs in the bean. My HTTP-SU Consumer never receives a
response and eventually times out.

If I do not set the DONE status then the message is sent twice to Camel-SU.

Following is the error log:
--------------------------------------------------------------------------------------------------------------------------------------------------------

DEBUG - JettyContextManager            - Dispatching job:
SCEP@6012081[d=true,io=0,w=true,b=false|false]
DEBUG - JettyContextManager            - Dispatching job:
SCEP@6012081[d=true,io=1,w=true,b=false|false]
DEBUG - JAASAuthenticationService      - Authenticating 'smx' with 'smx'
DEBUG - HttpComponent                  - Receiving HTTP request: POST
/changepassword/ HTTP/1.1
appName: Director
Authorization: Basic c214OnNteA==
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:8192
Content-Length: 177


DEBUG - HttpComponent                  - Created correlation id:
ID:192.168.2.53-11aa5e1886b-4:29
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.53-11aa5e1886b-4:29 in DeliveryChannel{servicemix-http}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@c1255f dequeued
exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-4:29
  status: Active
  role: provider
  service: {http://servicemix.in2m.com/operations/changepassword}BeanService
  endpoint: beanEndpoint
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
]
DEBUG - BeanComponent                  - Received exchange: status: Active,
role: provider
DEBUG - BeanComponent                  - Retrieved correlation id:
ID:192.168.2.53-11aa5e1886b-4:29
INFO  - JBIContainer                   - Activating component for:
[container=ServiceMix,name=ID:192.168.2.53-11aa5e1886b-0:38] with service:
null component: org.apache.servicemix.client.DefaultServiceMixClient@1a68ad0
INFO  - ComponentMBeanImpl             - Initializing component:
ID:192.168.2.53-11aa5e1886b-0:38
INFO  - ComponentMBeanImpl             - Starting component:
ID:192.168.2.53-11aa5e1886b-0:38
DEBUG - HttpComponent                  - Suspending continuation for
exchange: ID:192.168.2.53-11aa5e1886b-4:29
DEBUG - DeliveryChannelImpl            - SendSync
ID:192.168.2.53-11aa5e1886b-118:0 in
DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@6a6bf6 dequeued
exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-118:0
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/changepassword}validateService
  endpoint: validateEndpoint
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
]
DEBUG - CamelJbiComponent              - Received exchange: status: Active,
role: provider
DEBUG - CamelJbiComponent              - Retrieved correlation id: null
DEBUG - CamelJbiEndpoint               - Received exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-118:0
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/changepassword}validateService
  endpoint: validateEndpoint
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
]
DEBUG - DeliveryChannelImpl            - Waiting for exchange
ID:192.168.2.53-11aa5e1886b-118:0 (16e05db) to be answered in
DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38} from sendSync
DEBUG - DeliveryChannelImpl            - SendSync
ID:192.168.2.53-11aa5e1886b-10:80 in DeliveryChannel{servicemix-camel}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1751307 dequeued
exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-10:80
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/changepassword}routingService
  endpoint: camel192-168-2-53-11aa5e1886b-20-22
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
]
DEBUG - CamelJbiComponent              - Received exchange: status: Active,
role: provider
DEBUG - CamelJbiComponent              - Retrieved correlation id: null
DEBUG - CamelJbiEndpoint               - Received exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-10:80
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/changepassword}routingService
  endpoint: camel192-168-2-53-11aa5e1886b-20-22
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
]
DEBUG - DeliveryChannelImpl            - SendSync
ID:192.168.2.53-11aa5e1886b-10:81 in DeliveryChannel{servicemix-camel}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - DeliveryChannelImpl            - Waiting for exchange
ID:192.168.2.53-11aa5e1886b-10:81 (1346394) to be answered in
DeliveryChannel{servicemix-camel} from sendSync
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@759780 dequeued
exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-10:81
  status: Active
  role: provider
  service:
{http://servicemix.in2m.com/operations/changepassword}PortalService
  endpoint: PortalEndpoint
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
]
DEBUG - HttpComponent                  - Received exchange: status: Active,
role: provider
DEBUG - HttpComponent                  - Retrieved correlation id: null
DEBUG - DefaultHttpParams              - Set parameter
http.method.retry-handler =
org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@2d5ae3
DEBUG - MultiThreadedHttpConnectionManager -
HttpConnectionManager.getConnection:  config =
HostConfiguration[host=http://192.168.2.71], timeout = 0
DEBUG - MultiThreadedHttpConnectionManager - Getting free connection,
hostConfig=HostConfiguration[host=http://192.168.2.71]
DEBUG - HttpConnection                 - Connection is stale, closing...
DEBUG - HttpConnection                 - Open connection to 192.168.2.71:80
DEBUG - DeliveryChannelImpl            - Waiting for exchange
ID:192.168.2.53-11aa5e1886b-10:80 (1aa2cc6) to be answered in
DeliveryChannel{servicemix-camel} from sendSync
DEBUG - HttpMethodBase                 - Adding Host request header
DEBUG - EntityEnclosingMethod          - Request body sent
DEBUG - HttpMethodBase                 - Cookie accepted: "$Version=0;
82de8fdbf7056e00d8556195416f75ba=bcd8c3d291c2ba4634164a892caea611; $Path=/"
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.53-11aa5e1886b-10:81 in DeliveryChannel{servicemix-http}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - HttpMethodBase                 - Resorting to protocol version
default close connection policy
DEBUG - HttpMethodBase                 - Should NOT close connection, using
HTTP/1.1
DEBUG - HttpConnection                 - Releasing connection back to
connection manager.
DEBUG - MultiThreadedHttpConnectionManager - Freeing connection,
hostConfig=HostConfiguration[host=http://192.168.2.71]
DEBUG - IdleConnectionHandler          - Adding connection at: 1213980410067
DEBUG - MultiThreadedHttpConnectionManager - Notifying no-one, there are no
waiting threads
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1238cce dequeued
exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-10:81
  status: Active
  role: consumer
  service:
{http://servicemix.in2m.com/operations/changepassword}PortalService
  endpoint: PortalEndpoint
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
  out: <?xml version="1.0"
encoding="UTF-8"?><Response><status>error</status><message>Service  is not
available on portal.</message></Response>
]
DEBUG - DeliveryChannelImpl            - Notifying exchange
ID:192.168.2.53-11aa5e1886b-10:81(1346394) in
DeliveryChannel{servicemix-camel} from processInboundSynchronousExchange
DEBUG - DeliveryChannelImpl            - Notified:
ID:192.168.2.53-11aa5e1886b-10:81(1346394) in
DeliveryChannel{servicemix-camel} from sendSync
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.53-11aa5e1886b-10:81 in DeliveryChannel{servicemix-camel}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.53-11aa5e1886b-10:80 in DeliveryChannel{servicemix-camel}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@f13e82 dequeued
exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-10:80
  status: Active
  role: consumer
  service:
{http://servicemix.in2m.com/operations/changepassword}routingService
  endpoint: camel192-168-2-53-11aa5e1886b-20-22
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
  out: <?xml version="1.0"
encoding="UTF-8"?><Response><status>error</status><message>Service  is not
available on portal.</message></Response>
]
DEBUG - DeliveryChannelImpl            - Notifying exchange
ID:192.168.2.53-11aa5e1886b-10:80(1aa2cc6) in
DeliveryChannel{servicemix-camel} from processInboundSynchronousExchange
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@3eded4 dequeued
exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-10:81
  status: Done
  role: provider
  service:
{http://servicemix.in2m.com/operations/changepassword}PortalService
  endpoint: PortalEndpoint
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
  out: <?xml version="1.0"
encoding="UTF-8"?><Response><status>error</status><message>Service  is not
available on portal.</message></Response>
]
DEBUG - HttpComponent                  - Received exchange: status: Done,
role: provider
DEBUG - HttpComponent                  - Retrieved correlation id: null
DEBUG - DeliveryChannelImpl            - Notified:
ID:192.168.2.53-11aa5e1886b-10:80(1aa2cc6) in
DeliveryChannel{servicemix-camel} from sendSync
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.53-11aa5e1886b-10:80 in DeliveryChannel{servicemix-camel}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.53-11aa5e1886b-118:0 in DeliveryChannel{servicemix-camel}
DEBUG - SedaFlow                       - Called Flow send
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1dde1f8 dequeued
exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-118:0
  status: Active
  role: consumer
  service:
{http://servicemix.in2m.com/operations/changepassword}validateService
  endpoint: validateEndpoint
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
  out: <?xml version="1.0"
encoding="UTF-8"?><Response><status>error</status><message>Service  is not
available on portal.</message></Response>
]
DEBUG - DeliveryChannelImpl            - Notifying exchange
ID:192.168.2.53-11aa5e1886b-118:0(16e05db) in
DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38} from
processInboundSynchronousExchange
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@197534c dequeued
exchange: InOut[
  id: ID:192.168.2.53-11aa5e1886b-10:80
  status: Done
  role: provider
  service:
{http://servicemix.in2m.com/operations/changepassword}routingService
  endpoint: camel192-168-2-53-11aa5e1886b-20-22
  in: <?xml version="1.0" encoding="UTF-8"?><request
xmlns="http://www.finicity.com">
        <updatePassword>
                <userName>sandeep37</userName>
                        <password>mvelopes</password>
        </updatePassword>
</request>
  out: <?xml version="1.0"
encoding="UTF-8"?><Response><status>error</status><message>Service  is not
available on portal.</message></Response>
]
DEBUG - CamelJbiComponent              - Received exchange: status: Done,
role: provider
DEBUG - CamelJbiComponent              - Retrieved correlation id: null
DEBUG - DeliveryChannelImpl            - Notified:
ID:192.168.2.53-11aa5e1886b-118:0(16e05db) in
DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38} from sendSync
DEBUG - DeliveryChannelImpl            - Send
ID:192.168.2.53-11aa5e1886b-4:29 in DeliveryChannel{servicemix-bean}
DEBUG - DeliveryChannelImpl            - Exception processing:
ID:192.168.2.53-11aa5e1886b-4:29 in DeliveryChannel{servicemix-bean}
Exception occured illegal exchange status: done
DEBUG - JettyContextManager            - Dispatching job:
RetryContinuation@1992414,pending,expired
DEBUG - HttpComponent                  - Receiving HTTP request: POST
/changepassword/ HTTP/1.1
appName: Director
Authorization: Basic c214OnNteA==
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost:8192
Content-Length: 177


DEBUG - JettyContextManager            - Dispatching job:
SCEP@6012081[d=true,io=1,w=true,b=false|false]
 
--------------------------------------------------------------------------------------------------------------------------------------------------------

Please help.

Thanks,
Sandeep Reddy

-- 
View this message in context: http://www.nabble.com/Problem-regarding-Custom-Bean-tp18033529p18033529.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Problem regarding Custom Bean

Posted by sandeep reddy <sa...@in2m.com>.
Thanks for your reply,

As I said in the earlier mail, the If I do not set the DONE status The
message is sent twice to Camel SU. 
Based on you recommendation I modified the "inOutExchange" created using the
client to set the DONE status. 

Problem of sending the request twice got resolved when I put the condition
on the bean to execute only if exchange status is ACTIVE. Is this the right
approach or is their any drawbacks of it.

Following is the code snippet of bean:

    public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
    	try {
    	if (exchange.getStatus() != ExchangeStatus.ACTIVE){
    		return;
    	}
    	
    	NormalizedMessage message = exchange.getMessage("in");
    
//message.setProperty("userPrincipals",message.getSecuritySubject().getPrincipals());
    	
    	Set<Principal> principals =
message.getSecuritySubject().getPrincipals();
    	List roles = new ArrayList();
    	String roleString = "";
    	Iterator<Principal> principalIterator = principals.iterator();
    	while (principalIterator.hasNext()) {
			Principal element = (Principal) principalIterator.next();
			roles.add(element.getName());
			roleString += element.getName();
			if(principalIterator.hasNext()) {
				roleString += ",";
			}
		}
    	    	
    	ClientFactory factory = (ClientFactory) new
InitialContext().lookup(ClientFactory.DEFAULT_JNDI_NAME);
    	ServiceMixClient client = factory.createClient();
    	Destination destination =
client.createDestination("service:http://servicemix.in2m.com/operations/changepassword/validateService");
    	InOut inOutExchange = destination.createInOutExchange();
    	inOutExchange.setProperty("org.apache.servicemix.correlationId",
exchange.getProperty("org.apache.servicemix.correlationId"));
    	NormalizedMessage inMessage = inOutExchange.getInMessage();
    	inMessage.setProperty("userPrincipals",roles);
    	inMessage.setContent(message.getContent());
    	client.sendSync(inOutExchange);
    	inOutExchange.setStatus(ExchangeStatus.DONE);
    	
    	channel.send(exchange);
    	
    	} catch (Exception e) {
    		logger.error("Error in processing message ",e);
		}    	
    }

Also another query, when I was trying to set the out message recieved from
inOutExchange to parent "exchange" it says "out" not supported. Any idea on
why it is so ? Based on your suggestion and bean examples in website this
should be possible.

Thanks,
Sandeep


Gert Vanthienen wrote:
> 
> Sandeep Reddy,
> 
> In order to send a response from your bean SU, you should set the 'out' 
> normalized message content from within your Bean SU and send that.  The 
> DONE status should be set by the consumer in the case of an InOut 
> exchange (have a look at the diagram on 
> http://servicemix.apache.org/5-jbi.html#5.JBI-NormalizedMessageRouter -- 
> Invocation Example).
> 
> If you have problems with MEP handling when interacting between Camel 
> and JBI, you can always append ?mep=in-only, ?mep=in-out, ... to the 
> jbi: endpoints in Camel to make it a little more explicit.  Also make 
> sure that you have the latest SNAPSHOT of the servicemix-camel component 
> -- some bugs with regards to MEP handling were fixed very recently.
> 
> Regards,
> 
> Gert
> 
> sandeep reddy wrote:
>> I have servicemix-camel 3.2.2 snapshot in my ServiceMix 3.2.1 instance.
>>
>> Sample flow:
>> Application 1 -->  Http-SU(consumer) --> Bean-SU --> Camel-SU -->
>> Http-SU(provider) --> Application 2
>>
>> My Bean-SU gets message from Http-SU, adds properties to Normalized
>> message
>> and forwards the message to Camel-SU. My property is a collection object
>> which contains string elements. Following is the code of bean:
>>
>>     public void onMessageExchange(MessageExchange exchange) throws
>> MessagingException {
>>         try {
>>         NormalizedMessage message = exchange.getMessage("in");
>>         ServiceEndpoint endpoint = exchange.getEndpoint();
>>         message.setProperty("userPrincipals",
>> message.getSecuritySubject().getPrincipals());
>>         Set<Principal> principals =
>> message.getSecuritySubject().getPrincipals();
>>         List roles = new ArrayList();
>>         Iterator<Principal> principalIterator = principals.iterator();
>>         while (principalIterator.hasNext()) {
>>             Principal element = (Principal) principalIterator.next();
>>             roles.add(element.getName());
>>         }
>>        
>>         ClientFactory factory = (ClientFactory) new
>> InitialContext().lookup(ClientFactory.DEFAULT_JNDI_NAME);
>>         ServiceMixClient client = factory.createClient();
>>         Destination destination =
>> client.createDestination("service:http://servicemix.in2m.com/operations/changepassword/validateService");
>>         InOut inOutExchange = destination.createInOutExchange();
>>         NormalizedMessage inMessage = inOutExchange.getInMessage();
>>         inMessage.setProperty("userPrincipals",roles);
>>         inMessage.setContent(message.getContent());
>>         client.sendSync(inOutExchange);
>>        
>>         exchange.setStatus(ExchangeStatus.DONE);
>>         channel.send(exchange);
>>        
>>         } catch (Exception e) {
>>             logger.debug(e);
>>             System.out.println("Exception occured " + e.getMessage());
>>         }
>>        
>>     }
>>
>>
>> I am able to route message to specific service based on the property from
>> Camel using header("userPrincipals").contains("portal"). But the problem
>> is
>> that an exception occurs in the bean. My HTTP-SU Consumer never receives
>> a
>> response and eventually times out.
>>
>> If I do not set the DONE status then the message is sent twice to
>> Camel-SU.
>>
>> Following is the error log:
>> --------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> DEBUG - JettyContextManager            - Dispatching job:
>> SCEP@6012081[d=true,io=0,w=true,b=false|false]
>> DEBUG - JettyContextManager            - Dispatching job:
>> SCEP@6012081[d=true,io=1,w=true,b=false|false]
>> DEBUG - JAASAuthenticationService      - Authenticating 'smx' with 'smx'
>> DEBUG - HttpComponent                  - Receiving HTTP request: POST
>> /changepassword/ HTTP/1.1
>> appName: Director
>> Authorization: Basic c214OnNteA==
>> User-Agent: Jakarta Commons-HttpClient/3.1
>> Host: localhost:8192
>> Content-Length: 177
>>
>>
>> DEBUG - HttpComponent                  - Created correlation id:
>> ID:192.168.2.53-11aa5e1886b-4:29
>> DEBUG - DeliveryChannelImpl            - Send
>> ID:192.168.2.53-11aa5e1886b-4:29 in DeliveryChannel{servicemix-http}
>> DEBUG - SedaFlow                       - Called Flow send
>> DEBUG - SedaQueue                      -
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@c1255f dequeued
>> exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-4:29
>>   status: Active
>>   role: provider
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}BeanService
>>   endpoint: beanEndpoint
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>> ]
>> DEBUG - BeanComponent                  - Received exchange: status:
>> Active,
>> role: provider
>> DEBUG - BeanComponent                  - Retrieved correlation id:
>> ID:192.168.2.53-11aa5e1886b-4:29
>> INFO  - JBIContainer                   - Activating component for:
>> [container=ServiceMix,name=ID:192.168.2.53-11aa5e1886b-0:38] with
>> service:
>> null component:
>> org.apache.servicemix.client.DefaultServiceMixClient@1a68ad0
>> INFO  - ComponentMBeanImpl             - Initializing component:
>> ID:192.168.2.53-11aa5e1886b-0:38
>> INFO  - ComponentMBeanImpl             - Starting component:
>> ID:192.168.2.53-11aa5e1886b-0:38
>> DEBUG - HttpComponent                  - Suspending continuation for
>> exchange: ID:192.168.2.53-11aa5e1886b-4:29
>> DEBUG - DeliveryChannelImpl            - SendSync
>> ID:192.168.2.53-11aa5e1886b-118:0 in
>> DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38}
>> DEBUG - SedaFlow                       - Called Flow send
>> DEBUG - SedaQueue                      -
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@6a6bf6 dequeued
>> exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-118:0
>>   status: Active
>>   role: provider
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}validateService
>>   endpoint: validateEndpoint
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>> ]
>> DEBUG - CamelJbiComponent              - Received exchange: status:
>> Active,
>> role: provider
>> DEBUG - CamelJbiComponent              - Retrieved correlation id: null
>> DEBUG - CamelJbiEndpoint               - Received exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-118:0
>>   status: Active
>>   role: provider
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}validateService
>>   endpoint: validateEndpoint
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>> ]
>> DEBUG - DeliveryChannelImpl            - Waiting for exchange
>> ID:192.168.2.53-11aa5e1886b-118:0 (16e05db) to be answered in
>> DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38} from sendSync
>> DEBUG - DeliveryChannelImpl            - SendSync
>> ID:192.168.2.53-11aa5e1886b-10:80 in DeliveryChannel{servicemix-camel}
>> DEBUG - SedaFlow                       - Called Flow send
>> DEBUG - SedaQueue                      -
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1751307 dequeued
>> exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-10:80
>>   status: Active
>>   role: provider
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}routingService
>>   endpoint: camel192-168-2-53-11aa5e1886b-20-22
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>> ]
>> DEBUG - CamelJbiComponent              - Received exchange: status:
>> Active,
>> role: provider
>> DEBUG - CamelJbiComponent              - Retrieved correlation id: null
>> DEBUG - CamelJbiEndpoint               - Received exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-10:80
>>   status: Active
>>   role: provider
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}routingService
>>   endpoint: camel192-168-2-53-11aa5e1886b-20-22
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>> ]
>> DEBUG - DeliveryChannelImpl            - SendSync
>> ID:192.168.2.53-11aa5e1886b-10:81 in DeliveryChannel{servicemix-camel}
>> DEBUG - SedaFlow                       - Called Flow send
>> DEBUG - DeliveryChannelImpl            - Waiting for exchange
>> ID:192.168.2.53-11aa5e1886b-10:81 (1346394) to be answered in
>> DeliveryChannel{servicemix-camel} from sendSync
>> DEBUG - SedaQueue                      -
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@759780 dequeued
>> exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-10:81
>>   status: Active
>>   role: provider
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}PortalService
>>   endpoint: PortalEndpoint
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>> ]
>> DEBUG - HttpComponent                  - Received exchange: status:
>> Active,
>> role: provider
>> DEBUG - HttpComponent                  - Retrieved correlation id: null
>> DEBUG - DefaultHttpParams              - Set parameter
>> http.method.retry-handler =
>> org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@2d5ae3
>> DEBUG - MultiThreadedHttpConnectionManager -
>> HttpConnectionManager.getConnection:  config =
>> HostConfiguration[host=http://192.168.2.71], timeout = 0
>> DEBUG - MultiThreadedHttpConnectionManager - Getting free connection,
>> hostConfig=HostConfiguration[host=http://192.168.2.71]
>> DEBUG - HttpConnection                 - Connection is stale, closing...
>> DEBUG - HttpConnection                 - Open connection to
>> 192.168.2.71:80
>> DEBUG - DeliveryChannelImpl            - Waiting for exchange
>> ID:192.168.2.53-11aa5e1886b-10:80 (1aa2cc6) to be answered in
>> DeliveryChannel{servicemix-camel} from sendSync
>> DEBUG - HttpMethodBase                 - Adding Host request header
>> DEBUG - EntityEnclosingMethod          - Request body sent
>> DEBUG - HttpMethodBase                 - Cookie accepted: "$Version=0;
>> 82de8fdbf7056e00d8556195416f75ba=bcd8c3d291c2ba4634164a892caea611;
>> $Path=/"
>> DEBUG - DeliveryChannelImpl            - Send
>> ID:192.168.2.53-11aa5e1886b-10:81 in DeliveryChannel{servicemix-http}
>> DEBUG - SedaFlow                       - Called Flow send
>> DEBUG - HttpMethodBase                 - Resorting to protocol version
>> default close connection policy
>> DEBUG - HttpMethodBase                 - Should NOT close connection,
>> using
>> HTTP/1.1
>> DEBUG - HttpConnection                 - Releasing connection back to
>> connection manager.
>> DEBUG - MultiThreadedHttpConnectionManager - Freeing connection,
>> hostConfig=HostConfiguration[host=http://192.168.2.71]
>> DEBUG - IdleConnectionHandler          - Adding connection at:
>> 1213980410067
>> DEBUG - MultiThreadedHttpConnectionManager - Notifying no-one, there are
>> no
>> waiting threads
>> DEBUG - SedaQueue                      -
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1238cce dequeued
>> exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-10:81
>>   status: Active
>>   role: consumer
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}PortalService
>>   endpoint: PortalEndpoint
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>>   out: <?xml version="1.0"
>> encoding="UTF-8"?><Response><status>error</status><message>Service  is
>> not
>> available on portal.</message></Response>
>> ]
>> DEBUG - DeliveryChannelImpl            - Notifying exchange
>> ID:192.168.2.53-11aa5e1886b-10:81(1346394) in
>> DeliveryChannel{servicemix-camel} from processInboundSynchronousExchange
>> DEBUG - DeliveryChannelImpl            - Notified:
>> ID:192.168.2.53-11aa5e1886b-10:81(1346394) in
>> DeliveryChannel{servicemix-camel} from sendSync
>> DEBUG - DeliveryChannelImpl            - Send
>> ID:192.168.2.53-11aa5e1886b-10:81 in DeliveryChannel{servicemix-camel}
>> DEBUG - SedaFlow                       - Called Flow send
>> DEBUG - DeliveryChannelImpl            - Send
>> ID:192.168.2.53-11aa5e1886b-10:80 in DeliveryChannel{servicemix-camel}
>> DEBUG - SedaFlow                       - Called Flow send
>> DEBUG - SedaQueue                      -
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@f13e82 dequeued
>> exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-10:80
>>   status: Active
>>   role: consumer
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}routingService
>>   endpoint: camel192-168-2-53-11aa5e1886b-20-22
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>>   out: <?xml version="1.0"
>> encoding="UTF-8"?><Response><status>error</status><message>Service  is
>> not
>> available on portal.</message></Response>
>> ]
>> DEBUG - DeliveryChannelImpl            - Notifying exchange
>> ID:192.168.2.53-11aa5e1886b-10:80(1aa2cc6) in
>> DeliveryChannel{servicemix-camel} from processInboundSynchronousExchange
>> DEBUG - SedaQueue                      -
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@3eded4 dequeued
>> exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-10:81
>>   status: Done
>>   role: provider
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}PortalService
>>   endpoint: PortalEndpoint
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>>   out: <?xml version="1.0"
>> encoding="UTF-8"?><Response><status>error</status><message>Service  is
>> not
>> available on portal.</message></Response>
>> ]
>> DEBUG - HttpComponent                  - Received exchange: status: Done,
>> role: provider
>> DEBUG - HttpComponent                  - Retrieved correlation id: null
>> DEBUG - DeliveryChannelImpl            - Notified:
>> ID:192.168.2.53-11aa5e1886b-10:80(1aa2cc6) in
>> DeliveryChannel{servicemix-camel} from sendSync
>> DEBUG - DeliveryChannelImpl            - Send
>> ID:192.168.2.53-11aa5e1886b-10:80 in DeliveryChannel{servicemix-camel}
>> DEBUG - SedaFlow                       - Called Flow send
>> DEBUG - DeliveryChannelImpl            - Send
>> ID:192.168.2.53-11aa5e1886b-118:0 in DeliveryChannel{servicemix-camel}
>> DEBUG - SedaFlow                       - Called Flow send
>> DEBUG - SedaQueue                      -
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1dde1f8 dequeued
>> exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-118:0
>>   status: Active
>>   role: consumer
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}validateService
>>   endpoint: validateEndpoint
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>>   out: <?xml version="1.0"
>> encoding="UTF-8"?><Response><status>error</status><message>Service  is
>> not
>> available on portal.</message></Response>
>> ]
>> DEBUG - DeliveryChannelImpl            - Notifying exchange
>> ID:192.168.2.53-11aa5e1886b-118:0(16e05db) in
>> DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38} from
>> processInboundSynchronousExchange
>> DEBUG - SedaQueue                      -
>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@197534c dequeued
>> exchange: InOut[
>>   id: ID:192.168.2.53-11aa5e1886b-10:80
>>   status: Done
>>   role: provider
>>   service:
>> {http://servicemix.in2m.com/operations/changepassword}routingService
>>   endpoint: camel192-168-2-53-11aa5e1886b-20-22
>>   in: <?xml version="1.0" encoding="UTF-8"?><request
>> xmlns="http://www.finicity.com">
>>         <updatePassword>
>>                 <userName>sandeep37</userName>
>>                         <password>mvelopes</password>
>>         </updatePassword>
>> </request>
>>   out: <?xml version="1.0"
>> encoding="UTF-8"?><Response><status>error</status><message>Service  is
>> not
>> available on portal.</message></Response>
>> ]
>> DEBUG - CamelJbiComponent              - Received exchange: status: Done,
>> role: provider
>> DEBUG - CamelJbiComponent              - Retrieved correlation id: null
>> DEBUG - DeliveryChannelImpl            - Notified:
>> ID:192.168.2.53-11aa5e1886b-118:0(16e05db) in
>> DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38} from sendSync
>> DEBUG - DeliveryChannelImpl            - Send
>> ID:192.168.2.53-11aa5e1886b-4:29 in DeliveryChannel{servicemix-bean}
>> DEBUG - DeliveryChannelImpl            - Exception processing:
>> ID:192.168.2.53-11aa5e1886b-4:29 in DeliveryChannel{servicemix-bean}
>> Exception occured illegal exchange status: done
>> DEBUG - JettyContextManager            - Dispatching job:
>> RetryContinuation@1992414,pending,expired
>> DEBUG - HttpComponent                  - Receiving HTTP request: POST
>> /changepassword/ HTTP/1.1
>> appName: Director
>> Authorization: Basic c214OnNteA==
>> User-Agent: Jakarta Commons-HttpClient/3.1
>> Host: localhost:8192
>> Content-Length: 177
>>
>>
>> DEBUG - JettyContextManager            - Dispatching job:
>> SCEP@6012081[d=true,io=1,w=true,b=false|false]
>>  
>> --------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> Please help.
>>
>> Thanks,
>> Sandeep Reddy
>>
>>   
> 
> 
> 
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
> 

-- 
View this message in context: http://www.nabble.com/Problem-regarding-Custom-Bean-tp18033529p18066544.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Problem regarding Custom Bean

Posted by Gert Vanthienen <ge...@skynet.be>.
Sandeep Reddy,

In order to send a response from your bean SU, you should set the 'out' 
normalized message content from within your Bean SU and send that.  The 
DONE status should be set by the consumer in the case of an InOut 
exchange (have a look at the diagram on 
http://servicemix.apache.org/5-jbi.html#5.JBI-NormalizedMessageRouter -- 
Invocation Example).

If you have problems with MEP handling when interacting between Camel 
and JBI, you can always append ?mep=in-only, ?mep=in-out, ... to the 
jbi: endpoints in Camel to make it a little more explicit.  Also make 
sure that you have the latest SNAPSHOT of the servicemix-camel component 
-- some bugs with regards to MEP handling were fixed very recently.

Regards,

Gert

sandeep reddy wrote:
> I have servicemix-camel 3.2.2 snapshot in my ServiceMix 3.2.1 instance.
>
> Sample flow:
> Application 1 -->  Http-SU(consumer) --> Bean-SU --> Camel-SU -->
> Http-SU(provider) --> Application 2
>
> My Bean-SU gets message from Http-SU, adds properties to Normalized message
> and forwards the message to Camel-SU. My property is a collection object
> which contains string elements. Following is the code of bean:
>
>     public void onMessageExchange(MessageExchange exchange) throws
> MessagingException {
>         try {
>         NormalizedMessage message = exchange.getMessage("in");
>         ServiceEndpoint endpoint = exchange.getEndpoint();
>         message.setProperty("userPrincipals",
> message.getSecuritySubject().getPrincipals());
>         Set<Principal> principals =
> message.getSecuritySubject().getPrincipals();
>         List roles = new ArrayList();
>         Iterator<Principal> principalIterator = principals.iterator();
>         while (principalIterator.hasNext()) {
>             Principal element = (Principal) principalIterator.next();
>             roles.add(element.getName());
>         }
>        
>         ClientFactory factory = (ClientFactory) new
> InitialContext().lookup(ClientFactory.DEFAULT_JNDI_NAME);
>         ServiceMixClient client = factory.createClient();
>         Destination destination =
> client.createDestination("service:http://servicemix.in2m.com/operations/changepassword/validateService");
>         InOut inOutExchange = destination.createInOutExchange();
>         NormalizedMessage inMessage = inOutExchange.getInMessage();
>         inMessage.setProperty("userPrincipals",roles);
>         inMessage.setContent(message.getContent());
>         client.sendSync(inOutExchange);
>        
>         exchange.setStatus(ExchangeStatus.DONE);
>         channel.send(exchange);
>        
>         } catch (Exception e) {
>             logger.debug(e);
>             System.out.println("Exception occured " + e.getMessage());
>         }
>        
>     }
>
>
> I am able to route message to specific service based on the property from
> Camel using header("userPrincipals").contains("portal"). But the problem is
> that an exception occurs in the bean. My HTTP-SU Consumer never receives a
> response and eventually times out.
>
> If I do not set the DONE status then the message is sent twice to Camel-SU.
>
> Following is the error log:
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> DEBUG - JettyContextManager            - Dispatching job:
> SCEP@6012081[d=true,io=0,w=true,b=false|false]
> DEBUG - JettyContextManager            - Dispatching job:
> SCEP@6012081[d=true,io=1,w=true,b=false|false]
> DEBUG - JAASAuthenticationService      - Authenticating 'smx' with 'smx'
> DEBUG - HttpComponent                  - Receiving HTTP request: POST
> /changepassword/ HTTP/1.1
> appName: Director
> Authorization: Basic c214OnNteA==
> User-Agent: Jakarta Commons-HttpClient/3.1
> Host: localhost:8192
> Content-Length: 177
>
>
> DEBUG - HttpComponent                  - Created correlation id:
> ID:192.168.2.53-11aa5e1886b-4:29
> DEBUG - DeliveryChannelImpl            - Send
> ID:192.168.2.53-11aa5e1886b-4:29 in DeliveryChannel{servicemix-http}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@c1255f dequeued
> exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-4:29
>   status: Active
>   role: provider
>   service: {http://servicemix.in2m.com/operations/changepassword}BeanService
>   endpoint: beanEndpoint
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
> ]
> DEBUG - BeanComponent                  - Received exchange: status: Active,
> role: provider
> DEBUG - BeanComponent                  - Retrieved correlation id:
> ID:192.168.2.53-11aa5e1886b-4:29
> INFO  - JBIContainer                   - Activating component for:
> [container=ServiceMix,name=ID:192.168.2.53-11aa5e1886b-0:38] with service:
> null component: org.apache.servicemix.client.DefaultServiceMixClient@1a68ad0
> INFO  - ComponentMBeanImpl             - Initializing component:
> ID:192.168.2.53-11aa5e1886b-0:38
> INFO  - ComponentMBeanImpl             - Starting component:
> ID:192.168.2.53-11aa5e1886b-0:38
> DEBUG - HttpComponent                  - Suspending continuation for
> exchange: ID:192.168.2.53-11aa5e1886b-4:29
> DEBUG - DeliveryChannelImpl            - SendSync
> ID:192.168.2.53-11aa5e1886b-118:0 in
> DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@6a6bf6 dequeued
> exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-118:0
>   status: Active
>   role: provider
>   service:
> {http://servicemix.in2m.com/operations/changepassword}validateService
>   endpoint: validateEndpoint
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
> ]
> DEBUG - CamelJbiComponent              - Received exchange: status: Active,
> role: provider
> DEBUG - CamelJbiComponent              - Retrieved correlation id: null
> DEBUG - CamelJbiEndpoint               - Received exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-118:0
>   status: Active
>   role: provider
>   service:
> {http://servicemix.in2m.com/operations/changepassword}validateService
>   endpoint: validateEndpoint
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
> ]
> DEBUG - DeliveryChannelImpl            - Waiting for exchange
> ID:192.168.2.53-11aa5e1886b-118:0 (16e05db) to be answered in
> DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38} from sendSync
> DEBUG - DeliveryChannelImpl            - SendSync
> ID:192.168.2.53-11aa5e1886b-10:80 in DeliveryChannel{servicemix-camel}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1751307 dequeued
> exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-10:80
>   status: Active
>   role: provider
>   service:
> {http://servicemix.in2m.com/operations/changepassword}routingService
>   endpoint: camel192-168-2-53-11aa5e1886b-20-22
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
> ]
> DEBUG - CamelJbiComponent              - Received exchange: status: Active,
> role: provider
> DEBUG - CamelJbiComponent              - Retrieved correlation id: null
> DEBUG - CamelJbiEndpoint               - Received exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-10:80
>   status: Active
>   role: provider
>   service:
> {http://servicemix.in2m.com/operations/changepassword}routingService
>   endpoint: camel192-168-2-53-11aa5e1886b-20-22
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
> ]
> DEBUG - DeliveryChannelImpl            - SendSync
> ID:192.168.2.53-11aa5e1886b-10:81 in DeliveryChannel{servicemix-camel}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - DeliveryChannelImpl            - Waiting for exchange
> ID:192.168.2.53-11aa5e1886b-10:81 (1346394) to be answered in
> DeliveryChannel{servicemix-camel} from sendSync
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@759780 dequeued
> exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-10:81
>   status: Active
>   role: provider
>   service:
> {http://servicemix.in2m.com/operations/changepassword}PortalService
>   endpoint: PortalEndpoint
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
> ]
> DEBUG - HttpComponent                  - Received exchange: status: Active,
> role: provider
> DEBUG - HttpComponent                  - Retrieved correlation id: null
> DEBUG - DefaultHttpParams              - Set parameter
> http.method.retry-handler =
> org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@2d5ae3
> DEBUG - MultiThreadedHttpConnectionManager -
> HttpConnectionManager.getConnection:  config =
> HostConfiguration[host=http://192.168.2.71], timeout = 0
> DEBUG - MultiThreadedHttpConnectionManager - Getting free connection,
> hostConfig=HostConfiguration[host=http://192.168.2.71]
> DEBUG - HttpConnection                 - Connection is stale, closing...
> DEBUG - HttpConnection                 - Open connection to 192.168.2.71:80
> DEBUG - DeliveryChannelImpl            - Waiting for exchange
> ID:192.168.2.53-11aa5e1886b-10:80 (1aa2cc6) to be answered in
> DeliveryChannel{servicemix-camel} from sendSync
> DEBUG - HttpMethodBase                 - Adding Host request header
> DEBUG - EntityEnclosingMethod          - Request body sent
> DEBUG - HttpMethodBase                 - Cookie accepted: "$Version=0;
> 82de8fdbf7056e00d8556195416f75ba=bcd8c3d291c2ba4634164a892caea611; $Path=/"
> DEBUG - DeliveryChannelImpl            - Send
> ID:192.168.2.53-11aa5e1886b-10:81 in DeliveryChannel{servicemix-http}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - HttpMethodBase                 - Resorting to protocol version
> default close connection policy
> DEBUG - HttpMethodBase                 - Should NOT close connection, using
> HTTP/1.1
> DEBUG - HttpConnection                 - Releasing connection back to
> connection manager.
> DEBUG - MultiThreadedHttpConnectionManager - Freeing connection,
> hostConfig=HostConfiguration[host=http://192.168.2.71]
> DEBUG - IdleConnectionHandler          - Adding connection at: 1213980410067
> DEBUG - MultiThreadedHttpConnectionManager - Notifying no-one, there are no
> waiting threads
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1238cce dequeued
> exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-10:81
>   status: Active
>   role: consumer
>   service:
> {http://servicemix.in2m.com/operations/changepassword}PortalService
>   endpoint: PortalEndpoint
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
>   out: <?xml version="1.0"
> encoding="UTF-8"?><Response><status>error</status><message>Service  is not
> available on portal.</message></Response>
> ]
> DEBUG - DeliveryChannelImpl            - Notifying exchange
> ID:192.168.2.53-11aa5e1886b-10:81(1346394) in
> DeliveryChannel{servicemix-camel} from processInboundSynchronousExchange
> DEBUG - DeliveryChannelImpl            - Notified:
> ID:192.168.2.53-11aa5e1886b-10:81(1346394) in
> DeliveryChannel{servicemix-camel} from sendSync
> DEBUG - DeliveryChannelImpl            - Send
> ID:192.168.2.53-11aa5e1886b-10:81 in DeliveryChannel{servicemix-camel}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - DeliveryChannelImpl            - Send
> ID:192.168.2.53-11aa5e1886b-10:80 in DeliveryChannel{servicemix-camel}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@f13e82 dequeued
> exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-10:80
>   status: Active
>   role: consumer
>   service:
> {http://servicemix.in2m.com/operations/changepassword}routingService
>   endpoint: camel192-168-2-53-11aa5e1886b-20-22
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
>   out: <?xml version="1.0"
> encoding="UTF-8"?><Response><status>error</status><message>Service  is not
> available on portal.</message></Response>
> ]
> DEBUG - DeliveryChannelImpl            - Notifying exchange
> ID:192.168.2.53-11aa5e1886b-10:80(1aa2cc6) in
> DeliveryChannel{servicemix-camel} from processInboundSynchronousExchange
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@3eded4 dequeued
> exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-10:81
>   status: Done
>   role: provider
>   service:
> {http://servicemix.in2m.com/operations/changepassword}PortalService
>   endpoint: PortalEndpoint
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
>   out: <?xml version="1.0"
> encoding="UTF-8"?><Response><status>error</status><message>Service  is not
> available on portal.</message></Response>
> ]
> DEBUG - HttpComponent                  - Received exchange: status: Done,
> role: provider
> DEBUG - HttpComponent                  - Retrieved correlation id: null
> DEBUG - DeliveryChannelImpl            - Notified:
> ID:192.168.2.53-11aa5e1886b-10:80(1aa2cc6) in
> DeliveryChannel{servicemix-camel} from sendSync
> DEBUG - DeliveryChannelImpl            - Send
> ID:192.168.2.53-11aa5e1886b-10:80 in DeliveryChannel{servicemix-camel}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - DeliveryChannelImpl            - Send
> ID:192.168.2.53-11aa5e1886b-118:0 in DeliveryChannel{servicemix-camel}
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@1dde1f8 dequeued
> exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-118:0
>   status: Active
>   role: consumer
>   service:
> {http://servicemix.in2m.com/operations/changepassword}validateService
>   endpoint: validateEndpoint
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
>   out: <?xml version="1.0"
> encoding="UTF-8"?><Response><status>error</status><message>Service  is not
> available on portal.</message></Response>
> ]
> DEBUG - DeliveryChannelImpl            - Notifying exchange
> ID:192.168.2.53-11aa5e1886b-118:0(16e05db) in
> DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38} from
> processInboundSynchronousExchange
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@197534c dequeued
> exchange: InOut[
>   id: ID:192.168.2.53-11aa5e1886b-10:80
>   status: Done
>   role: provider
>   service:
> {http://servicemix.in2m.com/operations/changepassword}routingService
>   endpoint: camel192-168-2-53-11aa5e1886b-20-22
>   in: <?xml version="1.0" encoding="UTF-8"?><request
> xmlns="http://www.finicity.com">
>         <updatePassword>
>                 <userName>sandeep37</userName>
>                         <password>mvelopes</password>
>         </updatePassword>
> </request>
>   out: <?xml version="1.0"
> encoding="UTF-8"?><Response><status>error</status><message>Service  is not
> available on portal.</message></Response>
> ]
> DEBUG - CamelJbiComponent              - Received exchange: status: Done,
> role: provider
> DEBUG - CamelJbiComponent              - Retrieved correlation id: null
> DEBUG - DeliveryChannelImpl            - Notified:
> ID:192.168.2.53-11aa5e1886b-118:0(16e05db) in
> DeliveryChannel{ID:192.168.2.53-11aa5e1886b-0:38} from sendSync
> DEBUG - DeliveryChannelImpl            - Send
> ID:192.168.2.53-11aa5e1886b-4:29 in DeliveryChannel{servicemix-bean}
> DEBUG - DeliveryChannelImpl            - Exception processing:
> ID:192.168.2.53-11aa5e1886b-4:29 in DeliveryChannel{servicemix-bean}
> Exception occured illegal exchange status: done
> DEBUG - JettyContextManager            - Dispatching job:
> RetryContinuation@1992414,pending,expired
> DEBUG - HttpComponent                  - Receiving HTTP request: POST
> /changepassword/ HTTP/1.1
> appName: Director
> Authorization: Basic c214OnNteA==
> User-Agent: Jakarta Commons-HttpClient/3.1
> Host: localhost:8192
> Content-Length: 177
>
>
> DEBUG - JettyContextManager            - Dispatching job:
> SCEP@6012081[d=true,io=1,w=true,b=false|false]
>  
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Please help.
>
> Thanks,
> Sandeep Reddy
>
>