Craig - I am experiencing similar issues with setting status to DONE in
SM2.0... the code surrounding this area is quite hard to read so I
haven't worked out what is going on yet.. for some reason DONE is not in
the list of allowed statuses... 



> -----Original Message-----
> From: Craig Walls [mailto:[EMAIL PROTECTED]
> Sent: 10 November 2005 19:12
> To: [email protected]
> Subject: [servicemix-user] sendSync and SM 2.0
> 
> 
> I have a client that sends a message like this:
> 
> InOut exchange = serviceMixClient.createInOutExchange();
> NormalizedMessage message = exchange.getInMessage();
> exchange.setService(new QName("myService"));
> message.setProperty("someProperty", "someValue");
> message.setContent(new StringSource("<question>How are
you?</question>"));
> serviceMixClient.sendSync(exchange);
> NormalizedMessage result = exchange.getOutMessage();
> 
> On the service-side, my onMessageExchange() method looks a little
> something like this:
> 
> public void onMessageExchange(MessageExchange exchange) throws
> MessagingException {
> 
>   NormalizedMessage out = exchange.createMessage();
>   out.setContent(new StringSource("<answer>I am fine</answer>"));
>   message.setMessage(out, "out");   // PAY ATTENTION
>   done(exchange);                   // TO THESE LINES
> }
> 
> In ServiceMix 1.1, this worked fine. But since moving to ServiceMix
2.0, I
> get an error indicating that I can't set the status to done. Fine, so
I
> swapped out the commented lines above with:
> 
>   message.setMessage(out, "out");
>   send(exchange);
> 
> Now my sendSync() never returns. On a hunch, I tried this instead:
> 
>   answer(exchange, out);
> 
> Same effect. onMessageExchange() method completes on the service-side,
but
> on the client-side, the sendSync() method never returns.
> 
> I'm certain that it's something that I'm doing wrong, but I'm not sure
> what. Anybody see the problem? Please help!
> 
> 
> 
> 




This message has been scanned for viruses.

Reply via email to