Author |
Message
|
jr_martin |
Posted: Sun Sep 21, 2008 5:03 am Post subject: xml declaration issue in Mapping node |
|
|
 Apprentice
Joined: 24 Aug 2005 Posts: 36 Location: NY
|
Hi,
I am trying to generate the following xml declaration in mapping node.
1.How can I get <?xml version="1.0" encoding="UTF-8"?> instead of <?xml version="1.0" encoding="ISO-8859-1"?>
2. How can I get rid of [xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xml="http://www.w3.org/XML/1998/namespace] in the following line?
<Map_Message xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xml="http://www.w3.org/XML/1998/namespace>
.....................
MessageSet Settings:
Message Domain: XMLNSC
XML wire format settings:Suppress xml declaration unchecked, xml version: 1.0, xml encoding: As document text
input message:
<?xml version="1.0" encoding="UTF-8"?>
<Map_Message>
<Map_Header>
<from>source</from>
<to>destination</to>
</addressing>
</Map_Header>
<Map_Body>
<TableA>
<col1>460</col1>
<col2>7402</col2>
</TableA>
</Map_Body>
</Map_Message>
output message:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Map_Message xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xml="http://www.w3.org/XML/1998/namespace>
<Map_Header>
<from>source</from>
<to>destination</to>
</addressing>
</Map_Header>
<Map_Body>
<TableA>
<col1>460</col1>
<col2>7402</col2>
</TableA>
</Map_Body>
</Map_Message> |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Sep 21, 2008 10:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you tried setting the OutputRoot.Properties.CodedCharSetId to 1208 ?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Sun Sep 21, 2008 11:52 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
First, I should make you aware that XMLNSC does not use the message set. It validates against the shemas in the message set, but it does not use any of the information in the messageSet.mset file. Support for some of the options in messageSet.mset might ( or might not ) be added in a future release.
So if you are using XMLNSC on the output side, then the output message will depend only on the contents of the output tree which you have built. I suggest that you look at the output tree using the debugger or a Trace node, and then modify your map until it is correct.
But are you quite certain that you are using the XMLNSC domain for outputting this messsage? Some of your symptoms look like previously-encountered MRM XML symptoms. |
|
Back to top |
|
 |
jr_martin |
Posted: Mon Sep 22, 2008 8:01 am Post subject: |
|
|
 Apprentice
Joined: 24 Aug 2005 Posts: 36 Location: NY
|
Thanks for your help. After setting CCSID to 1208, I see encoding="UTF-8" in the output message. Also, got rid of xsi/xsd references by unchecking "Use namespaces" check box. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Sep 22, 2008 11:15 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Also, got rid of xsi/xsd references by unchecking "Use namespaces" check box. |
So my guess was correct. You are using MRM, not XMLNSC on the output side. |
|
Back to top |
|
 |
jr_martin |
Posted: Tue Sep 23, 2008 4:41 am Post subject: |
|
|
 Apprentice
Joined: 24 Aug 2005 Posts: 36 Location: NY
|
|
Back to top |
|
 |
|