Trouble to receive xml files via email


I am trying to receive xml files from an email attachment.
My email port seems to work fine.

I made a receiving service with a getTransportInfo Step and a SavetoPipeline Step.
I defined an input object named ffdata.
The pipeline has some contents but there is nothing about the attachment file.

The errors I have in the logging console are :
XMLCoder decode invalid data type:
XMLCoder decode invalid data type: com.wm.lang.xml.Document

What can I do ?
I didn’t set anything about the content-type since I am sending the emails with outlook for testing.

Thanks for any help.


MS Outlook handles emails with one attachment a little differently that other email clients. It does not create a MIME Multipart message. This confuses the IS Email Listener. To see if this is happening in your case, try to send the email from a different email client, Outlook Express for example. If this is indeed the problem you are having then you can contact webMethods Technical Services. There are fixes available from them for this problem.


The first step I perform is the getTransportInfo to figure out the contenttype. I then branch on the contenttype to handle the XML. In the email clients I’ve tested (Outlook, Notes, Yahoo mail, etc.) the content has either been “application/octet-stream” (MIME) or “text/xml”. This determines the way you handle the inbound attachment. I’ve spoken with webMethods tech about this this because even though I’m able to process inbound email with XML attachments, I still get the following error in the error.log: Service record argument in RecordToDocument is null.

Not sure why that is but everything works great this way.


I forgot to say that I’m working on webMethods 6.

I also perform the getTransportInfo step as first, then I make a savePipelineToFile but it doesn’t say anything about the input or the file in attachment.

What is your next step to handle the xml ?

Concerning the content-type, do I have to care about the attachment content-type (which is somehow defined by the extension of the file) or the content-type of the email (that I don’t know how to set) ?

Thanks for your helps.


In v4.6 I take the content node and map it into the streamToBytes service and then bytesToString to process the XML. When I do saveToPipeline after the getTransportInfo step I do see the name of the attachment in the “filename” field.

hope that helps

Thanks to all,

I just managed to make it work with the xmlNodeToDocument service.

Best regards.


I also have to receive an email with an xml attachment. But in the same time I have to trigger a process model. Does anybody has any experience with this?

I also work with v6.

Thanks, Claire

After you get the XML from the email as described in the previous messages in this thread, you can submit that XML to Trading Networks. If you set up your process model to trigger off receipt of a TN document, this will trigger the model. Alternatively, you can use the XML to map to a Broker document which you publish. Your model can be set up to trigger off the published document as well.

See the Modeler User’s Guide for a full description of this. The section that talks about Start Steps is a good place to look.

Hi ,

I want to process the flatfiles i receive as an attachment to my email. So i have configured the smtp port and when ever i recieve a mail , a service will invoke ,but how should i get the attachment (flatfiles) as an input to the service which will process them … should i need to go with mime folder services ??

Thanks in advance…