Author |
Message
|
pfaulkner |
Posted: Mon Feb 24, 2003 1:12 pm Post subject: encoding attribute |
|
|
Master
Joined: 18 Mar 2002 Posts: 241 Location: Colorado, USA
|
Can anyone tell me why my xml declaration does not show the encoding??
The manual shows it should look like this:
<?xml version="1.0" encoding=".."?>
but mine is:
<?xml version="1.0"?>
From searching the Board I noticed someone else complained about the same problem and was told to use a Compute node to add it. Surely this should be generated automatically????
Is this ia bug? |
|
Back to top |
|
 |
maxis |
Posted: Mon Feb 24, 2003 1:49 pm Post subject: |
|
|
Centurion
Joined: 25 Jun 2002 Posts: 144
|
how about posting your ESQL .. ? that will help in figuring y youre not getting encoding ? |
|
Back to top |
|
 |
pfaulkner |
Posted: Mon Feb 24, 2003 1:55 pm Post subject: |
|
|
Master
Joined: 18 Mar 2002 Posts: 241 Location: Colorado, USA
|
my point was I was expecting the Encoding to be generated based on the parms set in the Message Set and not via ESQL.
It's declaring the xml version so shouldn't it also declare the encoding?? |
|
Back to top |
|
 |
kirani |
Posted: Mon Feb 24, 2003 2:52 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What CSD level you are at? I thought it was fixed in CSD3. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
pfaulkner |
Posted: Mon Feb 24, 2003 3:03 pm Post subject: |
|
|
Master
Joined: 18 Mar 2002 Posts: 241 Location: Colorado, USA
|
CSD2.....so that is good news!
Can you help me with a workaround in the meantime.
According to the doc I need to do the following:
-- Create an XML Declaration
SET OutputRoot.XML.(XML.XmlDecl) = '';
-- Set the Version within the XML Declaration
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) = '1.0';
-- Set the Encoding within the XML Declaration
SET OutputRoot.XML.(XML.XmlDecl).(XML."Encoding") = 'UTF-8';
-- Set Standalone within the XML Declaration
SET OutputRoot.XML.(XML.XmlDecl).(XML.Standalone) = 'no';
But I my message is parsed as MRM XML???
So how would I add this? |
|
Back to top |
|
 |
kirani |
Posted: Mon Feb 24, 2003 3:47 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
First convert your MRM-XML message into BLOB format using RCD node, connect out terminal of this node to a Compute node. In a compute node select "Copy message headers" and use following ESQL code to attach the XML header
Code: |
SET OutputRoot."BLOB"."BLOB" = CAST('<?xml version="1.0" encoding="UTF-8" standalone="no"?>' AS BLOB CCSID InputRoot.MQMD.CodedCharSetId) || InputRoot."BLOB"."BLOB";
|
Hope this helps. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
pfaulkner |
Posted: Tue Feb 25, 2003 8:32 am Post subject: |
|
|
Master
Joined: 18 Mar 2002 Posts: 241 Location: Colorado, USA
|
thanks,
I was able to do it by using RCD to convert to straight XML and then adding the Encoding stuff. |
|
Back to top |
|
 |
|