XML record validation against DTD

Is there a similar service to pub.schema.validate for a DTD. I want to validate a record against its DTD.

–steve

does anyone now how to validate a record against the DTD the record was created from? I know how to do this for a record created from a schema, pub.schema.validate, but I could not find a similar service for DTDs

–steve

Actually, you use the same service. When a DTD or xsd is imported, a record and IS schema are created. The record defines the structural constraints and refers to the IS schema for content constraints.

Rob,

I tried using the pub.schema:validate but I get the following error. “Could not run the service handlePOResponseIDoc” com.wm.app.b2b.server.ServiceException:
[B2BSERV.0062.9024]Integration Server does not support this type of object in validation"

I am receiving an IDOC from SAP, routing it to my flow service using the partner manager. My flow service invokes transformFlatToHierarchy, which formats the Idoc to a record. Where the record was created from a DTD which also produced the schema for the IDoc. So I called the validate service and passed the record to it and said that this record conforms to the schema and I get this error. Any thoughts?

–steve

What are you passing in as the conformsTo parameter? When passing in a record as the object to be validated, you pass in the name of the record def as the conformsTo. You pass the name of the schema as the conformsTo if the object to be validated is a node object.

The record reference IDocPO, is the record reference to the record created by the IDoc’s DTD.

This record is populated by the TransformFlatToHierarchy service, whos output is a boundNode that is mapped to the IDocPO record reference.

I map this IDocPO record Reference to the validate service’s input variable "Object " and hard code the “conformsTo” input variable to the schema for the IDocPO record, which was created by the same DTD for the IDoc.

Hard code the conformsTo input variable to the record definition, not the schema

I assume you have something like this in your folder hierarchy:

MyIDocStuff (package)
…MyIDocStuff (top-level folder)
…records (folder)
…IDocPO (record definition)
…schema_IDocPO (schema)

Set conformsTo to “MyIDocStuff.records:IDocPO”

Do not set it to “MyIDocStuff.records:schema_IDocPO”