Author |
Message
|
sivaguru |
Posted: Sun Jun 22, 2008 11:30 pm Post subject: Namespace constant has not been defined |
|
|
Apprentice
Joined: 18 Jun 2008 Posts: 40
|
Hi ,
Please confirm whether the below code would generate the following xml with the namespace. As we are not sure of the namespace coding, please help us .
While saving we are getting the below warning
"Namespace Constant Ns is not defined "
Code
-------
DECLARE Ns NAMESPACE 'http://www.sample.org/b2b/message';
SET OutputRoot.XMLNSC.Ns:Messages.(XMLNSC.NamespaceDecl)xmlns = 'http://www.sample.org/b2b/message';
SET OutputRoot.XMLNSC.Ns:Messages.(XMLNSC.NamespaceDecl)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';
SET OutputRoot.XMLNSC.Ns:Messages.(XMLNSC.NamespaceDecl)xsi:schemaLocation = 'http://www.sample.org/b2b/message ErrorSegment.xsd';
XML
------
<Messages xmlns="http://www.sample.org/b2b/message" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sample.org/b2b/message
C:\ErrorSegment.xsd" >
....
</Messages> |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jun 23, 2008 12:48 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You have not defined an ESQL namespace constant for 'xsi'.
Code: |
DECLARE xsi NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance'; |
|
|
Back to top |
|
 |
sivaguru |
Posted: Mon Jun 23, 2008 1:05 am Post subject: |
|
|
Apprentice
Joined: 18 Jun 2008 Posts: 40
|
Hi,
Thanks for your comments. We have added the declaration for the xsi, but even after that we getting the same warning.
Actually even before we add the declaration to xsi, warning is raised in all the 3 lines of code after the declare statement. Please guide us to get rid of this issue.
modified Code
------- ---------
DECLARE Ns NAMESPACE 'http://www.sample.org/b2b/message';
DECLARE xsi NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
SET OutputRoot.XMLNSC.Ns:Messages.(XMLNSC.NamespaceDecl)xmlns = 'http://www.sample.org/b2b/message';
SET OutputRoot.XMLNSC.Ns:Messages.(XMLNSC.NamespaceDecl)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';
SET OutputRoot.XMLNSC.Ns:Messages.(XMLNSC.NamespaceDecl)xsi:schemaLocation = 'http://www.sample.org/b2b/message ErrorSegment.xsd'; |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jun 23, 2008 2:52 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
It's probably spurious. Have you restarted Eclipse with the -clean flag? Have you tried closing and re-opening the project? |
|
Back to top |
|
 |
sivaguru |
Posted: Mon Jun 23, 2008 3:27 am Post subject: |
|
|
Apprentice
Joined: 18 Jun 2008 Posts: 40
|
Hi,
I restarted the Eclipse and also cleaned the project manually. It is still showing the same warning. Is there is any other way of doing this. Please guide me to solve this issue. |
|
Back to top |
|
 |
vsr |
Posted: Mon Jun 23, 2008 4:49 am Post subject: |
|
|
Centurion
Joined: 04 Apr 2006 Posts: 104
|
kimbert wrote: |
It's probably spurious. Have you restarted Eclipse with the -clean flag? Have you tried closing and re-opening the project? |
Close the Toolkit if it is open and run 'wmbt.exe' through command prompt with option ' - clean ' ('wmbt.exe -clean' ). This exe file is located at C:\Program Files\IBM\MessageBrokersToolkit\6.0 ( Assuming you are using WMB 6.0 ). Toolkit initialization may take a while. |
|
Back to top |
|
 |
|