Author |
Message
|
gaurav.udgir |
Posted: Mon May 18, 2009 2:12 am Post subject: Create Message Set from XSD |
|
|
Apprentice
Joined: 18 May 2009 Posts: 32
|
Hi All,
I am trying to create a message set from a XSD (XML Schema) file. My XSD file in turn uses few other XSD files. Could you please help me in this issue?
Thank you in advance.
Regards,
Gaurav |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Mon May 18, 2009 2:14 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
What happended when you used the message set generation wizard in the toolkit?
This sounds straight forward enough.... |
|
Back to top |
|
 |
Vitor |
Posted: Mon May 18, 2009 2:15 am Post subject: Re: Create Message Set from XSD |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
gaurav.udgir wrote: |
Could you please help me in this issue?
|
Help with what? What did you do to create the message set? Based on what advice from the documentation? On the assumption you wouldn't have posted if it worked, what happened? What error messages were thrown? How have you tried to resolve the problem (there's no point us suggesting something which has already failed)?
What version of WMB? What version of Toolkit? On what OS? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
gaurav.udgir |
Posted: Mon May 18, 2009 2:29 am Post subject: |
|
|
Apprentice
Joined: 18 May 2009 Posts: 32
|
Hi,
I tried to create the message set using:
File - Message Definition File From - XML Schema File
Then I selected the main XSD file which in turn is calling the other XSD files.
After getting the message set I got the following errors:
'Element reference '#FieldName' cannot be resolved.'
Thank you.
Regards,
Gaurav |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 18, 2009 2:34 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
When you have a set of interconnected schemas you should always use the command-line tool mqsicreatemsgdefs. It will automatically fix up the scheme import/include directives as part of the import. |
|
Back to top |
|
 |
gaurav.udgir |
Posted: Mon May 18, 2009 3:05 am Post subject: |
|
|
Apprentice
Joined: 18 May 2009 Posts: 32
|
Hi kimbert,
Thank you for teh suggestion but unfortunately its not working.
I tried to use the command:
mqsicreatemsgdefs -p newproject -d c:\myproject\source -data C:\WorkSpace_Temp -ns -rmd -rmp
Error Message:
A Message Set can not contain two global element declarations with the same name and namespace (target or chameleon): <fieldname><mxsd filename> |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 18, 2009 3:14 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
This is your problem, not a problem with the tool. Either
a) fix your schemas and remove the duplicate declaration or
b) ensure that directory 'c:\myproject\source' contains only the files that you need to import. |
|
Back to top |
|
 |
gaurav.udgir |
Posted: Mon May 18, 2009 3:45 am Post subject: |
|
|
Apprentice
Joined: 18 May 2009 Posts: 32
|
Hi Kimbert,
Yes you were correct. There were some XSDs which were not used. After using only the required ones I was able to get it successfully. But after that for each XSD I got a message definition file and in that message is empty. I am only getting the Elements field which is filled with data.
Am I missing out something?
Thank you in advance.
Regards,
Gaurav |
|
Back to top |
|
 |
gaurav.udgir |
Posted: Mon May 18, 2009 4:03 am Post subject: |
|
|
Apprentice
Joined: 18 May 2009 Posts: 32
|
Also to add: Type field is also empty for the message set definition file. |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 18, 2009 9:59 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Am I missing out something? |
Yes. There is no such thing as a 'message in XML Schema so the importer cannot automatically create messages. You have to tell the importer which global elements should be messages. Or if you prefer, you can right-click any global element and select 'Create message'.
If 'Types' is empty, that is probably OK. Maybe your schemas do not define any global types. |
|
Back to top |
|
 |
|