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 » Import Schema - Validation Issues (2.1 csd6)

Post new topic  Reply to topic
 Import Schema - Validation Issues (2.1 csd6) « View previous topic :: View next topic » 
Author Message
catwood2
PostPosted: Mon Mar 08, 2004 3:34 pm    Post subject: Import Schema - Validation Issues (2.1 csd6) Reply with quote

Centurion

Joined: 17 May 2002
Posts: 108

I have imported a schema into the MRM. Wired an input node( MessageSet/Format properties) -> compute node(set to just copy entire message and validate content and value) -> output node.
Everything is making it to output queue.

I have read similar posts - but not doing the trick for me. I am going thru manual attempting to verify that what I have imported is actually carrying over into the MessageSet. As MRM and Schemas some new territory for me, thought I would seek out some pointers. I was given and imported this schema:
Code:
<?xml version="1.0"?>
<schema
xmlns="http://www.w3schools.com"
elementFormDefault="qualified">

<simpleType name="priority">
 <restriction base="string">
  <enumeration value="high"/>
  <enumeration value="low"/>
 </restriction>
</simpleType>

<simpleType name="status">
 <restriction base="string">
   <enumeration value="open"/>
  <enumeration value="closed"/>
 </restriction>
</simpleType>


<element name="createmessage">
    <complexType>
      <sequence>
   <element name="Source_appl" type="string"/>
   <element name="Target_appl" type="string"/>
   <element name="Message_type" type="string"/>
   <element name="Ticket_number" type="string"/>
   <element name="Status" type="string"/>
   <element name="Priority" type="string"/>
      </sequence>
    </complexType>
</element>

</schema>

And I am expecting:
1. messages tested that have a different tag order than above would fail.
2. messages with values other than 'open' or 'closed' in "Status" field would fail.
3. messages missing any element would fail.

These are all making it to the output queue. I have verified that the 'Root Tag Name' is set to 'createmessage'.

Oh, sample message (#2 above):
Code:
<createmessage>
   <Source_appl>USDR4</Source_appl>
   <Target_appl>UTCRMDY</Target_appl>
   <Message_type>CRETIKBF</Message_type>
   <Ticket_number>AM1234</Ticket_number>
   <Status>what</Status>
   <Priority>ever</Priority>
</createmessage>


Thoughts, as usual, appreciated.
Back to top
View user's profile Send private message
catwood2
PostPosted: Tue Mar 09, 2004 7:10 am    Post subject: Reply with quote

Centurion

Joined: 17 May 2002
Posts: 108

Still trying to figure this out. I have determined that tags out of order is behaving as I would expect (so, #1 in original post is working as expected.
From that I know that I am parsing against the message definition. For example, if I send this message thru the flow (with case changed on 'Status' to 'status'):
Code:
<createmessage>
   <Source_appl>USDR4</Source_appl>
   <Target_appl>UTCRMDY</Target_appl>
   <Message_type>CRETIKBF</Message_type>
   <Ticket_number>AM1234</Ticket_number>
   [b]<status>what</status>[/b]
   <Priority>ever</Priority>
</createmessage>


The message doesn't validate (as I would expect) with the following in the trace:

Code:
2004-03-09 14:55:18.070131     2068   ParserException  BIP5285E: Message Translation Interface Parsing Errors have occurred:
                                       Message Set Name  : 'NDCUSD_CRETIKBF'
                                       Message Set Level : '1'
                                       Message Format    : 'XML1'
                                       Message Type Path : ''
                                       Review further error messages for an indication to the cause of the errors.
2004-03-09 14:55:18.070251     2068   ParserException  BIP5371E: Message Validation failure. Invalid Member for typeContent closed Element, status, is either, not defined as a member of it's parent type, or has been created out of order in the logical tree, for a typeComposition of Ordered Set or Sequence. The parent type has a typeContent of Closed. The Parent element is createmessage.


Same type of error if I change the order.

Back to figure out why validation of values not occuring and why missing tags are being allowed to pass thru.
Back to top
View user's profile Send private message
catwood2
PostPosted: Tue Mar 09, 2004 8:22 am    Post subject: Reply with quote

Centurion

Joined: 17 May 2002
Posts: 108

Ok. I have the expected behavior occuring now. After import, this required
1. That I go in and set the Min and Max occurences on the fields. I was thought it would be understood as once and only once given the schema.
2. That I go in and set element values and apply them to the fields. I thought this would come in via the schema import.

Basically, based on my schema in first post - the benefit of the import was creation of the message type, fields, etc.

This sound right to anybody - that the occurences and validation values would have to be manually entered after the importschema ?
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Mar 09, 2004 6:45 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Some of the XSD features are not supported by the WMQI XML importer, I don't have the complete list, but have come across some of them while importing schemas in WMQI 2.1 I see that you don't have minOccurs and maxOccurs in your XML schema.
I have successfully imported schemas including minOccurs and maxOccurs using import command and it seems to set properties correctly for MRM elements.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
catwood2
PostPosted: Wed Mar 10, 2004 11:52 am    Post subject: Reply with quote

Centurion

Joined: 17 May 2002
Posts: 108

kirani-
Thanks for the feedback.

Now that I have validation working, I am playing with trying to validate the message against two MessageSets in the same flow. From this thread:

http://www.mqseries.net/phpBB2/viewtopic.phpt=9975&highlight=validate

I thought that the first validation could be forced by accessing the last tag. Doesn't appear to be the case (I sent a note to the poster to see if I misunderstood). As the thread progresses, it's unclear whether the ESQL options for me to force the validations are really available with this version. Do you have any thoughts on that or what might be the best way to get that first validation?
thx
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 11, 2004 4:50 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Ok. I have the expected behavior occuring now. After import, this required
1. That I go in and set the Min and Max occurences on the fields. I was thought it would be understood as once and only once given the schema.
2. That I go in and set element values and apply them to the fields. I thought this would come in via the schema import.

Basically, based on my schema in first post - the benefit of the import was creation of the message type, fields, etc.

This sound right to anybody - that the occurences and validation values would have to be manually entered after the importschema ?


This is expected behaviour for version 2.1. In v5.0, the message model is based on XML schema, and your scenario would work without any need for modification.
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 » Import Schema - Validation Issues (2.1 csd6)
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.