exchange.setStatus(ExchangeStatus.DONE);
getDeliveryChannel().send(exchange);
If you are using POJO support, then just calling
done(exchange);would work as well.
Not sure if that is your problem, but might be worth a looksie.
Birch
On 10/26/05, Craig Walls <[EMAIL PROTECTED]> wrote:
Another day, another plead for ServiceMix assistance...
I've simplified my example greatly and as of this morning I started using
version 1.1, everything is working fantastically, except for one minor
detail...
On the sender side, I have this method that gets called:
private void sendMessage() throws MessagingException {
System.out.println("SENDING MESSAGE");
InOnly exchange = client.createInOnlyExchange ();
NormalizedMessage message = exchange.getInMessage();
exchange.setService(new QName("helloService"));
message.setProperty("messageId", "" + (messageId++));
message.setContent (new StreamSource(new
StringReader("<hello>world</hello>")));
client.send(exchange);
}
This may be familiar as it's not entirely unlike the example on the Client
API page on the ServiceMix website. (The messageId property is just an
integer that I'm using to match up sent messages with received messages on
the service side).
On the service side, I have this:
public void onMessageExchange(MessageExchange exchange)
throws MessagingException {
System.out.println("GOT A MESSAGE!");
NormalizedMessage message = exchange.getMessage("in");
System.out.println("MESSAGE: " + message);
Source source = message.getContent();
System.out.println("SOURCE: " + source);
}
Without fail, I get "GOT A MESSAGE!" and I can see from the output of the
2nd System.out.println() that my message contains the "messageId"
property. So far so good, but...
The message's content is always null. Why does it not have a Source
containing the "hello world" XML that was sent on the sender side?
