Emailing Document List

Hi,
Nothing happen, same result.

-LOOP OVER ‘/MyRec/ShipDetail/Item’
------MAP (mapped Item document to DetailInfo Document)
------DocumentToXMLString (Mapped ItemDetail Document to document
and Pipelineout is xmldata)

Thanks

one error I want to mention here. When I directly map the xmldata string to the body of pub.client:smtp, its says:

java.lang.ClassCastException: java.lang.Object.

The error occurs in the smtp service.

Thanks

You didn’t mention that you were looping and trying to invoke documentToXMLString service. If you do this inside of a loop, then you are acting on a single array indexed item and therefore, you will only get a single iteration of the item as xmldata. Since this was done in a loop, you ended up with the last item in the array as the contents of xmldata.

Do as RMG specifies and wait until the loop is finished to invoke the document to xml string flow service. The xmldata output will resemble an xml document.

If you set addHeader to true, then it will add the xml declaration at the top of the output. You can also specify the document type in documentTypeName field and it will output the correct format for the document you are building in xml.

Ray

here one thing. How can I use documentToXMLString just outside when loop finishes. It has a record list in the pipelineIn which should be mapped to document(a record, not record list). There is a cast error now.

I took the steps as RMG suggested. I have document to XML string outside the loop. Now, I am still getting the single iteration in xmldata which is the first item detail.

Plz, Let me know how to resolve it now.

Thanks

I believe you are not properly appending the data to the final documentiist,Please step thru the loop and investigate what is causing the problem in your logic of building the recordlist.

HTH.

I am willing to help you. Check your yahoo web email for instructions.

Ray