Author |
Message
|
kumar.shanj |
Posted: Thu Dec 30, 2010 8:14 am Post subject: How to set version and xmlns values for xml output in WMB |
|
|
Apprentice
Joined: 18 Nov 2010 Posts: 49
|
I want to set xmlns value for xml output in message broker.like
<?xml version="1.0" encoding="UTF-8" ?>
<IST xmlns="http://www.krakow.uc.gov.pl/ISTw1r1.xsd">
<body>
...
</body>
</IST> |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 30, 2010 8:17 am Post subject: Re: How to set version and xmlns values for xml output in W |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kumar.shanj wrote: |
I want to set xmlns value for xml output in message broker. |
You're going to get further in this forum if you actually ask questions.
You're also going to get further if you display some indication that you've actually attempted this yourself and are not just sitting there expecting to be spoon fed.
This is even easier than your previous question about changing a string to a decimal, and is fully explained in the product documentation
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kumar.shanj |
Posted: Thu Dec 30, 2010 8:33 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2010 Posts: 49
|
I tried like below mentioned code. which is not adding any xmlns value
Set OutputRoot.XMLNSC.IST.(XML.NamespaceDecl)xmlns = 'http://www.w3.org/2001/XMLSchema-instance';
I am not getting how to set value to the version details in Outputroot xml. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 30, 2010 8:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kumar.shanj wrote: |
I tried like below mentioned code. which is not adding any xmlns value |
No it won't. Try reading the documentation, rather than just glancing at it and cherry picking what seems relevent.
kumar.shanj wrote: |
Set OutputRoot.XMLNSC.IST.(XML.NamespaceDecl)xmlns = 'http://www.w3.org/2001/XMLSchema-instance'; |
Spot the discrepancy? In the somewhat greyed out bold for your assistance? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Dec 30, 2010 8:40 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
One answer to your problem is in this post.
http://www.mqseries.net/phpBB2/viewtopic.php?t=47003
One of the replies in the above post tells you what is wrong woth your ESQL _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kumar.shanj |
Posted: Thu Dec 30, 2010 8:51 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2010 Posts: 49
|
Below mentioned code added the xmlns value .
Set OutputRoot.XMLNSC.IST.(XMLNSC.NamespaceDecl)xmlns = 'http://www.w3.org/2001/XMLSchema-instance';
But i am getting a blank value also with that like
<IST xmlns="" xmlns="http://www.w3.org/2001/XMLSchema-instance">
<Deklaracja NrWlasny="3" UC="50100" >
</Deklaracja>
</IST> |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 30, 2010 8:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kumar.shanj wrote: |
But i am getting a blank value also with that like
|
For that you need to follow the advice of my worthy associate. And/or read the documentation surrounding WMB's namespace support more closely. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kumar.shanj |
Posted: Thu Dec 30, 2010 9:10 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2010 Posts: 49
|
thanks for update..
can i have any link or help where i can get how to set xmlns value in ESQL coding. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 30, 2010 9:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kumar.shanj wrote: |
can i have any link or help where i can get how to set xmlns value in ESQL coding. |
You're seriously telling me you need help to find a section of the documentation entitled Working With Namespaces in the InfoCentre?
Or any of the other helpful & informative stuff that comes up when I type "namespace" or "declaration" into the InfoCentre search facility?
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Dec 30, 2010 10:01 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Vitor wrote: |
kumar.shanj wrote: |
can i have any link or help where i can get how to set xmlns value in ESQL coding. |
You're seriously telling me you need help to find a section of the documentation entitled Working With Namespaces in the InfoCentre?
Or any of the other helpful & informative stuff that comes up when I type "namespace" or "declaration" into the InfoCentre search facility?
 |
I guess that for some RTFM just goes in one ear and out the other. Maybe it is far to easy to post here than use the wonders of Google.
 _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kumar.shanj |
Posted: Wed Jan 05, 2011 2:35 am Post subject: |
|
|
Apprentice
Joined: 18 Nov 2010 Posts: 49
|
thanks davis for the help.
I did coding like mention below.its working now
BEGIN
DECLARE xmlns NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
SET OutputRoot.Properties.MessageDomain = 'XMLNS';
CREATE FIRSTCHILD OF OutputRoot.XMLNSC TYPE XMLNSC.XmlDeclaration;
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Version = '1.0';
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-8';
DECLARE space1 NAMESPACE 'http://www.krakow.uc.gov.pl/Intrastat/IST-XML/xsd/ISTw1r1.xsd';
SET OutputRoot.XMLNSC.space1:IST.(XMLNSC.NamespaceDecl)xmlns = space1;
SET OutputRoot.XMLNSC.space1:IST.(XMLNSC.Attribute)Email = 'email@email.com' ;
CREATE LASTCHILD OF OutputRoot.XMLNSC.space1:IST NAMESPACE space1 NAME 'Deklaracja';
SET OutputRoot.XMLNSC.space1:IST.space1:Deklaracja.(XMLNSC.Attribute)NrWlasny = '04IST987';
SET OutputRoot.XMLNSC.space1:IST.space1:Deklaracja.(XMLNSC.Attribute)UC = '050100'; |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 05, 2011 5:10 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kumar.shanj wrote: |
SET OutputRoot.Properties.MessageDomain = 'XMLNS'; |
kumar.shanj wrote: |
CREATE FIRSTCHILD OF OutputRoot.XMLNSC TYPE XMLNSC.XmlDeclaration; |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|