IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Issue with xml tag

    Posted 10/09/09 04:48 PM

    Originally posted by: MyScreen-Laks


    Here is my scenario:

    My input is xml message and sending it to SAP R/3. I imported DTD and created a type tree.

    Here is my sample xml file:

    <?xml version="1.0" encoding="UTF-8"?><?Siebel-Property-Set EscapeNames="false"?><SiebelMessage MessageId=....>

    The issue here is my type tree is not accepting the second tag <?Siebel-Property-Set EscapeNames="false"?> even though it starts with ?. It works fine with or without <?xml ...?> tag. Please advise how to make my map work with second tag on.

    Thanks,
    Laks
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  Re: Issue with xml tag

    Posted 10/10/09 04:18 PM

    Originally posted by: SystemAdmin


    Laks,

    What version of Mercator, DSTX or WTX are you using? Type trees created from DTDs after 6.7 were formatted much differently.

    Does your type tree have a "PINonDocData DTD" item (for versions v6.7 & later) or a "PIMisc Declaration XML item (versions before v6.7)? This is the type tree item that handles XML processing instruction declarations.

    If so, then when the XML file is validated in the input card, it should pass. I created a similar test file for earlier and later versions and both were processed by the map.

    If you're still stuck you can zip the type tree and attach it to this thread and I'll look at it.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 3.  Re: Issue with xml tag

    Posted 10/11/09 10:51 PM

    Originally posted by: MyScreen-Laks


    Hi Mike,

    First of all, thanks for your response.

    I'm using WTX 8.2. Please find attached is the zip with original DTD file and the type tree I created from the DTD file and also my Input sample files both in txt and xml formats.

    My type tree doesn't have any of the items that you have mentioned. I have generated the type tree using the XML DTD option and with xerces validation without Generate DOCTYPE checked.

    Please advice.

    Thanks,
    Laks
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 4.  Re: Issue with xml tag

    Posted 10/12/09 07:54 AM

    Originally posted by: SystemAdmin


    Laks,

    For some reason the attachment didn't make through to the post.

    But I tried importing a test DTD using the Xerces validation without Generate DOCTYPE. This generated a type tree that contained a Misc group with a "PI" item for handling processing instructions. Under the PI properties there is an "INTENT - Validate As" property that should be set to "XML_PI". When I ran a map with the same XML PI that you had in your file - <?Siebel-Property-Set EscapeNames="false"?> - it did not generate any errors.

    Have you run your map without the - <?Siebel-Property-Set EscapeNames="false"?> - line in the input file to verify that it was causing the error?
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: Issue with xml tag

    Posted 10/14/09 10:09 AM

    Originally posted by: MyScreen-Laks


    Hi Mike,

    I'm trying to send the attachment again. If it doesn't work then Can I have your e-mail id, so that I can send it to you directly? I really appreciate all your help.

    Thanks,
    Laks
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 6.  Re: Issue with xml tag

    Posted 10/14/09 10:28 AM


  • 7.  Re: Issue with xml tag

    Posted 10/14/09 04:42 PM

    Originally posted by: SystemAdmin


    After looking at the input XML file, I found that it was in some 16 bit character format, not the 8-bit UTF-8 format that was listed in the XML declaration. This was the reason for the map failure. The map and type tree ran properly when the XML file was reformatted in the UTF-8 character format.

    When I've run into this in the past, I always made sure the data was in UTF-8, ASCII characters before it reached the map. But more recent versions of WTX may have a better built-in way of dealing with different character sets that XML files can use. Does anybody have suggestions for Laks?
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 8.  Re: Issue with xml tag

    Posted 10/20/09 01:22 PM

    Originally posted by: MyScreen-Laks


    Mike, You are right! My input file is in 16 bit character set while in the actual data it says UTF-8 and hence the map fails by trying to read 8 bit character set.

    The work around is instead of reading the xml directly, I converted it into a text file and forced it to use UTF-16 and then read the converted text file as my input.

    Map1: =CTEXT(myIn1,"UTF-16")

    Map2: read the output text file of Map1 as input to Map2

    CTEXT: The CTEXT function converts the content of a group or item object to a text item and determines the character set of the resulting text item. You can find more details in documentation----Chapter 22. Character set codes for CPACKAGE, CSERIESTOTEXT, and CTEXT

    Thanks,
    Laks
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender