Receiving emails through the protocol in the Integration Server

I’m using WM4.6 and configuring a POP3 port to receive emails with an XML attachemnt. I’m able to pull off the email and call the service that I wrote to accept the email, however, I’m not able to process the XML doc. The first step in my flow is documentToRecord. After this I call recordToDocument which kicks out the following error “Service record argument in RecordToDocument is null”. The funny thing is if I save the pipeline to file right away and then restore the pipeline and step through the flow it works just fine. I have the complete XML document and I’m able to process it. My questions are 1) should I not be using the documentToRecord process to receive the email? or 2) should I not be using the recordToDocument?

Any help on this matter would be greatly appreciated.
Thanks,
Dave

Before passing to recordToDocument service,pls make sure in the pipe of documentToRecord output has the IData Record structure,if not that might be the reason you are getting null exception ,also check whether the record is wellformated and having data and matches with your record structure or schema before mapping to recordToDocument.

I believe option 1 should work fine.

Try to debug by invoking entry point as savepipeline and restorepipeline services and disable all the logic and check the pipe if your email receiving service has Xml string or bytes or stream.Hope you are sure on this.

HTH.

I am getting the IData record as part of the pipeline as well as the XML document. What can I do to check the validity of the xml before calling the recordToDocument service? Attached is my pipeline saved right after the documentToRecord service is called.
thx.

pipeline.txt
pipeout.txt (2.6 k)

It might not be a proper valid document.For validating of xml document invoke pub.schema:validate (set your record name to ConfirmsTo Param)which will validate against record structure or schema.

Check for errors…