Skip to Content

adding namespaces in receiver strcture

Hi All,

i need to add one more namespace in the output payload because in the below payload i have to populate xml tags names as <gsk:janardhan> 1234</gsk:janardhan>. i am able to populate but when i am trying open with internet explorer i am getting error like Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

i know this issue because of the gsk is not bounded. so how i can add one more namespace int the same payload

http://apse.com"> 1234 1234

Regards,

Janardhan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 04, 2017 at 08:23 AM

    Janardhan,

    Use the below UDF :

    Pass two parameters gsk and http://apse.com then map the output of the UDF to target root node.

    StructureNode node = ((StructureNode) container.getParameter("STRUCTURE_NODE"));
    node.setNSDeclarations(" xmlns:" + prefix + "=" + nmspace); 
    node.setQName(prefix + ":Target"); return""; 
    Add comment
    10|10000 characters needed characters exceeded