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 » IIBv9.0.0.2-> XSD Schema Validation Problem

Post new topic  Reply to topic
 IIBv9.0.0.2-> XSD Schema Validation Problem « View previous topic :: View next topic » 
Author Message
broker_new
PostPosted: Fri Jul 22, 2016 9:05 am    Post subject: IIBv9.0.0.2-> XSD Schema Validation Problem Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

Hi Guys,

I have a requirement to validate the incoming XML's in the following flow design
Message flow has designed to receive 3 different kind of XML's but the root element is same.

HTTPInput >> Compute >> HTTP Reply

=================================================
Sample XML1
<Customer>
<OrderNo>1234</OrderNo>
</Customer>
=================================================

Sample XML2
<Customer>
<AccountNo>1234</AccountNo>
</Customer>
=================================================

Sample XML3
<Customer>
<ZipCode>1234</ZipCode>
</Customer>
=================================================

When we have imported the schema to the application toolkit has thrown the following error.

"Global element {}Customer in project Test_Application exists more than once within the Application Test_Application Customer.xsd /Test_Application Unknown XSD Schema Validation Problem"

Is there a workaround for this issue.

Environment details
Toolkit/Server - IIBv9.0.0.2
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 22, 2016 9:24 am    Post subject: Re: IIBv9.0.0.2-> XSD Schema Validation Problem Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

broker_new wrote:
Message flow has designed to receive 3 different kind of XML's but the root element is same.


So how do you distinguish the messages?

broker_new wrote:
When we have imported the schema to the application toolkit has thrown the following error.


The schema? So you have one XSD file that describes all three messages? Or do you have three schemas?

You also need to explain why these are 3 separate XML documents rather than one XML document that has a <choice> stanza with 3 choices.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
broker_new
PostPosted: Fri Jul 22, 2016 9:29 am    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

I agree..It is definitely a concern at IIB level.

But the Source system (already existing) which is pumping the messages has defined 3 different schemas unfortunately

1. Order lookup
2. Account lookup
3. Order lookup by zipcode
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 22, 2016 9:42 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

broker_new wrote:
But the Source system (already existing) which is pumping the messages has defined 3 different schemas unfortunately

1. Order lookup
2. Account lookup
3. Order lookup by zipcode


So they have 3 XSD files for the 3 "messages". Presumably they resolve the conflict by ensuring that the 3 files never meet at any point in their system.

This doesn't alter the fact that they've defined a lookup message with 3 choices.

broker_new wrote:
Is there a workaround for this issue


Generate a new XSD which describes the document in terms of the common root element and a choice, with the contents of the 3 existing XSD providing the layouts.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
timber
PostPosted: Fri Jul 22, 2016 3:12 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

Quote:
I agree..It is definitely a concern at IIB level
I disagree. This is not related at all to IIB. IIB is simply following the rules of XML Schema, like any other application would do.

This is a problem with the specification that you are working with.
- Those messages may be valid examples that conform to a perfectly reasonable XML schema,
but
- It is quite impossible to work out from those messages what the intended XML Schema structure is. More examples might help, but they might not be enough.
- A choice of 3 elements *might* be the correct answer.
- Three optional elements in a sequence might be the correct answer.
- 15 optional elements, or 25 elements in a choice might be the correct answer.

It is absolutely essential that you
- find out which application sends these XML messages
- find out who owns that application
- ask them what the rules are for these messages.
If they try to give you more examples, do not accept them. It is not possible to clearly specify an XML schema using examples alone.
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 » IIBv9.0.0.2-> XSD Schema Validation Problem
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.