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

XApplication Java API doesn't work with CDATA

  • 1.  XApplication Java API doesn't work with CDATA

    Posted Tue July 16, 2002 10:15 PM

    X-Application Version: 3.1.2
    Tamino Version : 3.1.1
    Platform : NT
    WebContainer : Tomcat 3.3.1
    JDK Version : 1.3.1_01

    Hello,
    When I try to modify a XML with a CDATA element the XApplication Java API fails with the error:

    “content not supported: class org.jdom.CDATA”.

    Example:

    This xml is Tamino:
    ------------------

    Test of CDATA

    < ![CDATA[

    This is a Test

    ]]>



    This code try to modify the xml document:
    ----------------------------------------
    docCursor = ws.query(“testList”, “test”);
    if (docCursor.hasNext()) {
    doc = (BusinessDocument)docCursor.next();

    doc.modify(); // <–the program fails here!

    doc.getDescendant(“/test/name”).setValue(“N”);
    doc.getDescendant(“/test/x”).setValue(“< ![CDATA[

    subt

    ]]>”);

    doc.commit();
    doc.close();
    }

    Thanks and regards,
    Guillermo Avendaño

    [This message was edited by Christian Freytag on 21 Mar 2003 at 07:46.]


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: XApplication Java API doesn't work with CDATA

    Posted Wed July 17, 2002 10:39 AM

    Yes, CDATA embedded in X-Application tags is not supported. Do you actually need the CDATA section? As a work-aroung, you could replace special characters by character references like
    “'”

    Michael

    Software AG Germany, Darmstadt


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: XApplication Java API doesn't work with CDATA

    Posted Wed July 17, 2002 02:48 PM

    Hello Michael,
    As a work-around i used “Reserved Characters”, for example “<” instead “<” and so on and XApplication Java API don’t fail.

    Thanks
    Guillermo
    X-Application Version: 3.1.2, 3.1.1
    Tamino Version : 3.1.1
    Platform : NT, Win2k, Solaris, …
    WebContainer : Tomcat 3.3
    JDK Version : 1.3.1


    #Tamino
    #webMethods
    #API-Management


  • 4.  RE: XApplication Java API doesn't work with CDATA

    Posted Fri March 21, 2003 08:14 AM

    Hello,

    with the new XPath evaluation embedded in X-Application 4.1.1 it is possible to display / edit CDATA section of your documents.

    Interesting Simple Examples within this context are:
    - Mixed Content
    - Raw Content

    Bye,
    Christian.


    #webMethods
    #Tamino
    #API-Management