Return-Path: Delivered-To: apmail-synapse-dev-archive@www.apache.org Received: (qmail 81116 invoked from network); 22 May 2009 09:44:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 May 2009 09:44:30 -0000 Received: (qmail 42030 invoked by uid 500); 22 May 2009 09:44:43 -0000 Delivered-To: apmail-synapse-dev-archive@synapse.apache.org Received: (qmail 41946 invoked by uid 500); 22 May 2009 09:44:43 -0000 Mailing-List: contact dev-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list dev@synapse.apache.org Received: (qmail 41938 invoked by uid 99); 22 May 2009 09:44:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 09:44:43 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.221.136] (HELO mail-qy0-f136.google.com) (209.85.221.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 May 2009 09:44:32 +0000 Received: by qyk42 with SMTP id 42so2552624qyk.7 for ; Fri, 22 May 2009 02:44:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.82.15 with SMTP id z15mr1363803qck.32.1242985450953; Fri, 22 May 2009 02:44:10 -0700 (PDT) In-Reply-To: References: <881f359f0905032152o22d2e5a5p93606d8717aadaa7@mail.gmail.com> <881f359f0905032311j2568659bqef83cda8441c52d2@mail.gmail.com> <881f359f0905032345q63ea54c9mff9d1ff9716d48db@mail.gmail.com> <881f359f0905040053m77fe053dq86013124e994abaa@mail.gmail.com> Date: Fri, 22 May 2009 15:14:10 +0530 Message-ID: <881f359f0905220244s7eae95f6l3bcb565cf4ea3a7f@mail.gmail.com> Subject: Re: Error when retrieving mail from GMail From: Saliya Ekanayake To: dev@synapse.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Andreas, I tried the suggested approach, yet was unsuccessful. In both plain text and attached message case I am getting the exception, ERROR AxisEngine The endpoint reference (EPR) for the Operation not found is and the WSA Action = null org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is and the WSA Action = null at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:89) at org.apache.axis2.engine.Phase.invoke(Phase.java:334) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:256) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:165) at org.apache.axis2.transport.base.AbstractTransportListener.handleIncomingMessage(AbstractTransportListener.java:325) at org.apache.axis2.transport.mail.MailTransportListener.processMail(MailTransportListener.java:534) at org.apache.axis2.transport.mail.MailTransportListener.access$000(MailTransportListener.java:71) at org.apache.axis2.transport.mail.MailTransportListener$MailProcessor.run(MailTransportListener.java:350) at org.apache.axis2.transport.mail.MailTransportListener.processMail(MailTransportListener.java:314) at org.apache.axis2.transport.mail.MailTransportListener.checkMail(MailTransportListener.java:218) at org.apache.axis2.transport.mail.MailTransportListener.poll(MailTransportListener.java:99) at org.apache.axis2.transport.mail.MailTransportListener.poll(MailTransportListener.java:71) at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:99) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58) 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) I debugged into this and found that in the plain text case the PlainTextBuilder builds an OMSourcedElement. The body based dispatcher of Axis2 is thus unable to find the operation for the EPR. Any help on this is highly appreciated. Thanks Saliya On Mon, May 4, 2009 at 1:46 PM, Andreas Veithen wrote: > Saliya, > > One problem is that sample 256 is no longer compatible with the way > the mail transport works in the snapshot. More precisely, in previous > versions, the mail transport tried to parse the message as XML and > fell back to plain text in case of error, completely ignoring the > content type of the message. That is why the sample indicates to "send > a plain/text email". This behavior had several issues, in particular > the mail transport didn't use the message builder abstraction. > > Recent versions of the mail transport use the content type of the > message to select a message builder and then delegate parsing of the > message to the builder (in the same way as other transports). I see > two ways one could adapt sample 256: > > - Instead of sending the XML inside the body, send it as attachment. > This is supported by the mail transport, but it is a bit tricky > because the content type of the attachment will depend on the email > client or operation system that is used. > > - Play with the transport.mail.ContentType property to override the > content type of the message. > > Andreas > > On Mon, May 4, 2009 at 09:53, Saliya Ekanayake wrote: >> I am using the snapshot. >> >> thanks, >> Saliya >> >> On Mon, May 4, 2009 at 1:13 PM, Andreas Veithen >> wrote: >>> Saliya, >>> >>> Can you please tell us the version of Synapse you are using? >>> >>> Andreas >>> >>> On Mon, May 4, 2009 at 08:45, Saliya Ekanayake wrote: >>>> Hi, >>>> >>>> I was able to get passed this by sending a plain text message from >>>> GMail. It seems that when HTML formatted message is present, Synapse >>>> cannot properly build the SOAP envelope. >>>> >>>> At the same time I found that the error with configuration occurs when >>>> you send a mail from the same account as the recipient (the >>>> configuration simply checks for the "from" address and send the >>>> reply). So in fact I think it's not an error. >>>> >>>> Thanks, >>>> Saliya >>>> >>>> On Mon, May 4, 2009 at 11:41 AM, Saliya Ekanayake wrote: >>>>> Regarding issue 2, I think the reason is having a wrong input stream in >>>>> creating the XMLStreamReader. The input stream taken from the message >>>>> contains all the headers as well (I did a debug and found the presence of >>>>> headers). Thus, when parsing the stream to create a SOAP message I hit the >>>>> error "Unexpected character" (Woodstock 3.2.4: BasicStreamReader: line >>>>> 2047). >>>>> >>>>> Thanks, >>>>> Saliya >>>>> >>>>> >>>>> >>>>> On Mon, May 4, 2009 at 10:22 AM, Saliya Ekanayake wrote: >>>>>> >>>>>> Hi all, >>>>>> >>>>>> I have encountered two issues with sample 256 - using mail transport with >>>>>> Synapse. >>>>>> >>>>>> 1. The configuration is wrong as it simply sends the response back to the >>>>>> same mail address. Then, Synapse will again send that response mail back to >>>>>> the service thinking it is a request. >>>>>> >>>>>> 2. When retrieving mail from GMail I am getting a null pointer exception >>>>>> due to null charset while parsing. >>>>>> >>>>>> The first issue can be corrected by modifying the configuration. The >>>>>> second one, however, was bit unclear to me even after a debug. Could someone >>>>>> please help on this. To reproduce this simply run sample 256 as given. >>>>>> >>>>>> Thanks, >>>>>> Saliya >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Saliya Ekanayake >>>>> Software Engineer, WSO2 Inc. (http://www.wso2.com) >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Saliya Ekanayake >>>> Software Engineer, WSO2 Inc. (http://www.wso2.com) >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org >>>> For additional commands, e-mail: dev-help@synapse.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org >>> For additional commands, e-mail: dev-help@synapse.apache.org >>> >>> >> >> >> >> -- >> Saliya Ekanayake >> Software Engineer, WSO2 Inc. (http://www.wso2.com) >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org >> For additional commands, e-mail: dev-help@synapse.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org > For additional commands, e-mail: dev-help@synapse.apache.org > > -- Saliya Ekanayake Software Engineer, WSO2 Inc. (http://www.wso2.com) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org For additional commands, e-mail: dev-help@synapse.apache.org