IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

documentToXMLString

  • 1.  documentToXMLString

    Posted Wed January 03, 2007 05:46 PM

    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


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: documentToXMLString

    Posted Wed January 03, 2007 06:48 PM

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

    Tim


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: documentToXMLString

    Posted Wed January 03, 2007 07:58 PM

    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


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 4.  RE: documentToXMLString

    Posted Wed January 03, 2007 08:01 PM

    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.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: documentToXMLString

    Posted Wed January 03, 2007 08:04 PM

    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


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: documentToXMLString

    Posted Wed January 03, 2007 08:40 PM

    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.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 7.  RE: documentToXMLString

    Posted Wed January 03, 2007 09:36 PM

    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


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 8.  RE: documentToXMLString

    Posted Wed January 03, 2007 10:46 PM

    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


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 9.  RE: documentToXMLString

    Posted Wed January 03, 2007 11:31 PM

    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


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods