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

XML Validation Error

  • 1.  XML Validation Error

    Posted Wed September 22, 2004 11:22 PM

    Hi all I trying to validate a record against schema before converting into a xml and I am getting the following error.

    [B2BCORE.0082.9027] Dimension mismatch, List expected

    Here is my record structure.

    inArray = /Header/Detail(1-infinity)
    outArray = /Header1/Detail1(1)

    For each Detail I will create on record and validate against the schema which is nothing but inArrays schema. I am sure my output create one Detail record.

    Anyone experienced this problem before. We are using IS 4.6

    Thanks,
    Muru.


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


  • 2.  RE: XML Validation Error

    Posted Wed September 22, 2004 11:44 PM

    Muru,

    Before doing validation step,make sure the Header/Detail is populated as recordlist(when it has only one detail record as well multiple records)i.e after documentToRecord step check in the pipeline(recordReference).If the Detail record is not showing up as an Array then specify (arrays=Detail and makeArrays=true) or set recordName(fully qualified recordname) in the documentToRecord Step,either of the things will solve the issue.

    If you confirm the things above then definitely validate service will work and resolve the above error.

    HTH,
    RMG.


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


  • 3.  RE: XML Validation Error

    Posted Thu September 23, 2004 02:32 PM

    forgot to mention,

    Also check the Arrays are created as expected under the Detail/ structure too.If so specify them in the arrays field of documentToRecord.

    HTH,
    RMG.


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


  • 4.  RE: XML Validation Error

    Posted Thu September 23, 2004 06:11 PM

    RMG,

    Thanks for the reply. I am bit confused here I am actually validating the record against the schema before converting into xml. I will convert the record into xml only if the validation passes. I am not using documentToRecord service here.

    Output of my service prior to the validation step shows the detail record created as record and not list which is correct becuase i am inside the loop and schema should validate this because the detail record specified as 1 to infinity. Why the detail record should be created as list as oppose to record.

    Thanks,
    Muru.


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


  • 5.  RE: XML Validation Error

    Posted Thu September 23, 2004 06:39 PM

    Muru,

    As you said Detail record (1 to infinity),so i thought Detail structure will be an Array(recordList).Is it right?

    And if your service has already record and you are looping,so then no need of documentToRecord step,since you have already parsed in before validating step.

    I am confused too,what to reply as resolution at this point.

    If possible please elaborate us end-end flow steps(starting from receiving the document upto validation step),so it will be easy for anyone to respond.

    HTH,
    RMG.


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


  • 6.  RE: XML Validation Error

    Posted Thu September 23, 2004 11:11 PM

    RMG,

    We receive a xml file which has some order information. We convert that xml file into record structure based on the schema provided by the sender(Another Application). Here is the source record Structure

    Header(1-infinity)/Details(1-infinity). Loop through header and map the values into the target format. The target Schema defined like this

    THeader(1-infinity)/TDetails(1-infinity).

    For each Header we will be creating one THeader and validate this THeader Record(not list) against the target schema if it validates then convert this into xml and send it to the target. Continue until all the Header is completed. Then the process ends.

    The problem is the target schema the THeader is defined as 1-infinity so when we create the record out of Schema it creates the THeader as record List. When we loop through the Header we put the THeader in the out array so inside the loop THeader will always be a record (not list). When we do the validation for some reason the validation service throws the above exception.

    Any suggestions?. please let me know if my explanation is not clear.

    Thanks,
    Muru.


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


  • 7.  RE: XML Validation Error

    Posted Fri September 24, 2004 02:23 PM

    Muru,

    Thanks for clarification.

    Inside the loop THeader will be record and you are validating against schema then it expects THeader as record List(Array) right?
    So the validation fails,since internally the roottags Elements/simple types/complextypes defind as dimension list.which make sense when validation.

    HTH,
    RMG.


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


  • 8.  RE: XML Validation Error

    Posted Fri September 24, 2004 04:13 PM

    RMG,

    Is there any way we can overcome this. What puzzles me is we have done similar kind of mappings before where the validating schema is recordList and the actual data we provide to validation step is a record and it worked before. And inside the schema even though its defined as recordList it is actually 1 to Unbounded so if we provide one record it should pass the validation right?.

    Please let me know if you have any suggestions to overcome this. At this point this is not a show stopper for us but still I would like to resolve this.

    Thanks for your help in this.

    Thanks,
    Muru.


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


  • 9.  RE: XML Validation Error

    Posted Sat September 25, 2004 03:41 PM

    Subramanian

    I wonder why u cannot validate against the recordlist itself. why do u validate it inside the loop

    Thahir


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


  • 10.  RE: XML Validation Error

    Posted Tue September 28, 2004 07:19 PM

    Thahir,

    The reason is we process one order at a time because of target restrictions.

    Thanks,
    Muru.


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