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 » how to overcome Chameleon Namespace delima?

Post new topic  Reply to topic
 how to overcome Chameleon Namespace delima? « View previous topic :: View next topic » 
Author Message
bfzhou
PostPosted: Thu Jul 27, 2006 10:53 am    Post subject: how to overcome Chameleon Namespace delima? Reply with quote

Apprentice

Joined: 07 Aug 2003
Posts: 38
Location: Springfield, VA

In my MRM-XML domain msgset, I have two msg definition files, one without name space, one with namespace. the latter reference the first, structure below:

Invoice
InvoiceNo
CustID
ItemID

nn:Message
nn:Header
nn:Data
Invoice

As described in the manual, I include the first msg definition in the second, so the latter can reference the first. But namespace prefix 'nn' got filled in the in type attribute of 'Invoice' within the structure, as well as all the elements of 'Invoice'. This is not what I want, but at this stage, I let it go, and start working on a mapping node to map from input format to output format. However, I got large number of errors saying

Unable to find element reference "sequence/http://ws.myco.com/nn:InvoiceNo" in global complexType "http://ws.myco.com/nn:Message" in message set "Invoice".

The manual call this kind of usage "Chameleon namespace", seems to acknowlege the problem. but didn't give a hint as how to overcome it.

Has anyone encountered this before, it seems to be a common issue to me.

My input msg look like this:
...
<nn:Message>
<nn:Header> ... </nn:Header>
<nn:Data>
<Invoice> ... </Invoice>
</nn:Data>
</nn:Message>

Any input would be greatly appreciated.


Reusing message definition files
One Message Definition File can reuse message model objects defined in another Message Definition File. There are two mechanisms that XML Schema provides to do this: import and include. The namespaces of the two files determine which of import or include should be used:

Target file has a target namespace Target file has notarget namespace
Parent file has a target namespace xsd:import xsd:include1
Parent file has notarget namespace xsd:import xsd:include

When a target namespace file includes a notarget namespace file, referencing an object in the target file from the parent file causes the object to appear in the namespace of the parent file.
When import or include are used, global objects from the target file can be used in the parent file. For example, an element in the parent file can be given a complex type defined in the target file.

The namespace of objects in the target file is preserved in the parent file, with the exception noted in the previous table of a target namespace file including a notarget namespace file. This exception is sometimes called the chameleon namespace effect.

Chameleon namespaces have limited support when used with the MRM domain. When referenced in the parent file, the objects in the target file appear in the namespace of the parent file, but they are assigned default physical format information. In other words, physical format information defined in the target file is not available for use in the parent file. Only use Chameleon Namespaces in the MRM domain to model XML messages where physical format information has not changed from the default.

XML Schema provides a variation of xsd:include called xsd:redefine, which is not supported by WebSphere Message Broker. Using xsd:redefine will give a task list error. A Quick Fix is offered to convert occurrences of xsd:redefine into xsd:include.
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 » how to overcome Chameleon Namespace delima?
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.