You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Ruwan Linton <ru...@gmail.com> on 2007/10/06 09:02:08 UTC

Re: How do I send a SMTP payload?

Gary,

There was an issue and I have fixed that. Sorry for the late. Can you try
this with the svn trunk and let me know if you run into any issues. (First,
try to send back the response only through email and if you succeeded in
that try both the reply back to client and the mail, sometimes you may need
to clone the message to send to both)

Thanks,
Ruwan

On 9/22/07, Ruwan Linton <ru...@gmail.com> wrote:
>
> Hmmm.... OK. I will try this and get back to you soon.
>
> Thanks for the information.
>
> Thanks,
> Ruwan
>
> On 9/22/07, Geiglein, Gary < geigleing@peacetech.com> wrote:
> >
> > OK,
> >
> > Sending back to the http client (with the mail part commented out)
> > works.
> >
> > But trying to send to just the SMTP endpoint (with the http endpoint
> > commented out) still sends to the http client.
> >
> > <definitions xmlns="http://ws.apache.org/ns/synapse ">
> >     <in>
> >         <log level="full"/>
> >         <filter source="get-property('To')"
> > regex="http://localhost:9000.* ">
> >             <send/>
> >         </filter>
> >     </in>
> >
> >     <out>
> >         <!-- sent to original client -->
> > <!--
> >         <send/>
> > -->
> >
> >         <!-- copy payload to mail transport -->
> >         <send>
> >             <endpoint>
> >                 <address uri="mailto:geigleing@peacetech.com"/>
> >             </endpoint>
> >         </send>
> >     </out>
> > </definitions>
> >
> > If I understood your last message, the header needs to be re-written,
> > and it does not look like it is happening implicitly based on the
> > endpoint.
> >
> >
> > -----Original Message-----
> > From: Ruwan Linton [mailto:ruwan.linton@gmail.com]
> > Sent: Friday, September 21, 2007 10:16 AM
> > To: synapse-user@ws.apache.org
> > Cc: ruwan@wso2.com
> > Subject: Re: How do I send a SMTP payload?
> >
> > Yes Gary,
> >
> > This is because when you do a send on a particular message context it
> > will
> > put the transfer-encoding on that message context and when you try to do
> > the
> > second send it will try to write the same header which is already
> > present
> > because this second mediator also tries to access the same message
> > context
> > (reference). At the same time there can be conflicts in this case
> > because
> > the http sender and smtp sender both tries to write headers to the same
> > message context.
> >
> > I also suggest to try the simple scenario working first, that is to get
> > the
> > response back to the client without the mail transport. Then try to get
> > the
> > message only through the mail transport (in both cases 1 send mediator
> > on
> > the out). If you have succeeded in both here is the configuration that
> > you
> > should try to achieve both.
> >
> > <out>
> > <clone>
> >   <target><sequence><send/></sequence></target>
> >   <target endpoint="reference_to_mailto:endpoint"/>
> > </clone>
> > </out>
> >
> > If you encounter any problems in one of these three steps (only to
> > client,
> > only through mail, both) report them to us so that we can help you
> > through.
> >
> > Thanks,
> > Ruwan
> >
> > On 9/21/07, Paul Fremantle <pz...@gmail.com> wrote:
> > >
> > > Gary
> > >
> > > I think you need to use a "clone" mediator to do what you want ( i.e.
> > > sending a copy of the response message to the mail destination). It
> > > also seems possible there is a bug.
> > >
> > > We have such a mediator (Ruwan wrote one), but can you try a simpler
> > > scenario first - just route the original request to mail?
> > >
> > > Paul
> > >
> > > On 9/20/07, Geiglein, Gary <ge...@peacetech.com> wrote:
> > > > I thought it would be this simple, but this generates several
> > errors.
> > > >
> > > > 111661 [HttpClientWorker-1] ERROR ServerHandler
> > (ServerHandler.java:291)
> > > > - Unexpected HTTP protocol error : Transfer-encoding header already
> > > > present
> > > > org.apache.http.ProtocolException: Transfer-encoding header already
> > > > present
> > > >         at
> > > >
> > org.apache.http.protocol.ResponseContent.process(ResponseContent.java:66
> > > > )
> > > > ...
> > > >
> > > >
> > > > 111723 [HttpClientWorker-1] ERROR HttpCoreNIOSender
> > > > (HttpCoreNIOSender.java:456) - IO Error sending response message
> > > > org.apache.axis2.AxisFault: Pipe closed
> > > >         at
> > > >
> > org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessage
> > > > Formatter.java:59)
> > > >
> > > > ...
> > > >
> > > > 111801 [HttpClientWorker-1] ERROR Axis2Sender ( Axis2Sender.java
> > :104)
> > -
> > > > Unexpected error during Sending message back
> > > > org.apache.axis2.AxisFault: IO Error sending response message
> > > >
> > > > It looks like the mail transport is not being used, the classes that
> >
> > are
> > > > throwing the exceptions org.apache.http.protocol.ResponseContent and
> > > > org.apache.axis2.transport.http.SOAPMessageFormatter are in HTTP
> > > > packages and I don't see anything coming from
> > > > org.apache.axis2.transport.mail
> > > >
> > > > The entire log files for running both with & without mail configured
> > in
> > > > synapse.xml, along with the config files can be found @
> > > > http://deais.nci.nih.gov/Public/Synapse/
> > > >
> > > > -----Original Message-----
> > > > From: Upul Godage [mailto: upulg.dev@gmail.com]
> > > > Sent: Wednesday, September 19, 2007 5:34 AM
> > > > To: synapse-user@ws.apache.org
> > > > Subject: Re: How do I send a SMTP payload?
> > > >
> > > > Hi Geiglein,
> > > >
> > > > You can have the synapse configuration as follows.
> > > >
> > > > <definitions xmlns="http://ws.apache.org/ns/synapse ">
> > > >     <!-- log all attributes of messages passing through -->
> > > >     <log level="full"/>
> > > >     <send>
> > > >         <endpoint>
> > > >             <address uri="mailto: upul@abc.com"/>
> > > >         </endpoint>
> > > >     </send>
> > > >     <!-- Send the messageto implicit destination -->
> > > >     <send/>
> > > > </definitions>
> > > >
> > > > Hope this helps.
> > > >
> > > > Upul
> > > >
> > > >
> > > > On 9/18/07, Geiglein, Gary <geigleing@peacetech.com > wrote:
> > > > >
> > > > > I understand the axis2 configuration. I guess my problem is
> > defining
> > > > the
> > > > > endpoint for synapse.
> > > > >
> > > > > How do I configure an endpoint to use the "mailto" transport
> > > > configured
> > > > > in axis. I would like to change the delivered synapse.xml to
> > receive
> > > > the
> > > > > request as configured in the quick start, then both return the
> > result
> > > > to
> > > > > the client, and email a copy through the configured mailto
> > transport
> > > > > sender.
> > > > >
> > > > > -----Original Message-----
> > > > > From: Asankha C. Perera [mailto: asankha@wso2.com]
> > > > > Sent: Tuesday, September 18, 2007 3:55 AM
> > > > > To: synapse-user@ws.apache.org
> > > > > Subject: Re: How do I send a SMTP payload?
> > > > >
> > > > > Hi Geiglein
> > > > >
> > > > > You need to enable the mail transport in your axis2.xml by
> > > > uncommenting
> > > > > the following and configuring the elements according to your
> > > > > environment. Also check the following links for more information.
> > From
> > > > > within Synapse, you just use a mail EPR to send it via the mail
> > > > > transport.
> > > > >
> > > > > Let me know if you run into any issues
> > > > > asankha
> > > > >
> > > > > http://ws.apache.org/axis2/1_3/mail-configuration.html
> > > > > http://wso2.org/library/2537
> > > > >
> > > > >     <!-- Mail Transport Listener  -->
> > > > >     <!-- This is a sample configuration. It assumes a mail server
> > > > > running in localhost.
> > > > >          Listener pops  messages that comes to the email address
> > > > > red@localhost. Users
> > > > >          password is red. Listener connect to the server every
> > 3000
> > > > > milliseconds.
> > > > >          Parameters with "transport." prefix is Axis2 specific.
> > Others
> > > > > are all from Java Mail API.
> > > > >           http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html<http://people.apache.org/%7Epzf/SMTPBase64Binding-0.2.html>
> > > > >      -->
> > > > >    <!--<transportReceiver name="mailto"
> > > > > class="org.apache.axis2.transport.mail.SimpleMailListener ">
> > > > >         <parameter name="mail.pop3.host">localhost</parameter>
> > > > >         <parameter name="mail.pop3.user">red</parameter>
> > > > >         <parameter name=" mail.store.protocol">pop3</parameter>
> > > > >         <parameter
> > name="transport.mail.pop3.password">red</parameter>
> > > > >         <parameter
> > > > > name=" transport.mail.replyToAddress">red@localhost</parameter>
> > > > >         <parameter
> > name="transport.listener.interval">3000</parameter>
> > > > >     </transportReceiver>-->
> > > > >
> > > > > ......
> > > > >     <!-- Mail Transport Sender  -->
> > > > >     <!--Only need to uncomment the sender. Configuration is
> > achieved
> > > > > with every client.
> > > > >         At any instant mail host should be given. Sample
> > configuration
> > > > > has been given.
> > > > >
> > http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html--
> > <http://people.apache.org/%7Epzf/SMTPBase64Binding-0.2.html-->>
> > > > >     <!-- ================================================= -->
> > > > >     <!--<transportSender name="mailto"
> > > > > class="org.apache.axis2.transport.mail.MailTransportSender ">
> > > > >         <parameter name="mail.smtp.host">localhost</parameter>
> > > > >     </transportSender>-->
> > > > >
> > > > >
> > > > >
> > > > > Geiglein, Gary wrote:
> > > > > > The introduction says that you support SMTP but I don't see
> > anything
> > > > > in
> > > > > > the documentation, examples, or tests to give a clue how to set
> > this
> > > > > up.
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: synapse-user-help@ws.apache.org
> > > > >
> > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: synapse-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: synapse-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Paul Fremantle
> > > Co-Founder and VP of Technical Sales, WSO2
> > > OASIS WS-RX TC Co-chair
> > >
> > > blog: http://pzf.fremantle.org
> > > paul@wso2.com
> > >
> > > "Oxygenating the Web Service Platform", www.wso2.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: synapse-user-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Ruwan Linton
> > http://www.wso2.org - "Oxygenating the Web Services Platform"
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-user-help@ws.apache.org
> >
> >
>
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"
>



-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

RE: How do I send a SMTP payload?

Posted by "Geiglein, Gary" <ge...@peacetech.com>.
I am currently stuck in another project. I will get back to this later
this week.

-----Original Message-----
From: Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Sent: Wednesday, October 10, 2007 3:43 AM
To: synapse-user@ws.apache.org
Subject: Re: How do I send a SMTP payload?

Gary / Asankha,

On 10/10/07, Ruwan Linton <ru...@gmail.com> wrote:
>
> Hi Gary and Asankha,
>
> My comments in line,
>
> On 10/9/07, Asankha C. Perera <as...@wso2.com> wrote:
> >
> > Gary
> > > The first compile with maven failed due to language level.
> > >
> > >
> >
Z:\Projects\Apache\ws\Synapse\svn\modules\core\src\main\java\org\apache\
> > > synapse\util\concurrent\SynapseThreadPool.java:[54,36] generics
are
> > not
> > > suppor
> > > ted in -source 1.4
> > > (try -source 1.5 to enable generics)
> > >         TimeUnit unit, BlockingQueue<Runnable> workQueue) {
> > >
> > Ruwan - this seems to be related to the recent update.. can you look
> > into this
>
>
> Yes Asankha, I forgot to change the source level in the pom. Committed
the
> change and now it should be OK.
>
> > Running org.apache.axis2.transport.vfs.VFSEchoRawXMLTest
> > > org.apache.axis2.AxisFault : IO Error while creating response file
:
> > >
> >
file:///Z:/Projects/Apache/ws/Synapse/svn/modules/transports/target/vfs1
> > > /res/response.xml
> > >
> > Noted, and is a known issue with Windows file locking :-(
Unfortunately
> > the only option seems to be to disable VFS testing in Windows, I'm
not
> > sure if this is straight forward in Maven2.. but will try to look
for a
> > solution
>
>
> I think this is possible with maven 2 using a profile. I will look in
to
> this for the time being can you skip the tests passing the -
> Dmaven.test.skip=true property to maven?
>

I have fixed this. Now it should be OK. No need to skip tests.


> The file in use error occurred 4 times. (Note: I am running on windows
> > > XP)
> > >
> >
> > > Continuing with: mvn package -Dmaven.test.skip=true to build the
jars
> > > worked.
> > >
> > > Next I tried running my test configuration, but I get errors from
the
> > > synapse startup:
> > >
> > > [main] ERROR ModuleDeployer - The synapse-1.0.mar module, which is
not
> > > valid, caused org.apache.synapse.core.axis2.SynapseModule
> > > org.apache.axis2.deployment.DeploymentException:
> > > org.apache.synapse.core.axis2.SynapseModule
> > > ...Caused by: java.lang.ClassNotFoundException:
> > > org.apache.synapse.core.axis2.SynapseModule
> > >
> > Hmm.. I haven't seen this one though.. are you using Maven 2.0.6 ?
>
>
> This seems to be a maven issue, our build is having some issues with
maven
> 2.0.7. Can you try to build using the maven version 2.0.6? (At the
mean
> time I will try to fix the build to work in 2.0.7)
>

I  have tested the build on maven 2.0.7 and it is working fine for me.
Can
you do a clean build and see whether it exists and if so check the mar
file
to see whether the specified class is there or not.

Thanks,
Ruwan

Thanks,
> Ruwan
>
> > And
> > >
> > > [main] DEBUG ProjectResourceBundle -
> > > org.apache.axis2.i18n.resource::handleGetObject(modulenotavailble)
> > > org.apache.axis2.AxisFault: The system is attempting to engage a
> > module
> > > that is not available: synapse-1.0
> > >
> > >
> > asankha
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-user-help@ws.apache.org
> >
> >
>
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"
>



-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


Re: How do I send a SMTP payload?

Posted by Ruwan Linton <ru...@gmail.com>.
Gary / Asankha,

On 10/10/07, Ruwan Linton <ru...@gmail.com> wrote:
>
> Hi Gary and Asankha,
>
> My comments in line,
>
> On 10/9/07, Asankha C. Perera <as...@wso2.com> wrote:
> >
> > Gary
> > > The first compile with maven failed due to language level.
> > >
> > >
> > Z:\Projects\Apache\ws\Synapse\svn\modules\core\src\main\java\org\apache\
> > > synapse\util\concurrent\SynapseThreadPool.java:[54,36] generics are
> > not
> > > suppor
> > > ted in -source 1.4
> > > (try -source 1.5 to enable generics)
> > >         TimeUnit unit, BlockingQueue<Runnable> workQueue) {
> > >
> > Ruwan - this seems to be related to the recent update.. can you look
> > into this
>
>
> Yes Asankha, I forgot to change the source level in the pom. Committed the
> change and now it should be OK.
>
> > Running org.apache.axis2.transport.vfs.VFSEchoRawXMLTest
> > > org.apache.axis2.AxisFault : IO Error while creating response file :
> > >
> > file:///Z:/Projects/Apache/ws/Synapse/svn/modules/transports/target/vfs1
> > > /res/response.xml
> > >
> > Noted, and is a known issue with Windows file locking :-( Unfortunately
> > the only option seems to be to disable VFS testing in Windows, I'm not
> > sure if this is straight forward in Maven2.. but will try to look for a
> > solution
>
>
> I think this is possible with maven 2 using a profile. I will look in to
> this for the time being can you skip the tests passing the -
> Dmaven.test.skip=true property to maven?
>

I have fixed this. Now it should be OK. No need to skip tests.


> The file in use error occurred 4 times. (Note: I am running on windows
> > > XP)
> > >
> >
> > > Continuing with: mvn package -Dmaven.test.skip=true to build the jars
> > > worked.
> > >
> > > Next I tried running my test configuration, but I get errors from the
> > > synapse startup:
> > >
> > > [main] ERROR ModuleDeployer - The synapse-1.0.mar module, which is not
> > > valid, caused org.apache.synapse.core.axis2.SynapseModule
> > > org.apache.axis2.deployment.DeploymentException:
> > > org.apache.synapse.core.axis2.SynapseModule
> > > ...Caused by: java.lang.ClassNotFoundException:
> > > org.apache.synapse.core.axis2.SynapseModule
> > >
> > Hmm.. I haven't seen this one though.. are you using Maven 2.0.6 ?
>
>
> This seems to be a maven issue, our build is having some issues with maven
> 2.0.7. Can you try to build using the maven version 2.0.6? (At the mean
> time I will try to fix the build to work in 2.0.7)
>

I  have tested the build on maven 2.0.7 and it is working fine for me. Can
you do a clean build and see whether it exists and if so check the mar file
to see whether the specified class is there or not.

Thanks,
Ruwan

Thanks,
> Ruwan
>
> > And
> > >
> > > [main] DEBUG ProjectResourceBundle -
> > > org.apache.axis2.i18n.resource::handleGetObject(modulenotavailble)
> > > org.apache.axis2.AxisFault: The system is attempting to engage a
> > module
> > > that is not available: synapse-1.0
> > >
> > >
> > asankha
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-user-help@ws.apache.org
> >
> >
>
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"
>



-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: How do I send a SMTP payload?

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Gary and Asankha,

My comments in line,

On 10/9/07, Asankha C. Perera <as...@wso2.com> wrote:
>
> Gary
> > The first compile with maven failed due to language level.
> >
> > Z:\Projects\Apache\ws\Synapse\svn\modules\core\src\main\java\org\apache\
> > synapse\util\concurrent\SynapseThreadPool.java:[54,36] generics are not
> > suppor
> > ted in -source 1.4
> > (try -source 1.5 to enable generics)
> >         TimeUnit unit, BlockingQueue<Runnable> workQueue) {
> >
> Ruwan - this seems to be related to the recent update.. can you look
> into this


Yes Asankha, I forgot to change the source level in the pom. Committed the
change and now it should be OK.

> Running org.apache.axis2.transport.vfs.VFSEchoRawXMLTest
> > org.apache.axis2.AxisFault: IO Error while creating response file :
> > file:///Z:/Projects/Apache/ws/Synapse/svn/modules/transports/target/vfs1
> > /res/response.xml
> >
> Noted, and is a known issue with Windows file locking :-( Unfortunately
> the only option seems to be to disable VFS testing in Windows, I'm not
> sure if this is straight forward in Maven2.. but will try to look for a
> solution


I think this is possible with maven 2 using a profile. I will look in to
this for the time being can you skip the tests passing the -
Dmaven.test.skip=true property to maven?

> The file in use error occurred 4 times. (Note: I am running on windows
> > XP)
> >
>
> > Continuing with: mvn package -Dmaven.test.skip=true to build the jars
> > worked.
> >
> > Next I tried running my test configuration, but I get errors from the
> > synapse startup:
> >
> > [main] ERROR ModuleDeployer - The synapse-1.0.mar module, which is not
> > valid, caused org.apache.synapse.core.axis2.SynapseModule
> > org.apache.axis2.deployment.DeploymentException:
> > org.apache.synapse.core.axis2.SynapseModule
> > ...Caused by: java.lang.ClassNotFoundException:
> > org.apache.synapse.core.axis2.SynapseModule
> >
> Hmm.. I haven't seen this one though.. are you using Maven 2.0.6 ?


This seems to be a maven issue, our build is having some issues with maven
2.0.7. Can you try to build using the maven version 2.0.6? (At the mean time
I will try to fix the build to work in 2.0.7)

Thanks,
Ruwan

> And
> >
> > [main] DEBUG ProjectResourceBundle -
> > org.apache.axis2.i18n.resource::handleGetObject(modulenotavailble)
> > org.apache.axis2.AxisFault: The system is attempting to engage a module
> > that is not available: synapse-1.0
> >
> >
> asankha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-user-help@ws.apache.org
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

RE: How do I send a SMTP payload?

Posted by "Geiglein, Gary" <ge...@peacetech.com>.
I thought the test error was file I/O on windows. 

The last two errors where from the synapse console on start up.

As for the maven version:
Z:\>mvn -version
Maven version: 2.0.7
Java version: 1.5.0_12
OS name: "windows xp" version: "5.1" arch: "x86"

Z:\>

-----Original Message-----
From: Asankha C. Perera [mailto:asankha@wso2.com] 
Sent: Tuesday, October 09, 2007 1:49 PM
To: synapse-user@ws.apache.org
Subject: Re: How do I send a SMTP payload?

Gary
> The first compile with maven failed due to language level.
>
>
Z:\Projects\Apache\ws\Synapse\svn\modules\core\src\main\java\org\apache\
> synapse\util\concurrent\SynapseThreadPool.java:[54,36] generics are
not
> suppor
> ted in -source 1.4
> (try -source 1.5 to enable generics)
>         TimeUnit unit, BlockingQueue<Runnable> workQueue) {
>   
Ruwan - this seems to be related to the recent update.. can you look 
into this
> Running org.apache.axis2.transport.vfs.VFSEchoRawXMLTest
> org.apache.axis2.AxisFault: IO Error while creating response file :
>
file:///Z:/Projects/Apache/ws/Synapse/svn/modules/transports/target/vfs1
> /res/response.xml
>   
Noted, and is a known issue with Windows file locking :-( Unfortunately 
the only option seems to be to disable VFS testing in Windows, I'm not 
sure if this is straight forward in Maven2.. but will try to look for a 
solution
> The file in use error occurred 4 times. (Note: I am running on windows
> XP)
>   

> Continuing with: mvn package -Dmaven.test.skip=true to build the jars
> worked.
>
> Next I tried running my test configuration, but I get errors from the
> synapse startup:
>
> [main] ERROR ModuleDeployer - The synapse-1.0.mar module, which is not
> valid, caused org.apache.synapse.core.axis2.SynapseModule
> org.apache.axis2.deployment.DeploymentException:
> org.apache.synapse.core.axis2.SynapseModule
> ...Caused by: java.lang.ClassNotFoundException:
> org.apache.synapse.core.axis2.SynapseModule
>   
Hmm.. I haven't seen this one though.. are you using Maven 2.0.6 ?

> And
>
> [main] DEBUG ProjectResourceBundle -
> org.apache.axis2.i18n.resource::handleGetObject(modulenotavailble)
> org.apache.axis2.AxisFault: The system is attempting to engage a
module
> that is not available: synapse-1.0
>
>   
asankha

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


Re: How do I send a SMTP payload?

Posted by "Asankha C. Perera" <as...@wso2.com>.
Gary
> The first compile with maven failed due to language level.
>
> Z:\Projects\Apache\ws\Synapse\svn\modules\core\src\main\java\org\apache\
> synapse\util\concurrent\SynapseThreadPool.java:[54,36] generics are not
> suppor
> ted in -source 1.4
> (try -source 1.5 to enable generics)
>         TimeUnit unit, BlockingQueue<Runnable> workQueue) {
>   
Ruwan - this seems to be related to the recent update.. can you look 
into this
> Running org.apache.axis2.transport.vfs.VFSEchoRawXMLTest
> org.apache.axis2.AxisFault: IO Error while creating response file :
> file:///Z:/Projects/Apache/ws/Synapse/svn/modules/transports/target/vfs1
> /res/response.xml
>   
Noted, and is a known issue with Windows file locking :-( Unfortunately 
the only option seems to be to disable VFS testing in Windows, I'm not 
sure if this is straight forward in Maven2.. but will try to look for a 
solution
> The file in use error occurred 4 times. (Note: I am running on windows
> XP)
>   

> Continuing with: mvn package -Dmaven.test.skip=true to build the jars
> worked.
>
> Next I tried running my test configuration, but I get errors from the
> synapse startup:
>
> [main] ERROR ModuleDeployer - The synapse-1.0.mar module, which is not
> valid, caused org.apache.synapse.core.axis2.SynapseModule
> org.apache.axis2.deployment.DeploymentException:
> org.apache.synapse.core.axis2.SynapseModule
> ...Caused by: java.lang.ClassNotFoundException:
> org.apache.synapse.core.axis2.SynapseModule
>   
Hmm.. I haven't seen this one though.. are you using Maven 2.0.6 ?

> And
>
> [main] DEBUG ProjectResourceBundle -
> org.apache.axis2.i18n.resource::handleGetObject(modulenotavailble)
> org.apache.axis2.AxisFault: The system is attempting to engage a module
> that is not available: synapse-1.0
>
>   
asankha

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


RE: How do I send a SMTP payload?

Posted by "Geiglein, Gary" <ge...@peacetech.com>.
I just figured you where busy and would get to it eventually.

I checked out the source from
http://svn.apache.org/repos/asf/webservices/synapse/trunk/java

The first compile with maven failed due to language level.

Z:\Projects\Apache\ws\Synapse\svn\modules\core\src\main\java\org\apache\
synapse\util\concurrent\SynapseThreadPool.java:[54,36] generics are not
suppor
ted in -source 1.4
(try -source 1.5 to enable generics)
        TimeUnit unit, BlockingQueue<Runnable> workQueue) {

After changing the both the source and target to 1.5 the compile worked
but the tests failed.

Running org.apache.axis2.transport.vfs.VFSEchoRawXMLTest
org.apache.axis2.AxisFault: IO Error while creating response file :
file:///Z:/Projects/Apache/ws/Synapse/svn/modules/transports/target/vfs1
/res/respo
nse.xml
        at
org.apache.axis2.transport.base.AbstractTransportSender.handleException(
AbstractTransportSender.java:214)
...
Caused by: org.apache.commons.vfs.FileSystemException: Could not write
to
"file:///Z:/Projects/Apache/ws/Synapse/svn/modules/transports/target/vfs
1/re
s/response.xml" because it is currently in use.


The file in use error occurred 4 times. (Note: I am running on windows
XP)

Continuing with: mvn package -Dmaven.test.skip=true to build the jars
worked.

Next I tried running my test configuration, but I get errors from the
synapse startup:

[main] ERROR ModuleDeployer - The synapse-1.0.mar module, which is not
valid, caused org.apache.synapse.core.axis2.SynapseModule
org.apache.axis2.deployment.DeploymentException:
org.apache.synapse.core.axis2.SynapseModule
        at
org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArch
ive(ArchiveReader.java:493)
        at
org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:69
)
        at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(De
ploymentFileData.java:137)
        at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.j
ava:571)
        at
org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.j
ava:231)
        at
org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.
java:64)
        at
org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener
.java:59)
        at
org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEn
gine.java:134)
        at
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(
FileSystemConfigurator.java:132)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
Context(ConfigurationContextFactory.java:64)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
ContextFromFileSystem(ConfigurationContextFactory.java:180)
        at org.apache.synapse.ServerManager.start(ServerManager.java:68)
        at org.apache.synapse.SynapseServer.main(SynapseServer.java:48)
Caused by: org.apache.axis2.deployment.DeploymentException:
org.apache.synapse.core.axis2.SynapseModule
        at
org.apache.axis2.deployment.ModuleBuilder.loadModuleClass(ModuleBuilder.
java:82)
        at
org.apache.axis2.deployment.ModuleBuilder.populateModule(ModuleBuilder.j
ava:96)
        at
org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArch
ive(ArchiveReader.java:480)
        ... 12 more
Caused by: java.lang.ClassNotFoundException:
org.apache.synapse.core.axis2.SynapseModule
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
        at org.apache.axis2.util.Loader.loadClass(Loader.java:229)
        at
org.apache.axis2.deployment.ModuleBuilder.loadModuleClass(ModuleBuilder.
java:66)
        ... 14 more

And

[main] DEBUG ProjectResourceBundle -
org.apache.axis2.i18n.resource::handleGetObject(modulenotavailble)
org.apache.axis2.AxisFault: The system is attempting to engage a module
that is not available: synapse-1.0
        at
org.apache.axis2.engine.AxisConfiguration.engageModule(AxisConfiguration
.java:440)
        at
org.apache.axis2.engine.AxisConfiguration.engageGlobalModules(AxisConfig
uration.java:567)
        at
org.apache.axis2.deployment.DeploymentEngine.engageModules(DeploymentEng
ine.java:589)
        at
org.apache.axis2.deployment.FileSystemConfigurator.engageGlobalModules(F
ileSystemConfigurator.java:141)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
Context(ConfigurationContextFactory.java:77)
        at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
ContextFromFileSystem(ConfigurationContextFactory.java:180)
        at org.apache.synapse.ServerManager.start(ServerManager.java:68)
        at org.apache.synapse.SynapseServer.main(SynapseServer.java:48)
[SynapseServer] Startup failed...


-----Original Message-----
From: Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Sent: Saturday, October 06, 2007 3:02 AM
To: synapse-user@ws.apache.org
Subject: Re: How do I send a SMTP payload?

Gary,

There was an issue and I have fixed that. Sorry for the late. Can you
try
this with the svn trunk and let me know if you run into any issues.
(First,
try to send back the response only through email and if you succeeded in
that try both the reply back to client and the mail, sometimes you may
need
to clone the message to send to both)

Thanks,
Ruwan

On 9/22/07, Ruwan Linton <ru...@gmail.com> wrote:
>
> Hmmm.... OK. I will try this and get back to you soon.
>
> Thanks for the information.
>
> Thanks,
> Ruwan
>
> On 9/22/07, Geiglein, Gary < geigleing@peacetech.com> wrote:
> >
> > OK,
> >
> > Sending back to the http client (with the mail part commented out)
> > works.
> >
> > But trying to send to just the SMTP endpoint (with the http endpoint
> > commented out) still sends to the http client.
> >
> > <definitions xmlns="http://ws.apache.org/ns/synapse ">
> >     <in>
> >         <log level="full"/>
> >         <filter source="get-property('To')"
> > regex="http://localhost:9000.* ">
> >             <send/>
> >         </filter>
> >     </in>
> >
> >     <out>
> >         <!-- sent to original client -->
> > <!--
> >         <send/>
> > -->
> >
> >         <!-- copy payload to mail transport -->
> >         <send>
> >             <endpoint>
> >                 <address uri="mailto:geigleing@peacetech.com"/>
> >             </endpoint>
> >         </send>
> >     </out>
> > </definitions>
> >
> > If I understood your last message, the header needs to be
re-written,
> > and it does not look like it is happening implicitly based on the
> > endpoint.
> >
> >
> > -----Original Message-----
> > From: Ruwan Linton [mailto:ruwan.linton@gmail.com]
> > Sent: Friday, September 21, 2007 10:16 AM
> > To: synapse-user@ws.apache.org
> > Cc: ruwan@wso2.com
> > Subject: Re: How do I send a SMTP payload?
> >
> > Yes Gary,
> >
> > This is because when you do a send on a particular message context
it
> > will
> > put the transfer-encoding on that message context and when you try
to do
> > the
> > second send it will try to write the same header which is already
> > present
> > because this second mediator also tries to access the same message
> > context
> > (reference). At the same time there can be conflicts in this case
> > because
> > the http sender and smtp sender both tries to write headers to the
same
> > message context.
> >
> > I also suggest to try the simple scenario working first, that is to
get
> > the
> > response back to the client without the mail transport. Then try to
get
> > the
> > message only through the mail transport (in both cases 1 send
mediator
> > on
> > the out). If you have succeeded in both here is the configuration
that
> > you
> > should try to achieve both.
> >
> > <out>
> > <clone>
> >   <target><sequence><send/></sequence></target>
> >   <target endpoint="reference_to_mailto:endpoint"/>
> > </clone>
> > </out>
> >
> > If you encounter any problems in one of these three steps (only to
> > client,
> > only through mail, both) report them to us so that we can help you
> > through.
> >
> > Thanks,
> > Ruwan
> >
> > On 9/21/07, Paul Fremantle <pz...@gmail.com> wrote:
> > >
> > > Gary
> > >
> > > I think you need to use a "clone" mediator to do what you want (
i.e.
> > > sending a copy of the response message to the mail destination).
It
> > > also seems possible there is a bug.
> > >
> > > We have such a mediator (Ruwan wrote one), but can you try a
simpler
> > > scenario first - just route the original request to mail?
> > >
> > > Paul
> > >
> > > On 9/20/07, Geiglein, Gary <ge...@peacetech.com> wrote:
> > > > I thought it would be this simple, but this generates several
> > errors.
> > > >
> > > > 111661 [HttpClientWorker-1] ERROR ServerHandler
> > (ServerHandler.java:291)
> > > > - Unexpected HTTP protocol error : Transfer-encoding header
already
> > > > present
> > > > org.apache.http.ProtocolException: Transfer-encoding header
already
> > > > present
> > > >         at
> > > >
> >
org.apache.http.protocol.ResponseContent.process(ResponseContent.java:66
> > > > )
> > > > ...
> > > >
> > > >
> > > > 111723 [HttpClientWorker-1] ERROR HttpCoreNIOSender
> > > > (HttpCoreNIOSender.java:456) - IO Error sending response message
> > > > org.apache.axis2.AxisFault: Pipe closed
> > > >         at
> > > >
> >
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessage
> > > > Formatter.java:59)
> > > >
> > > > ...
> > > >
> > > > 111801 [HttpClientWorker-1] ERROR Axis2Sender ( Axis2Sender.java
> > :104)
> > -
> > > > Unexpected error during Sending message back
> > > > org.apache.axis2.AxisFault: IO Error sending response message
> > > >
> > > > It looks like the mail transport is not being used, the classes
that
> >
> > are
> > > > throwing the exceptions org.apache.http.protocol.ResponseContent
and
> > > > org.apache.axis2.transport.http.SOAPMessageFormatter are in HTTP
> > > > packages and I don't see anything coming from
> > > > org.apache.axis2.transport.mail
> > > >
> > > > The entire log files for running both with & without mail
configured
> > in
> > > > synapse.xml, along with the config files can be found @
> > > > http://deais.nci.nih.gov/Public/Synapse/
> > > >
> > > > -----Original Message-----
> > > > From: Upul Godage [mailto: upulg.dev@gmail.com]
> > > > Sent: Wednesday, September 19, 2007 5:34 AM
> > > > To: synapse-user@ws.apache.org
> > > > Subject: Re: How do I send a SMTP payload?
> > > >
> > > > Hi Geiglein,
> > > >
> > > > You can have the synapse configuration as follows.
> > > >
> > > > <definitions xmlns="http://ws.apache.org/ns/synapse ">
> > > >     <!-- log all attributes of messages passing through -->
> > > >     <log level="full"/>
> > > >     <send>
> > > >         <endpoint>
> > > >             <address uri="mailto: upul@abc.com"/>
> > > >         </endpoint>
> > > >     </send>
> > > >     <!-- Send the messageto implicit destination -->
> > > >     <send/>
> > > > </definitions>
> > > >
> > > > Hope this helps.
> > > >
> > > > Upul
> > > >
> > > >
> > > > On 9/18/07, Geiglein, Gary <geigleing@peacetech.com > wrote:
> > > > >
> > > > > I understand the axis2 configuration. I guess my problem is
> > defining
> > > > the
> > > > > endpoint for synapse.
> > > > >
> > > > > How do I configure an endpoint to use the "mailto" transport
> > > > configured
> > > > > in axis. I would like to change the delivered synapse.xml to
> > receive
> > > > the
> > > > > request as configured in the quick start, then both return the
> > result
> > > > to
> > > > > the client, and email a copy through the configured mailto
> > transport
> > > > > sender.
> > > > >
> > > > > -----Original Message-----
> > > > > From: Asankha C. Perera [mailto: asankha@wso2.com]
> > > > > Sent: Tuesday, September 18, 2007 3:55 AM
> > > > > To: synapse-user@ws.apache.org
> > > > > Subject: Re: How do I send a SMTP payload?
> > > > >
> > > > > Hi Geiglein
> > > > >
> > > > > You need to enable the mail transport in your axis2.xml by
> > > > uncommenting
> > > > > the following and configuring the elements according to your
> > > > > environment. Also check the following links for more
information.
> > From
> > > > > within Synapse, you just use a mail EPR to send it via the
mail
> > > > > transport.
> > > > >
> > > > > Let me know if you run into any issues
> > > > > asankha
> > > > >
> > > > > http://ws.apache.org/axis2/1_3/mail-configuration.html
> > > > > http://wso2.org/library/2537
> > > > >
> > > > >     <!-- Mail Transport Listener  -->
> > > > >     <!-- This is a sample configuration. It assumes a mail
server
> > > > > running in localhost.
> > > > >          Listener pops  messages that comes to the email
address
> > > > > red@localhost. Users
> > > > >          password is red. Listener connect to the server every
> > 3000
> > > > > milliseconds.
> > > > >          Parameters with "transport." prefix is Axis2
specific.
> > Others
> > > > > are all from Java Mail API.
> > > > >
http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html<http://people.a
pache.org/%7Epzf/SMTPBase64Binding-0.2.html>
> > > > >      -->
> > > > >    <!--<transportReceiver name="mailto"
> > > > > class="org.apache.axis2.transport.mail.SimpleMailListener ">
> > > > >         <parameter name="mail.pop3.host">localhost</parameter>
> > > > >         <parameter name="mail.pop3.user">red</parameter>
> > > > >         <parameter name="
mail.store.protocol">pop3</parameter>
> > > > >         <parameter
> > name="transport.mail.pop3.password">red</parameter>
> > > > >         <parameter
> > > > > name="
transport.mail.replyToAddress">red@localhost</parameter>
> > > > >         <parameter
> > name="transport.listener.interval">3000</parameter>
> > > > >     </transportReceiver>-->
> > > > >
> > > > > ......
> > > > >     <!-- Mail Transport Sender  -->
> > > > >     <!--Only need to uncomment the sender. Configuration is
> > achieved
> > > > > with every client.
> > > > >         At any instant mail host should be given. Sample
> > configuration
> > > > > has been given.
> > > > >
> > http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html--
> > <http://people.apache.org/%7Epzf/SMTPBase64Binding-0.2.html-->>
> > > > >     <!-- ================================================= -->
> > > > >     <!--<transportSender name="mailto"
> > > > > class="org.apache.axis2.transport.mail.MailTransportSender ">
> > > > >         <parameter name="mail.smtp.host">localhost</parameter>
> > > > >     </transportSender>-->
> > > > >
> > > > >
> > > > >
> > > > > Geiglein, Gary wrote:
> > > > > > The introduction says that you support SMTP but I don't see
> > anything
> > > > > in
> > > > > > the documentation, examples, or tests to give a clue how to
set
> > this
> > > > > up.
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> >
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail:
synapse-user-help@ws.apache.org
> > > > >
> > > > >
> > > > >
> >
---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail:
synapse-user-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: synapse-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Paul Fremantle
> > > Co-Founder and VP of Technical Sales, WSO2
> > > OASIS WS-RX TC Co-chair
> > >
> > > blog: http://pzf.fremantle.org
> > > paul@wso2.com
> > >
> > > "Oxygenating the Web Service Platform", www.wso2.com
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: synapse-user-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Ruwan Linton
> > http://www.wso2.org - "Oxygenating the Web Services Platform"
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-user-help@ws.apache.org
> >
> >
>
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"
>



-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org