Xml schema validation problem

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)

Steven,

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

HTH,
RMG

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

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

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

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

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