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.


#TechXchangePresenter
 View Only
  • 1.  Problem: InvalidDatatypeException on using pub.document: XMLValuesToDocument

    Posted Mon August 07, 2006 03:08 PM

    Hi everyone!

    I convert a JDBC-Adapter-Service-Output-DocumentType to a xml-string using the built in service pub.document:documentToXMLValues. Fields with datatype timestamp in the oracle db are represented in the output-xml-string as shown:

    <?xml version="1.0" encoding="UTF-8"?>
    <Values version="2.0">
    ...
    <date name="EINLAGERZEITPUNKT">2006-07-28</date>
    <date name="AUSLAGERZEITPUNKT">2006-07-30</date>
    ...
    </Values>

    If I try to take the way back using pub.document:XMLValuesToDocument to convert the string back to a document, I get a “com.wm.util.coder.InvalidDatatypeException: [ISC.0076.9006] decoding: date” error.
    Here is a part of the stack trace:

     com.wm.util.coder.InvalidDatatypeException: [ISC.0076.9006] decoding: date
    at com.wm.util.coder.XMLCoder.doDateDecode(XMLCoder.java:854)
    at com.wm.util.coder.XMLCoder.doRecordDecode(XMLCoder.java:1283)
    at com.wm.util.coder.XMLCoder.decode(XMLCoder.java:314)
    at com.wm.util.coder.Coder.decodeFromBytes(Coder.java:104)
    at pub.document.XMLValuesToDocument(document.java:92)

    The webM IS Java API Reference says, that only values and numbers can be encoded by service pub.document:documentToXMLValues. So this could be a reason, why the values can not be decoded again. But why is the encoding working and resulting in a “date”-tag?

    Can someone provide hints, how to get my pub.document:XMLValuesToDocument-Service to work?

    Thanks in advance,
    Max.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: Problem: InvalidDatatypeException on using pub.document: XMLValuesToDocument

    Posted Mon August 07, 2006 03:58 PM


  • 3.  RE: Problem: InvalidDatatypeException on using pub.document: XMLValuesToDocument

    Posted Tue August 08, 2006 08:30 AM

    Hi Mark,

    I´m using IS 6.1

    Kind regards,
    Max.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: Problem: InvalidDatatypeException on using pub.document: XMLValuesToDocument

    Posted Tue August 08, 2006 02:59 PM

    Max,

    Don’t use documentToXMLValues, use the pub.xml:documentToXMLString instead. Then to go back to a document use pub.xml:xmlStringToXMLNode and pub.xml:xmlNodeToDocument. The Built-In Services Guide covers these services (which can be tricky) in detail.

    HTH,

    Mark


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: Problem: InvalidDatatypeException on using pub.document: XMLValuesToDocument

    Posted Tue August 08, 2006 03:37 PM

    Mark,

    the job is to read from a logfile containing xml. First I tried to use services pub.xml:xmlStringToXMLNode and pub.xml:xmlNodeToDocument after use of pub.file:getFile (as bytes) and pub.string:bytesToString, but this lead to a document on the pipeline that was totally unusable (e.g. some of the xml-fields may be empty, so some of the inner documents have been named “null”; the document contains several document lists).
    As I found out, for generation of the logfile service pub.document:documentToXMLValues has been used, but the way back seems to be not the same than the approach!?

    Kind regards,
    Max.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: Problem: InvalidDatatypeException on using pub.document: XMLValuesToDocument

    Posted Tue August 08, 2006 03:45 PM

    Yes, that sounds like a pretty bad logging approach. Besides, logs are not usually used as a data source other than to display their contents in some meaningful way.

    Mark


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 7.  RE: Problem: InvalidDatatypeException on using pub.document: XMLValuesToDocument

    Posted Tue August 08, 2006 03:59 PM

    Mark,

    I´m totally with you! Could you please inform my customer?? :wink:

    I will alter the logging service to be able to log the data in a way that enables me to read and process them again.

    Thanks for helping.

    Kind regards,
    Max.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB