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
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”.
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).
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 ?