documentToXMLString

I have inherited XML… I am attempting to understand what needs to be done vs what has been done. The service I have

  1. Gets the document
  2. Loops over the /bizdoc/CountentParts
  3. Branches on the PartName
    then a sequence of
  4. pub.string:bytesToString
  5. pub.xml:xmlStringToXMLNode
  6. pub.xml:xmlNodeToDocument

this was being used with PIDX:OrderCreate… but I have a different XML document type… XCBL:Order. My file is flattening out after xmlNodeToDocument.

Others have posted simular post discussing documentToXMLString. I would like to do this the PROPER way and have no idea what is correct. Or where to find a guiding light.

Thanks in Advance
CHill

Are you specifying an IS document type in the inputs to xmlNodeToDocument?

Tim

At the moment…
I am using restorePipelineFromFile it is a test file I am getting from a trading partner.

In the future it will come in via AS2 it can be recieved by TN and then the payload if sent to TN for processing. This part is WoRkInG.

CHill

Sorry… Yes I am putting the documentTypeName in. Where the document actually came from I am not real sure. But the format it there and correct. When the data loads if I have 3 line items it only sees the LAST one.

And the line item element shows as a document list in the document type when you edit it in Developer and not just a document?

Tim

It does not show up as a document list… I would Not be able to loop through them. Only the last item of each list is appearing in the result pane.

You’re describing what your sample document looks like in the results pane after processing. But if you locate the document type itself (the one being named in xmlNodeToDocument) in the navigation panel and open it up, how does the line item element look? It should be a list, rather than a single document.

Tim

If you are expecting document to be in formate of specified input document then you have to set makeArrays to “false” in xmlNodeToDocument service. Have you set this??

Cheers,
Ajit

As expected… the perfect questions reveals the perfect answers.

I had two document out there one that is flat and one that had the elements that needed to be in lists. I changed the documentTypeName to the document with the lists and it WORKED!!!

Thanks again