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 » MQInput validation does not validate xsi:type attribute

Post new topic  Reply to topic
 MQInput validation does not validate xsi:type attribute « View previous topic :: View next topic » 
Author Message
dziku007
PostPosted: Fri Jun 17, 2016 4:34 am    Post subject: MQInput validation does not validate xsi:type attribute Reply with quote

Apprentice

Joined: 26 Jul 2012
Posts: 32

Hi,

I'm using IB 9.0.0.2. I configured MQInput node with XMLNSC domain and pointed to my message model. I set validation option to "Content and Value".

The trouble I have is that validation process ignores xsi:type attribute. For example when I have input message:
Code:

<NS1:A xmlns:NS1="mynamespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <NS1:B xsi:type="NS2:B_TYPE">
  <NS1:C>
    dummy
  </NS1:C>
 </NS1:B>
</NS1:A>

Validation does not raise an exeption. It is incorrect because there is no NS2 namespace definition in this message (the same xml on external text editor cause schema validator to complain error).

I have unclear conclusion that XMLNSC domain does not support derived types in instance documents (which are pointed with xsi:type). Is it true? Is there any workaround to force validation of xsi:type attributes?

Should I use MRM XML parser or completely external validator (JAVA for example)?

Thank in advance for help.
darek
[/code]
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jun 17, 2016 4:51 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

MRM XML is going to be much less capable than XMLNSC.

I'll otherwise defer further answers to timber.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
kimbert
PostPosted: Sat Jun 18, 2016 10:58 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I have unclear conclusion that XMLNSC domain does not support derived types in instance documents
No, that's not correct. XMLNSC is a fully-compliant validating XML parser. The MRM parser is not - it has a fairly long list of non-conformances. If XMLNSC is not behaving exactly as the W3C specification requires then that's a defect. Your next steps should be
- check that *none* of the xsds in your message set contain a namespace binding for prefix 'NS2'.
- check that validation is actually enabled. The best way to do this is to pass some other non-valid document to XMLNSC and verify that you get a validation error. Make sure that the XML document is well-formed but not valid according to the schema.
- if you are still sure that this is a defect, open a PMR and supply your input XML and the schemas.

I don't recommend using Java to perform the validation. This scenario should work with XMLNSC, and using Java would use a lot more CPU than than using XMLNSC.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
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 » MQInput validation does not validate xsi:type attribute
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.