You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by FuinhaAzul <fu...@gmail.com> on 2009/08/04 04:07:32 UTC

Almost making (Mail to file)

Hey guys!

I´m still tring to receive the message and write de attachment to a file
(the atachment is a xml), but: "The content is not allowed in prolog".

I tried DefaultFIleMarshaler and BinaryFileMarsaler, but the error is the
same. 

The email is succefuly received, but when I forward to file endpoint, then
the exception is throw.

Any Ideas? (I think this is the last question to make this sample work.)
http://www.nabble.com/file/p24801223/nl-mailtofile-sa.zip
nl-mailtofile-sa.zip 

 
-- 
View this message in context: http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24801223.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Almost making (Mail to file)

Posted by FuinhaAzul <fu...@gmail.com>.
Sure, here is the stack trace:


From: =?iso-8859-1?Q?Maycon_F=E1bio_de_Oliveira?= 
To: "Maycon Oliveira" <te...@teste.com.br>
Subject:
Date: Tue, 4 Aug 2009 09:43:24 -0300
MIME-Version: 1.0
Content-Type: multipart/mixed;
        boundary="----=_NextPart_000_0005_01CA14E8.028C0760"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-MailScanner-ID: 52D7C4D0012.36D35
Return-Path: teste@teste.com.br
X-OriginalArrivalTime: 04 Aug 2009 12:44:06.0287 (UTC)
FILETIME=[40FBB9F0:01CA15
01]

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01CA14E8.028C0760
Content-Type: multipart/alternative;
        boundary="----=_NextPart_001_0006_01CA14E8.028C0760"


------=_NextPart_001_0006_01CA14E8.028C0760
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


--=20
Esta mensagem foi verificada pelo sistema de antiv=EDrus e acredita-se esta=
r livre de perigo.


------=_NextPart_001_0006_01CA14E8.028C0760
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.5803" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp;</DIV></BODY>--
Esta mensagem foi verificada pelo sistema de antiv=EDrus e acredita-se esta=
r livre de perigo.
</HTML>

------=_NextPart_001_0006_01CA14E8.028C0760--

------=_NextPart_000_0005_01CA14E8.028C0760
Content-Type: text/xml;
        name="test-file.xml"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
        filename="test-file.xml"
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!--

    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<sample id=3D"555-3482">
        <data>
           This is sample file that can be dropped into the inbox directory.
        </data>
</sample>

------=_NextPart_000_0005_01CA14E8.028C0760--

.
DEBUG - DefaultMailMarshaler           - MultiPart count: 2
DEBUG - DefaultMailMarshaler           - MultiPart 0:
javax.mail.internet.MimeBo
dyPart@13fb15
DEBUG - DefaultMailMarshaler           - Disposition: null
DEBUG - DefaultMailMarshaler           - MultiPart 1:
javax.mail.internet.MimeBo
dyPart@1df2ecc
DEBUG - DefaultMailMarshaler           - Disposition: attachment
DEBUG - MailComponent                  - Created correlation id:
ID:192.9.200.14
6-122e56ec845-14:0
DEBUG - DeliveryChannelImpl            - SendSync
ID:192.9.200.146-122e56ec845-1
4:0 in DeliveryChannel{servicemix-mail}
DEBUG - SecuredBroker                  - send exchange with secure broker
DEBUG - SecuredBroker                  - service name
:{http://www.nl.com.br/jbi
}fileSender
DEBUG - SecuredBroker                  - operation name :null
DEBUG - SedaFlow                       - Called Flow send
DEBUG - DeliveryChannelImpl            - Waiting for exchange
ID:192.9.200.146-1
22e56ec845-14:0 (5003f6) to be answered in DeliveryChannel{servicemix-mail}
from
 sendSync
[Fatal Error] :2:1: Content is not allowed in prolog.
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda
.SedaQueue$1@1341b06 dequeued exchange: InOnly[
  id: ID:192.9.200.146-122e56ec845-14:0
  status: Active
  role: provider
  service: {http://www.nl.com.br/jbi}fileSender
  endpoint: endpoint
  in: Unable to display: org.xml.sax.SAXParseException: Content is not
allowed i
n prolog.
]
DEBUG - FileComponent                  - Received exchange: status: Active,
role
: provider
DEBUG - FileComponent                  - Retrieved correlation id:
ID:192.9.200.
146-122e56ec845-14:0
DEBUG - FileComponent                  - Writing to file:
C:\11111\servicemix-86
89137677518155586.xml
[Fatal Error] :2:1: Content is not allowed in prolog.
ERROR - FileComponent                  - An error occured while writing file
C:\
11111\servicemix-8689137677518155586.xml, deleting the invalid file
[Fatal Error] :2:1: Content is not allowed in prolog.
ERROR - FileComponent                  - Error processing exchange InOnly[
  id: ID:192.9.200.146-122e56ec845-14:0
  status: Active
  role: provider
  service: {http://www.nl.com.br/jbi}fileSender
  endpoint: endpoint
  in: Unable to display: org.xml.sax.SAXParseException: Content is not
allowed i
n prolog.
]
javax.jbi.messaging.MessagingException:
javax.xml.transform.TransformerException
: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessa
geContent(DefaultFileMarshaler.java:153)
        at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessa
ge(DefaultFileMarshaler.java:82)
        at
org.apache.servicemix.file.FileSenderEndpoint.processInOnly(FileSende
rEndpoint.java:114)
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
derEndpoint.java:102)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:627)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:581)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(Asy
ncBaseLifeCycle.java:535)
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(S
yncLifeCycleWrapper.java:60)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:623)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:168)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.transform.TransformerException:
org.xml.sax.SAXParseExcepti
on: Content is not allowed in prolog.
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:501)
        at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTrans
former.java:125)
        at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessa
geContent(DefaultFileMarshaler.java:151)
        ... 14 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:484)
        ... 16 more
DEBUG - DeliveryChannelImpl            - Send
ID:192.9.200.146-122e56ec845-14:0
in DeliveryChannel{servicemix-file}
DEBUG - SecuredBroker                  - send exchange with secure broker
DEBUG - SedaFlow                       - Called Flow send
[Fatal Error] :2:1: Content is not allowed in prolog.
DEBUG - SedaQueue                      -
org.apache.servicemix.jbi.nmr.flow.seda
.SedaQueue$1@c1c2f1 dequeued exchange: InOnly[
  id: ID:192.9.200.146-122e56ec845-14:0
  status: Error
  role: consumer
  service: {http://www.nl.com.br/jbi}fileSender
  endpoint: endpoint
  in: Unable to display: org.xml.sax.SAXParseException: Content is not
allowed i
n prolog.
  error: javax.jbi.messaging.MessagingException:
javax.xml.transform.Transformer
Exception: org.xml.sax.SAXParseException: Content is not allowed in prolog.
]
DEBUG - DeliveryChannelImpl            - Notifying exchange
ID:192.9.200.146-122
e56ec845-14:0(5003f6) in DeliveryChannel{servicemix-mail} from
processInboundSyn
chronousExchange
DEBUG - DeliveryChannelImpl            - Notified:
ID:192.9.200.146-122e56ec845-
14:0(5003f6) in DeliveryChannel{servicemix-mail} from sendSync
C: RSET
S: +OK
C: QUIT
S: +OK Microsoft Exchange Server 2003 POP3 server version 6.5.7638.1 signing
off
.
ERROR - MailComponent                  - Caught exception while polling:
javax.j
bi.messaging.MessagingException: javax.xml.transform.TransformerException:
org.x
ml.sax.SAXParseException: Content is not allowed in prolog.
javax.jbi.messaging.MessagingException:
javax.xml.transform.TransformerException
: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessa
geContent(DefaultFileMarshaler.java:153)
        at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessa
ge(DefaultFileMarshaler.java:82)
        at
org.apache.servicemix.file.FileSenderEndpoint.processInOnly(FileSende
rEndpoint.java:114)
        at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
derEndpoint.java:102)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:627)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:581)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(Asy
ncBaseLifeCycle.java:535)
        at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(S
yncLifeCycleWrapper.java:60)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:623)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:172)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:168)
        at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.transform.TransformerException:
org.xml.sax.SAXParseExcepti
on: Content is not allowed in prolog.
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:501)
        at
org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTrans
former.java:125)
        at
org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessa
geContent(DefaultFileMarshaler.java:151)
        ... 14 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:484)
        ... 16 more
DEBUG - AMQPersistenceAdapter          - dataFilesInProgress.values: (0) []
DEBUG - AMQPersistenceAdapter          - lastDataFile: 1
DEBUG - AsyncDataManager               - lastFileId=0, purgeList: (0) []
DEBUG - InactivityMonitor              - 10000 ms elapsed since last write
check



Any sugestion?







Gert Vanthienen wrote:
> 
> L.S.,
> 
> I think the DefaultMailMarshaler might be trying to add the message
> content to the JBI MessageExchange as well.  Could you try enabling
> DEBUG logging and sending us the output from the logging, so we can
> find out where/when the exception occurs?  Also, could you paste us
> the full stack trace?  If my guess is correct, adding some XML content
> to the message (provided it is a text/plain message) should be a
> workaround, but I'll give things a go here as well to see if I can
> reproduce this locally.
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 
> 
> 
> 2009/8/4 FuinhaAzul <fu...@gmail.com>:
>>
>> Hey guys!
>>
>> I´m still tring to receive the message and write de attachment to a file
>> (the atachment is a xml), but: "The content is not allowed in prolog".
>>
>> I tried DefaultFIleMarshaler and BinaryFileMarsaler, but the error is the
>> same.
>>
>> The email is succefuly received, but when I forward to file endpoint,
>> then
>> the exception is throw.
>>
>> Any Ideas? (I think this is the last question to make this sample work.)
>> http://www.nabble.com/file/p24801223/nl-mailtofile-sa.zip
>> nl-mailtofile-sa.zip
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24801223.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
> 

-- 
View this message in context: http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24807895.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Almost making (Mail to file)

Posted by MilesCanada <Mi...@cas-satj.gc.ca>.
Hello Zaca, 

Is this workaround on top of the patch codes? in which version of the
DefaultMailMarshaler? 

Regards,

Miles



Zaca wrote:
> 
> Y made a workaround putting a XML in the mail body.
> It works fine.
> Then I got another error "NullPointerException"  in line 156 of
> DefaultMailMarshaler. This is because Multipart messages are always
> treated
> as Attachments.
> There is a bug in DefaultMailMarshaler where DataHandler referenced in
> line
> 157 I think is wrong.
> I made this patch. Plase feel free to do any comment.
> Regards
> 
> 
> 
> On Mon, Aug 10, 2009 at 4:38 PM, FuinhaAzul <fu...@gmail.com> wrote:
> 
>>
>> Gert, did you tried some example of receive mail message?
>>
>> If I read a file, then all works fine, but with mail component, that
>> message
>> "content not alowed in prolog" still shows.
>>
>> Any sugestion?
>>
>>
>>
>>
>>
>>
>> Gert Vanthienen wrote:
>> >
>> > L.S.,
>> >
>> > I think the DefaultMailMarshaler might be trying to add the message
>> > content to the JBI MessageExchange as well.  Could you try enabling
>> > DEBUG logging and sending us the output from the logging, so we can
>> > find out where/when the exception occurs?  Also, could you paste us
>> > the full stack trace?  If my guess is correct, adding some XML content
>> > to the message (provided it is a text/plain message) should be a
>> > workaround, but I'll give things a go here as well to see if I can
>> > reproduce this locally.
>> >
>> > Regards,
>> >
>> > Gert Vanthienen
>> > ------------------------
>> > Open Source SOA: http://fusesource.com
>> > Blog: http://gertvanthienen.blogspot.com/
>> >
>> >
>> >
>> > 2009/8/4 FuinhaAzul <fu...@gmail.com>:
>> >>
>> >> Hey guys!
>> >>
>> >> I´m still tring to receive the message and write de attachment to a
>> file
>> >> (the atachment is a xml), but: "The content is not allowed in prolog".
>> >>
>> >> I tried DefaultFIleMarshaler and BinaryFileMarsaler, but the error is
>> the
>> >> same.
>> >>
>> >> The email is succefuly received, but when I forward to file endpoint,
>> >> then
>> >> the exception is throw.
>> >>
>> >> Any Ideas? (I think this is the last question to make this sample
>> work.)
>> >> http://www.nabble.com/file/p24801223/nl-mailtofile-sa.zip
>> >> nl-mailtofile-sa.zip
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24801223.html
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > -----
>> > ---
>> > Gert Vanthienen
>> > http://gertvanthienen.blogspot.com
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24905919.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> Index:
> bindings/servicemix-mail/src/main/java/org/apache/servicemix/mail/marshaler/DefaultMailMarshaler.java
> ===================================================================
> ---
> bindings/servicemix-mail/src/main/java/org/apache/servicemix/mail/marshaler/DefaultMailMarshaler.java
> (revision 798962)
> +++
> bindings/servicemix-mail/src/main/java/org/apache/servicemix/mail/marshaler/DefaultMailMarshaler.java
> (working copy)
> @@ -151,9 +151,10 @@
>                      // Create another body part
>                      messageBodyPart = new MimeBodyPart();
>                      // Set the data handler to the attachment
> -                    messageBodyPart.setDataHandler(new DataHandler(new
> FileDataSource(f)));
> +                    DataHandler fileDataHandler = new DataHandler(new
> FileDataSource(f));
> +                    messageBodyPart.setDataHandler(fileDataHandler);
>                      // Set the filename
> -                   
> messageBodyPart.setFileName(dh.getDataSource().getName());
> +                   
> messageBodyPart.setFileName(fileDataHandler.getDataSource().getName());
>                      // Set Disposition
>                      messageBodyPart.setDisposition(Part.ATTACHMENT);
>                      // Add part to multipart
> 
> 

-- 
View this message in context: http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p25244049.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Almost making (Mail to file)

Posted by Zacarias <zm...@gmail.com>.
Y made a workaround putting a XML in the mail body.
It works fine.
Then I got another error "NullPointerException"  in line 156 of
DefaultMailMarshaler. This is because Multipart messages are always treated
as Attachments.
There is a bug in DefaultMailMarshaler where DataHandler referenced in line
157 I think is wrong.
I made this patch. Plase feel free to do any comment.
Regards



On Mon, Aug 10, 2009 at 4:38 PM, FuinhaAzul <fu...@gmail.com> wrote:

>
> Gert, did you tried some example of receive mail message?
>
> If I read a file, then all works fine, but with mail component, that
> message
> "content not alowed in prolog" still shows.
>
> Any sugestion?
>
>
>
>
>
>
> Gert Vanthienen wrote:
> >
> > L.S.,
> >
> > I think the DefaultMailMarshaler might be trying to add the message
> > content to the JBI MessageExchange as well.  Could you try enabling
> > DEBUG logging and sending us the output from the logging, so we can
> > find out where/when the exception occurs?  Also, could you paste us
> > the full stack trace?  If my guess is correct, adding some XML content
> > to the message (provided it is a text/plain message) should be a
> > workaround, but I'll give things a go here as well to see if I can
> > reproduce this locally.
> >
> > Regards,
> >
> > Gert Vanthienen
> > ------------------------
> > Open Source SOA: http://fusesource.com
> > Blog: http://gertvanthienen.blogspot.com/
> >
> >
> >
> > 2009/8/4 FuinhaAzul <fu...@gmail.com>:
> >>
> >> Hey guys!
> >>
> >> I�m still tring to receive the message and write de attachment to a file
> >> (the atachment is a xml), but: "The content is not allowed in prolog".
> >>
> >> I tried DefaultFIleMarshaler and BinaryFileMarsaler, but the error is
> the
> >> same.
> >>
> >> The email is succefuly received, but when I forward to file endpoint,
> >> then
> >> the exception is throw.
> >>
> >> Any Ideas? (I think this is the last question to make this sample work.)
> >> http://www.nabble.com/file/p24801223/nl-mailtofile-sa.zip
> >> nl-mailtofile-sa.zip
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24801223.html
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > -----
> > ---
> > Gert Vanthienen
> > http://gertvanthienen.blogspot.com
> >
>
> --
> View this message in context:
> http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24905919.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: Almost making (Mail to file)

Posted by Lars Heinemann <lh...@apache.org>.
If you provide a ready to build project to me, I will have a look what's wrong.

Regards
Lars


2009/9/1 FuinhaAzul <fu...@gmail.com>:
>
> Not yeat, sorry. The task are still open
>
>
>
>
> MilesCanada wrote:
>>
>> Hello FuinhaAzul, I had tried to do the similar and encountered the exact
>> same error. did you manage to get your example working?
>>
>> Regards,
>>
>> Miles
>>
>>
>> FuinhaAzul wrote:
>>>
>>> Gert, did you tried some example of receive mail message?
>>>
>>> If I read a file, then all works fine, but with mail component, that
>>> message "content not alowed in prolog" still shows.
>>>
>>> Any sugestion?
>>>
>>>
>>>
>>>
>>>
>>>
>>> Gert Vanthienen wrote:
>>>>
>>>> L.S.,
>>>>
>>>> I think the DefaultMailMarshaler might be trying to add the message
>>>> content to the JBI MessageExchange as well.  Could you try enabling
>>>> DEBUG logging and sending us the output from the logging, so we can
>>>> find out where/when the exception occurs?  Also, could you paste us
>>>> the full stack trace?  If my guess is correct, adding some XML content
>>>> to the message (provided it is a text/plain message) should be a
>>>> workaround, but I'll give things a go here as well to see if I can
>>>> reproduce this locally.
>>>>
>>>> Regards,
>>>>
>>>> Gert Vanthienen
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>> Blog: http://gertvanthienen.blogspot.com/
>>>>
>>>>
>>>>
>>>> 2009/8/4 FuinhaAzul <fu...@gmail.com>:
>>>>>
>>>>> Hey guys!
>>>>>
>>>>> I´m still tring to receive the message and write de attachment to a
>>>>> file
>>>>> (the atachment is a xml), but: "The content is not allowed in prolog".
>>>>>
>>>>> I tried DefaultFIleMarshaler and BinaryFileMarsaler, but the error is
>>>>> the
>>>>> same.
>>>>>
>>>>> The email is succefuly received, but when I forward to file endpoint,
>>>>> then
>>>>> the exception is throw.
>>>>>
>>>>> Any Ideas? (I think this is the last question to make this sample
>>>>> work.)
>>>>> http://www.nabble.com/file/p24801223/nl-mailtofile-sa.zip
>>>>> nl-mailtofile-sa.zip
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24801223.html
>>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>> -----
>>>> ---
>>>> Gert Vanthienen
>>>> http://gertvanthienen.blogspot.com
>>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p25244288.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
http://lhein.blogspot.com

Re: Almost making (Mail to file)

Posted by FuinhaAzul <fu...@gmail.com>.
Not yeat, sorry. The task are still open




MilesCanada wrote:
> 
> Hello FuinhaAzul, I had tried to do the similar and encountered the exact
> same error. did you manage to get your example working?
> 
> Regards,
> 
> Miles
> 
> 
> FuinhaAzul wrote:
>> 
>> Gert, did you tried some example of receive mail message?
>> 
>> If I read a file, then all works fine, but with mail component, that
>> message "content not alowed in prolog" still shows.
>> 
>> Any sugestion?
>> 
>> 
>>  
>> 
>> 
>> 
>> Gert Vanthienen wrote:
>>> 
>>> L.S.,
>>> 
>>> I think the DefaultMailMarshaler might be trying to add the message
>>> content to the JBI MessageExchange as well.  Could you try enabling
>>> DEBUG logging and sending us the output from the logging, so we can
>>> find out where/when the exception occurs?  Also, could you paste us
>>> the full stack trace?  If my guess is correct, adding some XML content
>>> to the message (provided it is a text/plain message) should be a
>>> workaround, but I'll give things a go here as well to see if I can
>>> reproduce this locally.
>>> 
>>> Regards,
>>> 
>>> Gert Vanthienen
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>> Blog: http://gertvanthienen.blogspot.com/
>>> 
>>> 
>>> 
>>> 2009/8/4 FuinhaAzul <fu...@gmail.com>:
>>>>
>>>> Hey guys!
>>>>
>>>> I´m still tring to receive the message and write de attachment to a
>>>> file
>>>> (the atachment is a xml), but: "The content is not allowed in prolog".
>>>>
>>>> I tried DefaultFIleMarshaler and BinaryFileMarsaler, but the error is
>>>> the
>>>> same.
>>>>
>>>> The email is succefuly received, but when I forward to file endpoint,
>>>> then
>>>> the exception is throw.
>>>>
>>>> Any Ideas? (I think this is the last question to make this sample
>>>> work.)
>>>> http://www.nabble.com/file/p24801223/nl-mailtofile-sa.zip
>>>> nl-mailtofile-sa.zip
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24801223.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>> 
>>> 
>>> -----
>>> ---
>>> Gert Vanthienen
>>> http://gertvanthienen.blogspot.com
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p25244288.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Almost making (Mail to file)

Posted by MilesCanada <Mi...@cas-satj.gc.ca>.
Hello FuinhaAzul, I had tried to do the similar and encountered the exact
same error. did you manage to get your example working?

Regards,

Miles


FuinhaAzul wrote:
> 
> Gert, did you tried some example of receive mail message?
> 
> If I read a file, then all works fine, but with mail component, that
> message "content not alowed in prolog" still shows.
> 
> Any sugestion?
> 
> 
>  
> 
> 
> 
> Gert Vanthienen wrote:
>> 
>> L.S.,
>> 
>> I think the DefaultMailMarshaler might be trying to add the message
>> content to the JBI MessageExchange as well.  Could you try enabling
>> DEBUG logging and sending us the output from the logging, so we can
>> find out where/when the exception occurs?  Also, could you paste us
>> the full stack trace?  If my guess is correct, adding some XML content
>> to the message (provided it is a text/plain message) should be a
>> workaround, but I'll give things a go here as well to see if I can
>> reproduce this locally.
>> 
>> Regards,
>> 
>> Gert Vanthienen
>> ------------------------
>> Open Source SOA: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>> 
>> 
>> 
>> 2009/8/4 FuinhaAzul <fu...@gmail.com>:
>>>
>>> Hey guys!
>>>
>>> I´m still tring to receive the message and write de attachment to a file
>>> (the atachment is a xml), but: "The content is not allowed in prolog".
>>>
>>> I tried DefaultFIleMarshaler and BinaryFileMarsaler, but the error is
>>> the
>>> same.
>>>
>>> The email is succefuly received, but when I forward to file endpoint,
>>> then
>>> the exception is throw.
>>>
>>> Any Ideas? (I think this is the last question to make this sample work.)
>>> http://www.nabble.com/file/p24801223/nl-mailtofile-sa.zip
>>> nl-mailtofile-sa.zip
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24801223.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> -----
>> ---
>> Gert Vanthienen
>> http://gertvanthienen.blogspot.com
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p25244060.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Almost making (Mail to file)

Posted by FuinhaAzul <fu...@gmail.com>.
Gert, did you tried some example of receive mail message?

If I read a file, then all works fine, but with mail component, that message
"content not alowed in prolog" still shows.

Any sugestion?


 



Gert Vanthienen wrote:
> 
> L.S.,
> 
> I think the DefaultMailMarshaler might be trying to add the message
> content to the JBI MessageExchange as well.  Could you try enabling
> DEBUG logging and sending us the output from the logging, so we can
> find out where/when the exception occurs?  Also, could you paste us
> the full stack trace?  If my guess is correct, adding some XML content
> to the message (provided it is a text/plain message) should be a
> workaround, but I'll give things a go here as well to see if I can
> reproduce this locally.
> 
> Regards,
> 
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
> 
> 
> 
> 2009/8/4 FuinhaAzul <fu...@gmail.com>:
>>
>> Hey guys!
>>
>> I´m still tring to receive the message and write de attachment to a file
>> (the atachment is a xml), but: "The content is not allowed in prolog".
>>
>> I tried DefaultFIleMarshaler and BinaryFileMarsaler, but the error is the
>> same.
>>
>> The email is succefuly received, but when I forward to file endpoint,
>> then
>> the exception is throw.
>>
>> Any Ideas? (I think this is the last question to make this sample work.)
>> http://www.nabble.com/file/p24801223/nl-mailtofile-sa.zip
>> nl-mailtofile-sa.zip
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24801223.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> ---
> Gert Vanthienen
> http://gertvanthienen.blogspot.com
> 

-- 
View this message in context: http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24905919.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Almost making (Mail to file)

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

I think the DefaultMailMarshaler might be trying to add the message
content to the JBI MessageExchange as well.  Could you try enabling
DEBUG logging and sending us the output from the logging, so we can
find out where/when the exception occurs?  Also, could you paste us
the full stack trace?  If my guess is correct, adding some XML content
to the message (provided it is a text/plain message) should be a
workaround, but I'll give things a go here as well to see if I can
reproduce this locally.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/8/4 FuinhaAzul <fu...@gmail.com>:
>
> Hey guys!
>
> I´m still tring to receive the message and write de attachment to a file
> (the atachment is a xml), but: "The content is not allowed in prolog".
>
> I tried DefaultFIleMarshaler and BinaryFileMarsaler, but the error is the
> same.
>
> The email is succefuly received, but when I forward to file endpoint, then
> the exception is throw.
>
> Any Ideas? (I think this is the last question to make this sample work.)
> http://www.nabble.com/file/p24801223/nl-mailtofile-sa.zip
> nl-mailtofile-sa.zip
>
>
> --
> View this message in context: http://www.nabble.com/Almost-making-%28Mail-to-file%29-tp24801223p24801223.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>