XML Validation Using Schema

Hi Ray,Sonam & all

I extracted a dicussion from following link.

[url]http://www.openitx.com/archives/archives.asp?i=90032[/url]

We have a similar situation where we need to validate our XML against a schema.I am using pub.schema:validate to validate the xml against schema in IS 4.6 .
For the schema element of type ‘string’ validation works fine but for other datatypes specially Decimal,validate service generates error.
Taking an example of element 75.22
where in Constraining Facet screen,we have specified

totalDigit=7
fractionDigits=3

the error generated is
errorCode : DT-006
errorMessage :[B2BCORE.0082.9489]Number of digits is greater than totalDigits

Any idea on how to tackle this situation?

Thanks

Hi People,

Any comments on this?

Thanks

Hi Puneet - This looks like a bug with how WM handles schema. I can’t help you much since I haven’t got experience with schema (except for using them in validation. Maybe Ray could tell you if the bug he found got resolved.

It’s probably best if you have a chat with support. Ask them to send you the readme’s for the patches in IS 4.6 service pack 2.

Hey Guys,

A little slow down under here. I get to read these posts after work just before you get out of bed (and I’m ready to go to bed.)

I ended up working with a small group of people spread between my then-employer, an XML Standards group (Papinet), and a few VERY knowledgeable webMethods people.

Checkout Fix #10 for IS 4.6 as it addresses an issue with Schema creation. Also, you didn’t specify if YOU created the Schema or if it has been supplied by webMethods.

If you created the schema, you may have to restructure the document. It is very involved and not trivial and too difficult to discuss in this forum. I spent a week plus, banging my head until webMethods assigned some internal resources to give me help. Then, it all became clear. I had done nothing wrong in the way I created the documents. IS expects the schema documents to contain elements in a certain way. The IS Schema document they provide with the latest server build is not useful at all.

Good Luck, and hope I have helped.

Ray

Thanks Ray and Sonam for your responses.

We are following Rosettanet standards and the schemas have been created using xsd file generated by xmlspy.

Ray :
As you mention that IS require schema to be create in a specific fashion,Can I get some more information on this?
I undetsand that webMethods resources helped you in a way.If some sort of a structure can be provided then it would be of great help.
It seems that schema validation would be of NO use,if IS server does not support schema validation for schemas created outside IS.
In the absense of any resort my best bet would be to convert all the datatypes to be of type ‘STRING’ and forget about MIN/MAX/totaldigits validation.

This sounds so much compromising K

Thanks!
Puneet

Puneet,

Try this out:

Take the XSD file and import it into webMethods Integration Server. Set aside a folder or make a new package, whatever fits your scenario, just make sure it is segregated for this test.

When you import the XSD file, webMethods will make a record and a schema.

Open up the record and check the constraints. You should see the type of constraints that your last post described as a w3c data type with constraints.

If IS throws errors and does not compile, then it’s time to look at applying the fix.

After applying the fix, the problem is still occuring, then it’s time to lodge a service request with webMethods.

Ray

Hi
There is patch for this problem from webMethods install this patch to yours developer and server.
Ajay

Hi,

I trying to submit a xml document to TN using wm.tn:receive.
Which then invokes a Processing Rule based on the Document type.
I have selected the Validate DataStructure Option in the Document Type.
I get the following error when i submit the document.

======================================================================
>>>BasicData:EntryTimestamp=2003-07-15 12:30:35.954,EntryType=0,EntryClass=Validation,BriefMessage=Validation Service Failed,FullMessage=The validation service for this XML document, pub.schema:validate, could not be successfully invoked. The original exception message is: [B2BSERV.0062.9024] Integration Server does not support this type of object in validation DOCUMENT System ID: null Public ID: null,RelatedDocID=6pok8600upjg6tv6000000ae,RelatedPartnerID=null,RelatedInstanceID=null,RelatedStepID=null,B2BUser=null<<<

======================================================================
Note: It is able to recognize the document, but is not able to perform the xml validation.

But when i validate the XML using pub.schema:validate using the same XML and DataStructure. Its get validated.

Let me know if i am missing any step or if there is any other way of handling inbound transacations.

Thanks,

Gamad