IBM Sterling Transformation Extender

Sterling Transformation Extender

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


#Sterling
#Supplychain
 View Only
Expand all | Collapse all

XML Parser issue

  • 1.  XML Parser issue

    Posted 05/01/07 12:45 PM


  • 2.  Re: XML Parser issue

    Posted 05/01/07 12:52 PM
      |   view attached

    Originally posted by: SystemAdmin


    v8.1 Build 114

    Good day all,

    I am trying to DEQUEUE a message and process it. I continue to get a parser error. The odd thing is that the .xsd used to create the message on the queue is the same one I used to import for a TypeTree.

    Just as a test. I tried to read the xml record from a file and write it out, but I keep getting an input error from the trace. When I view the trace it shows that it had read the Case data (1:1) but not the recip data (0:M). Would anyone know what I am doing wrong? I believe I have something wrong in the xsd or the TypeTree importer needs a tweak, but as I am new to the xml world I am not seeing the problem.

    I have included the logs and trace as well as the .mtt, .xsd and a message sample. Any help would be appreciated.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange

    Attachment(s)



  • 3.  Re: XML Parser issue

    Posted 05/01/07 02:21 PM

    Originally posted by: john.gibby


    Whenever I have a problem with validating XML and cannot quickly figure it out with the trace log, I use Sun's Multi Schema Validator. You can get it at https://msv.dev.java.net/files/documents/61/54787/msv.20070407.zip. Originally, it came out of Sun, but I think the maintainer is the guy who authored it at Sun. It is a set of java classes that you can run from a command line an validate an XML file against an XML Schema or DTD. It will give you a much more clear and consise explanation as to what the problem is.

    Good Luck!

    John M Gibby
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 4.  Re: XML Parser issue

    Posted 05/02/07 05:20 AM

    Originally posted by: janhess


    Just because you create xml and read it using the same xsd doesn't mean that the xml you create is valid. If you do mapping rules in the wrong place in the XML tree you can get empty tags for mandatory fields. This causes the xml to be invalid. Check all your rules are at the correct level in your output card.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 5.  Re: XML Parser issue

    Posted 05/02/07 05:39 AM

    Originally posted by: janhess


    The order of your tags does not match the xsd. I don't understand how you created it out of sequence when your typetree elemdecl for the case record says that it is a sequence. If you order the tags correctly or make elemdecl unordered it's ok.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: XML Parser issue

    Posted 05/02/07 08:25 AM

    Originally posted by: SystemAdmin


    I just imported the xsd. I didn't make any modifications to the mtt. Are you suggesting that I modify all ElemDecl that have a sequence reference or just the one where there is displacement? I am going to re-import and verify the TypeTree again. Thanks for responding.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 7.  Re: XML Parser issue

    Posted 05/02/07 08:33 AM

    Originally posted by: janhess


    The typetree is correct for the xsd. It's the xml that's wrong. It couldn't have been produced from this typetree.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 8.  Re: XML Parser issue

    Posted 05/02/07 08:46 AM
      |   view attached

    Originally posted by: SystemAdmin


    Your absolutely correct. The entire process is as follows...

    A large xml file comes in from an external system in the file is parsed reorganized and each record placed as a message on a request queue. A Message Broker process then gets the message and processes it and produces an xml message and places it on a the response queue. Where another WTx process gets these messages off the response queue and transforms them into a flat file of a similar format adding header and trailer information to the file.

    The odd thing about this is that I get WTx to dequeue and parse on my WinXP workstation but it fails on the Solaris server when I run the same process. Also, when it does read from the queue I only get the case data from the first message. even when I use sub functions for repeating groups.

    I have changed the order of the broker process and the Type Tree to line up. Yet the parse still fails. I attached the trace and log for reference.

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

    Attachment(s)



  • 9.  Re: XML Parser issue

    Posted 05/02/07 08:51 AM

    Originally posted by: janhess


    Can't tell without the xml though it looks like something missing at the beginning of the xml.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 10.  Re: XML Parser issue

    Posted 05/02/07 08:53 AM

    Originally posted by: SystemAdmin


    It is in the first messages zip file "QueueData.xml" There are a couple of messages in there.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 11.  Re: XML Parser issue

    Posted 05/02/07 08:56 AM

    Originally posted by: janhess


    Can the Solaris box see the xsd for the validation? It needs to be able to access it.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 12.  Re: XML Parser issue

    Posted 05/02/07 09:01 AM

    Originally posted by: SystemAdmin


    You lost me. Is it not using the .mtt compiled with the .mmc? Does the xsd have to be on the server with the .mmc?
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 13.  Re: XML Parser issue

    Posted 05/02/07 09:03 AM

    Originally posted by: janhess


    It uses the xsd specified in the type tree in the Doc element under Intent Validate As Location. In your case the xsd needs to be in the map folder.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 14.  Re: XML Parser issue

    Posted 05/02/07 10:14 AM

    Originally posted by: SystemAdmin


    You are a Saint, thank you. I do not recall there being a reference to this in the MQSC adapter pdf. Do you know where it is documented? I am working through the multiple message issue with IBM now. They called on the PMR I submitted and just after you answered my question. Thanks for the help.

    G'day
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 15.  Re: XML Parser issue

    Posted 05/02/07 10:26 AM

    Originally posted by: janhess


    what's the multiple message issue?
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 16.  Re: XML Parser issue

    Posted 05/02/07 10:33 AM
      |   view attached

    Originally posted by: SystemAdmin


    I have 6 messages on the queue. I use an input card with the MQSC adapter (-QMN QM1 -CD CH1/TCP/123.22.22.22(1414) -QN Q_OUT -CVT -FORMAT MQSTR -T). It reads and parses the messages, which I have put into a backup (see attached). However, the only data I get on the output is the first message, doesn't have recip data so I am not sure if the function map is working. I am about to test it.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 17.  Re: XML Parser issue

    Posted 05/02/07 10:41 AM

    Originally posted by: janhess


    Your type tree only handles a single message. Yoe will either have to read one message at a time or change your input type tree to allow for multiple messages.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 18.  Re: XML Parser issue

    Posted 05/02/07 10:39 AM

    Originally posted by: SystemAdmin


    I have verified that the recip data repetition is working and that data is returned correctly, but it is still only outputting the first message.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 19.  Re: XML Parser issue

    Posted 05/02/07 10:42 AM

    Originally posted by: janhess


    Sorry previous post should have said output not input.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 20.  Re: XML Parser issue

    Posted 05/02/07 10:47 AM

    Originally posted by: SystemAdmin


    Have taken the path of changing the type tree and creating a level above Doc and making Doc plural. Still didn't work. The IBM staff has taken a copy of the MAP, mtt, xsd and bak file to take to level 3 support. I agree that it is something with the type tree. I'll continue down that path.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender