ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML Validation

Post new topic  Reply to topic
 XML Validation « View previous topic :: View next topic » 
Author Message
rajmq
PostPosted: Fri Jul 18, 2008 1:38 am    Post subject: XML Validation Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

All,

I have requirement to validate the incoming xml message using XSD

I have created the MsgSet using XSD but if I have multiple enumeration values
Q1. Is it possible to validate more than one vale?
Q2. Is it any specific configuration required in the msgset etc?

<xs:simpleType name="res-cd-type">
<xs:restriction base="xs:string">
<xs:enumeration value="vaild"/>
<xs:enumeration value="Invalid"/> </xs:restriction>
</xs:simpleType>

TIA


_________________
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified System Administrator - WebSphere Business Integration Message Broker V6.0
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 18, 2008 2:39 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please state which version of WMB you are using, and which domain you are using for validating your XML.
If on v6.1, you should read this: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ad21074_.htm
Back to top
View user's profile Send private message
rajmq
PostPosted: Fri Jul 18, 2008 3:01 am    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Broker version is : 6.0.3 and using XML parser.


_________________
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified System Administrator - WebSphere Business Integration Message Broker V6.0
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 18, 2008 4:43 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

- The XML domain cannot validate, and is deprecated
- In v6, if you need XML validation you must use the MRM parser with an XML physical format
- Please update to the latest fix pack
- For XML flows which do not require validation, I suggest that you use XMLNSC. It is the recommended XML parser for new message flows, so using it now will make migration to v6.1 easier.
Back to top
View user's profile Send private message
rajmq
PostPosted: Fri Jul 18, 2008 5:55 am    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Quote:
In v6, if you need XML validation you must use the MRM parser with an XML physical format


At the moment I planning to use MsgSet for validating the XML but i would like know feasibility for the below
Q1. Is it possible to validate more than one value for a particular tag?
Q2. Is it any specific configuration required in the msgset to handle multiple enumerations?

TIA
_________________
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified System Administrator - WebSphere Business Integration Message Broker V6.0
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 18, 2008 7:01 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
At the moment I planning to use MsgSet for validating the XML
You mean you are planning to use the MRM parser for validating the XML. The message set is just a description of the message, and it does not 'validate' anything.
( Sorry if that sounds picky )
Q1 : Yes
Q2 : No
Back to top
View user's profile Send private message
rajmq
PostPosted: Fri Jul 18, 2008 12:30 pm    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

I have mentioned wrongly

But when I import xsd schema to MsgSet and able to see definition & attributes but i don't see the tag values

<xs:enumeration value="vaild"/>
<xs:enumeration value="Invalid"/> </xs:restriction>

I have doubt, how the incoming xml message will be validated against the xsd enumeration value?


_________________
IBM Certified System Administrator - WebSphere MQ V6.0
IBM Certified System Administrator - WebSphere Business Integration Message Broker V6.0
Back to top
View user's profile Send private message
sridhsri
PostPosted: Fri Jul 18, 2008 1:07 pm    Post subject: Reply with quote

Master

Joined: 19 Jun 2008
Posts: 297

If I am not mistakes, when the XMLNSC parser validates for content and value, it does check for enum too.

The way you create enums is
1) Create element. When assigning the type, select "New Simple Type Restriction" base type as string (for your example). This will create the element with a '+' sign. If you expand it you will find xs:string
2) When you click on properties of xs:string, you will find "Value Constraints". Here you can specify the enums.

In your case, since you are not doing this by hand, you only need to follow step 2 to locate the enum value constraints.
Back to top
View user's profile Send private message
kimbert
PostPosted: Sat Jul 19, 2008 2:30 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
But when I import xsd schema to MsgSet and able to see definition & attributes but i don't see the tag values
sridhsri is correct.When you import an XML Schema to create a Message Definition File, any facets in the xsd become 'Value Constraints' in the Message Definition File.
Quote:
I have doubt, how the incoming xml message will be validated against the xsd enumeration value?
Have you tried it to see what happens?

sridhsri said:
Quote:
If I am not mistaken, when the XMLNSC parser validates for content and value, it does check for enum too.
That's true. XMLNSC is close to being a perfect implementation of the XSD specification. But rajmq is using MRM, not XMLNSC.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML Validation
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.