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.  XML validation pubschemavalidate

    Posted Tue November 09, 2004 01:11 AM

    Hi All,
    I have an XSD and XML and validating the xml against XSD.
    When I use pub.schema.validate, it does not seem to validate the xml correctly,atleast according to XML spy.flowservice says it is true but it fails if I validate in XML spy.(Please see TEST_INDEX in xml which has balnk spaces padded)
    Please find the attachments.
    Help please.

    xsd
    testschema.xsd (1.3 k)

    xml
    testxml.xml (0.2 k)


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


  • 2.  RE: XML validation pubschemavalidate

    Posted Tue November 09, 2004 01:42 AM

    webmuser,

    What are the different params you are setting in the validate service?
    basically IS validates depends on the input you,check the documentation if you are not clear.

    HTH,
    RMG.


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


  • 3.  RE: XML validation pubschemavalidate

    Posted Tue November 09, 2004 02:06 AM

    Hi RMG,
    Thanks for taking time to look into that.
    Actually ,I need to more clear ,the service is
    1)xmlstringtoxmlnode;assign xmlstring with above xml.
    xmlstring is :<test><test_index>1</test_index> <test_id>111</test_id><material_id>test</material_id><product_part_number>111</product_part_number></test>

    2)validate:inputs are
    map node to object
    confirmsto:absolutepathofschema.(pleaseimport schema into directory)
    run the service ,we get isValid =true even if we have spaces .


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


  • 4.  RE: XML validation pubschemavalidate

    Posted Tue November 09, 2004 02:23 AM

    Along with setting conformsTo,also explicitly set the validate=true and ignoreContent=false,failifinvalid=true and play with these params various possible ways.you will see some effect in validation.

    HTH,
    RMG.


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


  • 5.  RE: XML validation pubschemavalidate

    Posted Tue November 09, 2004 02:50 AM

    Hi RMG,
    We did the following settings
    confirmsTo: xsd(pathofxsd)
    maxerrors=-1(puts more than one error in the errors object-pipeline out)
    ignoreContent=false(default is false.I cannot put true because It need to validate the value which has got blank spaces in it with field defined as positiveInteger in XSD)
    failInvalid:true(It raises exception if it fails in validation,but it is not failing in this case).

    When we validate the same xml against the same XSD with XMLSPY then it fails and clearly shows as field containing spaces but not positiveIntegrer.


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


  • 6.  RE: XML validation pubschemavalidate

    Posted Tue November 09, 2004 03:30 AM

    I believe IS is ignoring the xs:positiveInteger which i am not sure about this behaviour,but as far i know IS6.x strictly validates against the schema than in IS4.6.

    If possible try to change in your schema and include the this way and load into IS and validate it.see attachment.

    Change in Schema
    change.txt (0.1 k)

    Also check this link [url=“http://www.w3schools.com/schema/schema_complex_empty.asp”]http://www.w3schools.com/schema/schema_complex_empty.asp[/url]

    Sorry i am so extensive guy in XSD world.

    HTH,
    RMG.


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