Skip to Content
avatar image
Former Member

append payload showing "Multiple clones of root node is not allowed"

image.pngHi Experts,

We have scenario from JMS to File receiver(with append mode we have appended the messages into file and placed in AL11 path ) now we are using the one more scenario (file to proxy)for picking those appended files from al11 , the files are picking from al11 but the payload have like below.

The payload have multiple root nodes for this we are using java mapping for removing those root nodes.

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


Multiple colons are not allowed in a name. Error processing resource

Could you please provide suggestions.

image.png (13.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Sep 26, 2017 at 02:51 PM

    Hi Vijaya!

    I guess that you append XML structures to one file at the first step?

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 30, 2017 at 10:49 AM

    Hi Vijaya!

    Since well-formed XML should have one root node, I see two possible decisions from the first sight:

    1.Use FCC at first step and save your XMLs as flat data and at the second step convert that cummulative flat file back to XML format.

    2.Use java mapping not to remove root nodes but to add one common root node.

    For example:

    <root><aaa><bbb></bbb></aaa><aaa><bbb></bbb></aaa></root>

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Vijaya!

      I don't know your target proxy structure. But I guess you always can use multimapping to split your source messages under root tag into separate messages and send it to proxy.

      Regards, Evgeniy.

  • Oct 30, 2017 at 12:39 PM

    Hi Vijaya!

    As I have already told, wrap your message with common root tag using java mapping.

    public void executeMapping(InputStream is, OutputStream os) throws StreamTransformationException {
    try {
    byte input[] = new byte[is.available()];
    is.read(input);
    
    String inxml = new String(input, "UTF-8");
    String outxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
    "<ns0:MessageSet xmlns:ns0=\"http://tempuri.org\">" +
    inxml.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "") +
    "</ns0:MessageSet>";
    is.close();
    os.write(outxml.getBytes("UTF-8"));
    }
    catch (Exception e) {
    throw new StreamTransformationException(e.getMessage());
    }
    }

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 30, 2017 at 08:20 AM

    Hi Evgeniy,

    Sorry for the late reply.

    Yes, in the first scenario(JMS->File) i am appended the xmls into file...In the 2nd scenario (file ->proxy)now that file is saying "is not well formed xml" in PO.

    Best Regars,

    Vijaya

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 30, 2017 at 11:10 AM

    Hi Raghuraman,

    error.pngmaindocument1.txt

    PFA payload and Error.Ho e to over this error, is there any posibilty to over come with xslt mapping or Java maping.

    We have already using java mapping for removing multiple root nodes but payload itself is not come to PO.

    Thanks in advance.

    Best Regards,

    Vijaya

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Evgeniy,

      Sorry for the late reply.

      Thank you for your inputs.

      The message getting failing while executing the mapping step, so how it will execute java mapping.

      I am confusing here,could you please explain elaborately.

      Thanks in advance.

      Regards,

      Vijaya

  • avatar image
    Former Member
    Nov 09, 2017 at 06:14 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 11, 2017 at 11:16 AM

    Hi Experts, could you please provide any solutions for this.

    Regards,

    Vijaya

    Add comment
    10|10000 characters needed characters exceeded