Hi,
I seem to be running into the same date parse exception with the 

Mail Poller Endpoint --> Bean Endpoint --> Mail Sender Endpoint

approach when I use the 2008.01 version. I tried setting the required
properties to null / not setting to null either way I got the Date parse
exception.





When I used the 2008.02 I get: (summary at end)

ERROR - BeanComponent                  - Error processing exchange InOnly[
  id: ID:192.168.2.79-11eca8c7aa4-2:9
  status: Done
  role: consumer
  interface: {http://test2}myMailService3
  service: {http://test2}myMailService3
  endpoint: senderEndpoint123
  in: Unable to display: org.xml.sax.SAXParseException: Content is not
allowed i
n prolog.
]
javax.jbi.messaging.MessagingException: illegal call to send / sendSync
        at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(Me
ssageExchangeImpl.java:614)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(Delive
ryChannelImpl.java:386)
        
If I set the mentioned properties to null I get the above exception and the
sender emails repeatedly.
If I do not set the mentioned properties to null I get the above exception
but no email is sent.

 
Relevant bits from my Bean SU:


Setting properties to null:

   message.setProperty("org.apache.servicemix.mail.from", null);
        message.setProperty("org.apache.servicemix.mail.to", null);
        message.setProperty("org.apache.servicemix.mail.cc", null);
        message.setProperty("org.apache.servicemix.mail.bcc", null);
        message.setProperty("org.apache.servicemix.mail.replyto", null);

Sending exchange to poller and sender:


 QName name= new QName("http://test2","myMailService3"; ); //this is the
sender
                
        MessageExchangeFactory
messageExchangeFactory=channel.createExchangeFactory(name);
        MessageExchange exchange2=
messageExchangeFactory.createInOnlyExchange();
        MessageUtil.transferInToIn(exchange, exchange2);
        exchange2.setService(name);
       
        System.out.println("Sending exchange to sender endpoint");
        channel.send(exchange2);
        System.out.println("Sent exchange to sender endpoint");
        

        exchange.setStatus(ExchangeStatus.DONE); //the poller
        System.out.println("Sending exchange to usual endpoint");
        channel.send(exchange);
        System.out.println("Sent exchange to usual endpoint");


Summary:

using 2008.01- no email sent
using 2008.02- repeated email + exception if properties set to null in the
Bean SU. Exception but no email if properties not set to null.

What am I missing here?

Thanks,
Sylvester


lhein wrote:
> 
> Well...you should be able to set them to NULL.
> That should do the trick I think.
> 
> Regards
> Lars
> 
> 
> 2009/1/12 Sylvester <[email protected]>:
>> Hi,
>>>
>>> The bean endpoint should remove the following properties before
>>> forwarding the exchange to the mail sender:
>>>
>>> org.apache.servicemix.mail.to
>>> org.apache.servicemix.mail.cc
>>> org.apache.servicemix.mail.bcc
>>> org.apache.servicemix.mail.from
>>> org.apache.servicemix.mail.replyto
>>
>> I don't see any way of removing these properties. Right now I am just
>> setting these to empty strings. Will that do?
>>
>> Sylvester
>>
> 
> 
> 
> -- 
> http://lhein.blogspot.com
> 
> 
> -----
> Regards 
> Lars 
> 
> 
> http://lhein.blogspot.com 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-the-Email-binding-component-tp21330046p21429347.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to