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
  • 1.  Storing nonXML removes newlines

    Posted Thu June 24, 2004 12:35 PM

    Dear Forum.

    I heave a little problem.

    When I insert a nonXML-document with the Java-API, fx a normal text-file, then the newlines disappears (gets stripped).

    If I insert the following text into a nonXML-document in tamino:

    “Hello\r\nWorld”

    Then when I retrieve it, I get this text

    “HelloWorld”

    Note that whitespace are NOT strippeed, only newline characters gets stripped.

    I have included the schemae for the nonXML-document below.

    Best Regards
    Stefan Krabbe
    –cut–
    <?xml version = "1.0" encoding = "UTF-8"?>
    <xs:schema xmlns:xs = “XML Schema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
    xs:annotation
    xs:appinfo
    <tsd:schemaInfo name = “html”>
    <tsd:collection name = “reports”></tsd:collection>
    <tsd:doctype name = “html”>
    tsd:nonXML</tsd:nonXML>
    </tsd:doctype>
    tsd:adminInfo
    tsd:versionTSD3</tsd:version>
    tsd:created2002-12-16T18:36:03.290+01:00</tsd:created>
    tsd:modified2002-12-16T18:36:03.290+01:00</tsd:modified>
    </tsd:adminInfo>
    </tsd:schemaInfo>
    </xs:appinfo>
    </xs:annotation>
    <xs:element name = “html_doc”></xs:element>
    </xs:schema>


    #API-Management
    #webMethods
    #Tamino


  • 2.  RE: Storing nonXML removes newlines

    Posted Tue June 29, 2004 12:44 PM

    Hi Stefan,

    Please try build your TNonXMLObject using the InputStream. Hope you get the desired output.

    Try the following :-

    public static String NON_XML =“Greeting by=‘XMLGreetingApplication’:Hello\r\nWorld”;

    TNonXMLObject nonXMLObject = TNonXMLObject.newInstance
    (new ByteArrayInputStream(NON_XML.getBytes()),null,“ino:nonXML”,“NonXMLGreeting”,text/plain" );

    I hope this solves your concern, if not get back,

    thanks,
    Sonal.


    #webMethods
    #Tamino
    #API-Management


  • 3.  RE: Storing nonXML removes newlines

    Posted Tue June 29, 2004 02:57 PM

    Hi Sonal.

    I replaced the StringReader (used in the documentation/examples) with the ByteArrayInputStream.

    Thanx for the help - it worked.

    Best Regards
    Stefan Krabbe


    #webMethods
    #API-Management
    #Tamino