Integration

Get Involved. Join the Conversation.

Topic

    Ewood
    Insert CDATA into XML in a mapping
    Topic posted November 8, 2019 by Ewood Red Ribbon: 250+ Points 
    25 Views, 2 Comments
    Title:
    Insert CDATA into XML in a mapping
    Summary:
    Insert CDATA into XML in a mapping
    Content:

    I have an XML request I am trying to write that requires some static CDATA, e.g.

    <callContext xsi:type="wss:CAdxCallContext">
                <codeLang xsi:type="xsd:string">ENG</codeLang>
                <poolAlias xsi:type="xsd:string">PILOT</poolAlias>
                <poolId xsi:type="xsd:string"></poolId>
                <requestConfig xsi:type="xsd:string"><![CDATA[adxwss.optreturn=JSON&adxwss.pretty=true]]></requestConfig>
             </callContext>

      If I just add the CDATA as a string value for the element, it gets escaped and I get an error from OIC:

    oracle.cloud.connector.api.CloudInvocationException: oracle.xml.parser.v2.XMLParseException; lineNumber: 7; columnNumber: 86; ']]&gt;' is not allowed in text.

    I have tried parseXML, parseEscapedXML, and Value-of with disable-output-escapting set to true.  How can we map an XML elment to a static CDATA value?

    Comment

     

    • Hemanth Lakkaraju

      To achieve this:

      You should be on OIC
      You should be above PCAR 30530
      You should manually update the xsl with cdata-section-elements attribute and upload the xslt to OIC.

    • Dasaradha Kasukurthi

      I am using OIC. I want to insert CDATA as below. any inputs?

      <qdbapi>
         <udata>mydata</udata>
         <ticket>auth_ticket</ticket>
         <apptoken>app_token</apptoken>
         <records_csv>
            <![CDATA First Name,Last Name,Company,Phone,Cell Phone,Zip
               Bruce,Anderson,Reyes Inc,(474) 555-0514,(390) 555-8927,<-80145>
               Judy,Atwell,Conner Supplies,(499) 555-1072,(763) 555-1325,<-50737>
               Kris,Babs,Willis Orchards,(428) 555-6791,(481) 555-1335,<-81504>]]>
         </records_csv>
         <clist>7.8.6.5.4</clist>
         <skipfirst>1</skipfirst>
      </qdbapi>