Hi Eric,
This exception is due to the normal sendRecieve behavioral send that we do.
I think you have set only the mail transport sender in axis2.xml but not the
receiver. When you do sendRecieve you need to have both the sender and the
receiver.
In your case if it is just a notification through the mail (that is one way
- out only) you can specify that to synapse using a message context property
named *OUT_ONLY*, so your effective configuration to get rid of this
exception is as follows, (in this case you *don't* have to have the mail
transport receiver set in the axis2.xml you need only the sender as you have
done already)
<log level="full"/>
<in>
<!-- Send the messageto implicit destination -->
<send/>
</in>
<out>
<property action="set" name="OUT_ONLY" value="true"/>
<send>
<endpoint>
<address uri="mailto:XXXXX"/>
</endpoint>
</send>
</out>
Can you try this configuration and let me know the results?
Thanks,
Ruwan.
On 10/8/07, Eric Nygma <[EMAIL PROTECTED]> wrote:
>
> Hi Ruwan,
>
> Please see inline ...
>
> On 10/6/07, Ruwan Linton <[EMAIL PROTECTED]> wrote:
> >
> > Hi Gary & Eric,
> >
> > I am really sorry on getting late in trying this. Somehow this was
> missed
> > from my todo list with the heavy workload.
> >
> > Mail transport and the sending process seems OK and it just works when
> > trying to send an email in the inflow. There was a major error on the
> > outflow which is, not being picking the endpoint inside the send
> mediator
> > in
> > the sending process of the outflow (sendback). I have fixed this and if
> > you
> > build Synapse from the svn trunk now, you will be able to see this
> > working.
> > As Asankha suggested you need to uncomment and change the mail transport
> > sender in the axis2.xml as well.
> >
> > Eric, now you should be able to do this by adding a send mediator with
> an
> > address endpoint pointing to the mailto:$MAIL_ADDRESS with the uri
> > attribute
> > of that endpoint. Let me know if you run in to issues with this.
>
>
> I checked out the latest sources from SVN today [8th Oct]. Configured the
> synapse's axis2.xml to enable the Mail Transport sender as follows :
> <transportSender name="mailto" class="
> org.apache.axis2.transport.mail.MailTransportSender">
> <parameter name="mail.host">XXXXX</parameter>
> <parameter name="mail.smtp.localhost">XXXXX</parameter>
> <parameter name="mail.smtp.port">465</parameter>
> <parameter name="transport.mail.smtp.port">80</parameter-->
> <parameter name="mail.smtp.user">XXXXX</parameter>
> <parameter name="transport.mail.smtp.password">XXXXX</parameter>
> <parameter name="mail.smtp.from">XXXXX</parameter>
> <parameter name="mail.smtp.debug">true</parameter>
> <parameter name="mail.debug">true</parameter>
> <parameter name="mail.smtp.socketFactory.port">465</parameter>
> <parameter name="mail.smtp.socketFactory.class">
> javax.net.ssl.SSLSocketFactory</parameter>
> <parameter name="mail.smtp.socketFactory.fallback
> ">false</parameter>
> <parameter name="mail.smtp.auth">true</parameter>
> <parameter name="mail.smtp.starttls.enable">true</parameter>
> </transportSender>
>
> Next, I edited the synapse_sample_0.xml config file to look as :
> <log level="full"/>
>
> <in>
> <!-- Send the messageto implicit destination -->
> <send/>
> </in>
> <out>
> <send>
> <endpoint>
> <address uri="mailto:XXXXX"/>
> </endpoint>
> </send>
> </out>
>
> Upon running the sample client, I could see the response soap message in
> my
> inbox.It worked for me!
>
> However, I also observed some exceptions in the synapse server logs :
>
> 221 2.0.0 mx.google.com closing connection 2sm11687489rvi
> 2007-10-08 12:13:06,371 [xxxxx] [HttpClientWorker-1] INFO EMailSender
> Message being send. [Action = ]null
> 2007-10-08 12:13:06,378 [xxxxx] [HttpClientWorker-1] ERROR Axis2Sender
> Unexpected error during sending message out
> org.apache.axis2.AxisFault: Could not found transport for mailto
> at org.apache.axis2.transport.mail.MailTransportSender.sendMimeMessage
> (
> MailTransportSender.java:223)
> at org.apache.axis2.transport.mail.MailTransportSender.invoke(
> MailTransportSender.java:258)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> at
>
> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send
> (DynamicAxisOperation.java:192)
> at
>
> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl
> (DynamicAxisOperation.java:176)
> at org.apache.axis2.client.OperationClient.execute(
> OperationClient.java
> :163)
> at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(
> Axis2FlexibleMEPClient.java:248)
> at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java
> :55)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(
> Axis2SynapseEnvironment.java:159)
> at org.apache.synapse.endpoints.AddressEndpoint.send(
> AddressEndpoint.java:204)
> at org.apache.synapse.mediators.builtin.SendMediator.mediate(
> SendMediator.java:100)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(
> AbstractListMediator.java:60)
> at org.apache.synapse.mediators.filters.OutMediator.mediate(
> OutMediator.java:60)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(
> AbstractListMediator.java:60)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(
> SequenceMediator.java:121)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage
> (
> Axis2SynapseEnvironment.java:118)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage
> (
> SynapseCallbackReceiver.java:276)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(
> SynapseCallbackReceiver.java:126)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> at org.apache.axis2.transport.nhttp.ClientWorker.run(ClientWorker.java
> :175)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> ThreadPoolExecutor.java:650)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.axis2.AxisFault: Could not found transport for
> mailto
> at org.apache.axis2.transport.mail.EMailSender.sendReceive(
> EMailSender.java:252)
> at org.apache.axis2.transport.mail.EMailSender.send(EMailSender.java
> :164)
> at org.apache.axis2.transport.mail.MailTransportSender.sendMimeMessage
> (
> MailTransportSender.java:220)
> ... 22 more
> 2007-10-08 12:13:06,383 [xxxxxx] [HttpClientWorker-1] WARN FaultHandler
> Fault handler - setting ERROR_MESSAGE : Unexpected error during sending
> message out
> 2007-10-08 12:13:06,384 [xxxxxx] [HttpClientWorker-1] WARN FaultHandler
> Fault handler - setting ERROR_DETAIL : org.apache.synapse.SynapseException
> :
> Unexpected error during sending message out
> at org.apache.synapse.core.axis2.Axis2Sender.handleException(
> Axis2Sender.java:113)
> at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java
> :62)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(
> Axis2SynapseEnvironment.java:159)
> at org.apache.synapse.endpoints.AddressEndpoint.send(
> AddressEndpoint.java:204)
> at org.apache.synapse.mediators.builtin.SendMediator.mediate(
> SendMediator.java:100)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(
> AbstractListMediator.java:60)
> at org.apache.synapse.mediators.filters.OutMediator.mediate(
> OutMediator.java:60)
> at org.apache.synapse.mediators.AbstractListMediator.mediate(
> AbstractListMediator.java:60)
> at org.apache.synapse.mediators.base.SequenceMediator.mediate(
> SequenceMediator.java:121)
> at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage
> (
> Axis2SynapseEnvironment.java:118)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage
> (
> SynapseCallbackReceiver.java:276)
> at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(
> SynapseCallbackReceiver.java:126)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> at org.apache.axis2.transport.nhttp.ClientWorker.run(ClientWorker.java
> :175)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> ThreadPoolExecutor.java:650)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: org.apache.axis2.AxisFault: Could not found transport for
> mailto
> at org.apache.axis2.transport.mail.MailTransportSender.sendMimeMessage
> (
> MailTransportSender.java:223)
> at org.apache.axis2.transport.mail.MailTransportSender.invoke(
> MailTransportSender.java:258)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> at
>
> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send
> (DynamicAxisOperation.java:192)
> at
>
> org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl
> (DynamicAxisOperation.java:176)
> at org.apache.axis2.client.OperationClient.execute(
> OperationClient.java
> :163)
> at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(
> Axis2FlexibleMEPClient.java:248)
> at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java
> :55)
> ... 15 more
> Caused by: org.apache.axis2.AxisFault: Could not found transport for
> mailto
> at org.apache.axis2.transport.mail.EMailSender.sendReceive(
> EMailSender.java:252)
> at org.apache.axis2.transport.mail.EMailSender.send(EMailSender.java
> :164)
> at org.apache.axis2.transport.mail.MailTransportSender.sendMimeMessage
> (
> MailTransportSender.java:220)
> ... 22 more
>
> Is there some setting I missed which has been causing the above exception
> ?
>
> Thanks,
> Eric.
>
> Thanks,
> > Ruwan
> >
> > On 10/6/07, Geiglein, Gary <[EMAIL PROTECTED]> wrote:
> > >
> > > This was never resolved. The last message from Ruwan Linton was:
> > >
> > > "Hmmm.... OK. I will try this and get back to you soon." (see the end
> of
> > > the thread)
> > >
> > > -----Original Message-----
> > > From: Asankha C. Perera [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, October 05, 2007 8:41 AM
> > > To: [email protected]
> > > Subject: Re: Sending to a mail endpoint
> > >
> > > Eric
> > >
> > > What you need to do is to configure the mail transport in the
> axis2.xml
> > > used by the Synapse instance. (Similar to enabling JMS). For 1.0release
> > >
> > > we did not have any samples or documentation on this - and we have not
> > > yet done any new docs/samples for 1.1 either. We were actually
> planning
> > > to cut an RC this week - but as you may see we are a bit late on this.
> > >
> > > Meanwhile can you follow this thread
> > > (http://www.nabble.com/How-do-I-send-a-SMTP-payload--t4470526.html)
> > > until one of the developers could help you with more docs/details
> > >
> > > asankha
> > >
> > > Eric Nygma wrote:
> > > > Hi,
> > > >
> > > > With Synapse I define the proxy to a webservice endpoint. Is it
> > > possible to
> > > > redirect the response
> > > > from the ws endpoint as an email.
> > > > Are there some samples with the distribution ? Or is some
> > > configuration
> > > > setting needed somewhere to get it
> > > > working?
> > > >
> > > > Thanks for the help.
> > > >
> > > > Regards
> > > > Eric.
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Ruwan Linton
> > http://www.wso2.org - "Oxygenating the Web Services Platform"
> >
>
--
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"