webMethods

webMethods

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
  • 1.  Xml schema validation problem

    Posted Mon August 08, 2005 09:35 AM

    I am using pub.schema:validate to validate an XML document, but it turned out that it is validated to true whatever XML document I sent to this service. Can anybody give a hint on this? I am using IS6.0.1. Attached below is my schema file, from which I generated the schema used to validate XML documents.

    The parameters of pub.schema:validate is set as below:
    conforms to : (the schema)
    maxErrors:-1
    ignoreContent:false
    failIfInvalid:false

    Thanks!

    schema file
    kkk.xsd (0.6 k)


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


  • 2.  RE: Xml schema validation problem

    Posted Mon August 08, 2005 03:24 PM

    Steven,

    Pls do try this way set failIfInvalid=true,and also conformsToRecordName)

    HTH,
    RMG


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


  • 3.  RE: Xml schema validation problem

    Posted Mon August 08, 2005 09:24 PM

    The conformsTo parm should point to a document type created from your schema, not to the XSD file itself.

    BTW, I would suggest using a different domain name / file name for future examples. Many, including me, will find the one you used offensive.

    Mark


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


  • 4.  RE: Xml schema validation problem

    Posted Tue August 09, 2005 04:16 AM

    Hi, RMG
    Thanks for your reply. But when I set failIfInvalid=true, the “isValid” and “errors” are absent in the pipeline, and it continues to execute the following services.
    I did not catch what you mean by “RecordName”, according to webmethod documentation, “conformsTo” should be set to a schema for XML validation, and I used the schema generated from my schema file to validate, and the full path of the schema is also used when setting the value for “conformsTo”.

    Regards,

    Steven


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


  • 5.  RE: Xml schema validation problem

    Posted Tue August 09, 2005 03:19 PM

    From the pub.schema:validate entry in the 6.1 Developer Built-in Services Guide:

    In other words, if you are validating a document type, conformsTo must point to a document type. If you are validating a Document or Node object, conformsTo can point to a webMethods IS schema (not an XSD file).

    Mark


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


  • 6.  RE: Xml schema validation problem

    Posted Wed August 10, 2005 03:22 AM

    Hi, Mark
    What I mean by schema is just the “webMethods IS schema”, and I used this schema to validate a wm.lang.xml.Node object.

    Regards

    Steven


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


  • 7.  RE: Xml schema validation problem

    Posted Tue January 03, 2006 06:47 AM

    Hi,
    While using pub.schema:validate service

    conformsTo String Document type or schema to validate object against.

    If object is a document (IData object), conformsTo must specify the fully qualified name of a document type on the Integration Server.

    If object is a com.wm.lang.xml.Document or com.wm.lang.xml.Node object, conformsTo must specify the fully qualified name of a schema on the Integration Server.

    Which one is better “a document” or “com.wm.lang.xml.Document or com.wm.lang.xml.Node” ?? and why ?

    Regards,
    Puneet Saxena


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