ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Not able to open XML output file in IE

Post new topic  Reply to topic Goto page 1, 2, 3  Next
 Not able to open XML output file in IE « View previous topic :: View next topic » 
Author Message
mpong
PostPosted: Mon Nov 09, 2015 1:14 am    Post subject: Not able to open XML output file in IE Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Hi All,

I have XML output message generated in my flow and I am able to open it with IE or xml edition and I can see xml version tag <?xml version="1.0"?> in the output message correctly.

But I want to include encoding as below and I have included below ESQL code

<?xml version="1.0" encoding="UTF-16"?>

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-16';


Once above line is added I could see the result when I open it with text editor but when I open it with it with IE or XML editor it is blank and there is no xml validation failure.

Testers use IE to see the results and I am currently running the code commenting above line. Please suggest.
Back to top
View user's profile Send private message
maurito
PostPosted: Mon Nov 09, 2015 1:23 am    Post subject: Re: Not able to open XML output file in IE Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

mpong wrote:
Hi All,

I have XML output message generated in my flow and I am able to open it with IE or xml edition and I can see xml version tag <?xml version="1.0"?> in the output message correctly.

But I want to include encoding as below and I have included below ESQL code

<?xml version="1.0" encoding="UTF-16"?>

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-16';


Once above line is added I could see the result when I open it with text editor but when I open it with it with IE or XML editor it is blank and there is no xml validation failure.

Testers use IE to see the results and I am currently running the code commenting above line. Please suggest.

are you sure you want utf-16 and not UTF-8 ?
UTF-16 is variable-length, code points are encoded with one or two 16-bit code units, so minimum length for a character is 2 bytes
Back to top
View user's profile Send private message
mpong
PostPosted: Mon Nov 09, 2015 2:01 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Thanks for the response, I need to check with the target team, if they are ok to receive with UTF 8.

I am facing the same issue when i add DTD in ESQL.

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-8';

SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)* NAME = 'ledesxml SYSTEM http://www.ledes.org/ledes2000.dtd';
Back to top
View user's profile Send private message
maurito
PostPosted: Mon Nov 09, 2015 2:05 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

mpong wrote:
Thanks for the response, I need to check with the target team, if they are ok to receive with UTF 8.

I am facing the same issue when i add DTD in ESQL.

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-8';

SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)* NAME = 'ledesxml SYSTEM http://www.ledes.org/ledes2000.dtd';


I believe it has been suggested to you by timber to use the XMLNS domain to manipulate DTDs.
Back to top
View user's profile Send private message
mpong
PostPosted: Mon Nov 09, 2015 2:10 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Yes, but I have removed "" outside http://www.ledes.org/ledes2000.dtd.

SET OutputRoot.XMLNSC.(XMLNSC.DocumentType)* NAME = 'ledesxml SYSTEM http://www.ledes.org/ledes2000.dtd';


Do you mean say we can not open xml file in IE when we include DTD in XMLNSC domain.
Back to top
View user's profile Send private message
maurito
PostPosted: Mon Nov 09, 2015 2:15 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

mpong wrote:


Do you mean say we can not open xml file in IE when we include DTD in XMLNSC domain.

NO, I did not say that. You might be generating the wrong thing, why don't you copy and paste here the first 2 - 3 lines of your xml ?
Back to top
View user's profile Send private message
mpong
PostPosted: Mon Nov 09, 2015 2:32 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

it worked after I changed XMLNSC back to XMLNS, but how do i add encoding now

SET OutputRoot.XMLNS = InputRoot.XMLNSC;

SET OutputRoot.XMLNS.(XML.DocTypeDecl)ledesxml = '';

SET OutputRoot.XMLNS.(XML.DocTypeDecl).(XML.SystemId) = 'http://www.ledes.org/ledes2000.dtd';
Back to top
View user's profile Send private message
maurito
PostPosted: Mon Nov 09, 2015 2:35 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

mpong wrote:
it worked after I changed XMLNSC back to XMLNS, but how do i add encoding now

SET OutputRoot.XMLNS = InputRoot.XMLNSC;

SET OutputRoot.XMLNS.(XML.DocTypeDecl)ledesxml = '';

SET OutputRoot.XMLNS.(XML.DocTypeDecl).(XML.SystemId) = 'http://www.ledes.org/ledes2000.dtd';


try XML.encoding with the XMLNS domain. Search for XML.encoding in the knowledge centre.
Back to top
View user's profile Send private message
mpong
PostPosted: Mon Nov 09, 2015 2:52 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Thanks for the response. Tried with XML.encoding with the XMLNS domain did not work, knowledge centre says below info on XML.encoding but I could not achieve it in ESQL.

The value of the encoding element is a string that corresponds to the value of the encoding string in the declaration. In the following example, the encoding element has a value of UTF-8.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE s1 PUBLIC "http://www.ibm.com/example.dtd" "example.dtd">
<s1>.........</s1>
Back to top
View user's profile Send private message
timber
PostPosted: Mon Nov 09, 2015 2:55 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

This line:
Quote:
SET OutputRoot.XMLNS = InputRoot.XMLNSC;
...will remove all parser-specific field types from the message tree.
As a result, all attributes in InputRoot.XMLNSC will become tags in OutputRoot.XMLNS. Other XML artifacts may be changed too.

In general, it's a bad idea to mix XMLNSC and XMLNS in the same message flow Sorry for not making that clear earlier.
Back to top
View user's profile Send private message
maurito
PostPosted: Mon Nov 09, 2015 2:59 am    Post subject: Reply with quote

Partisan

Joined: 17 Apr 2014
Posts: 358

mpong wrote:
Thanks for the response. Tried with XML.encoding with the XMLNS domain did not work,

what have you tried ?...

Quote:

The encoding attribute is represented by a syntax element with field type ‘XML.encoding', and is always a child of an XML.XmlDecl syntax element.
Back to top
View user's profile Send private message
timber
PostPosted: Mon Nov 09, 2015 3:02 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

My previous post gave you a problem and did not mention a solution.

If you want to continue with using XMLNSC in your message flow, then you could try this:
- Do not use XMLNS at all
- Use the 'XMLNSC.Bitstream' field type to output the DTD as a hard-coded, pre-formatted string. It's a bit of a hack, but if your output CCSID is fixed then it is fairly safe.

Let me know if you want to explore that option.
Back to top
View user's profile Send private message
mpong
PostPosted: Mon Nov 09, 2015 3:02 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

This is a migration from biztalk to IIB, biztalk is currently sending output file in xmlns doming and it is working fine with all declaration and DTD. In IIB i have changed it to XMLNSC but I am facing issue on DTD.

Now I changed back to XMLSC everything works fine except encoding on declaration as I am not able to write it. Any suggestion how to put it.
Back to top
View user's profile Send private message
timber
PostPosted: Mon Nov 09, 2015 3:05 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
verything works fine except encoding on declaration as I am not able to write it. Any suggestion how to put it.
I thought you said that it looks OK in a text editor. It's only IE that struggles to view it.
Did I get that right?
Back to top
View user's profile Send private message
mpong
PostPosted: Mon Nov 09, 2015 3:10 am    Post subject: Reply with quote

Disciple

Joined: 22 Jan 2010
Posts: 164

Yes, using XMLNSC domain with UTF 16 and DTD, it looks ok in text editor but it is blank in IE.

Using XMLNS domain it is ok in text editor and IE as well but not able to plug encoing in XML declaration.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2, 3  Next Page 1 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Not able to open XML output file in IE
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.