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 » XML Declaration is needed

Post new topic  Reply to topic
 XML Declaration is needed « View previous topic :: View next topic » 
Author Message
jbacskai
PostPosted: Tue Sep 21, 2004 11:43 am    Post subject: XML Declaration is needed Reply with quote

Apprentice

Joined: 30 Dec 2002
Posts: 26
Location: Hungary

Hi All,

WMQI 2.1
I need the <?xml version=’1.0’> XML declaration in my output message.
How could I put it in?
I haven't declared the message in any message set and I would not like to do it.

Please send an example!
SET OutputRoot.XML.Test_msg.???

Regards,
JBacskai
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jbacskai
PostPosted: Tue Sep 21, 2004 12:14 pm    Post subject: Reply with quote

Apprentice

Joined: 30 Dec 2002
Posts: 26
Location: Hungary

OK I found it!

SET OutputRoot.XML.(XML.XmlDecl) = '';
SET OutputRoot.XML.(XML.XmlDecl.Version) = '1.0';
SET OutputRoot.XML.(XML.XmlDecl."Encoding") = 'UTF-8';
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Testo
PostPosted: Wed Feb 02, 2005 2:48 am    Post subject: Similar situation but in XMLNS... Reply with quote

Centurion

Joined: 26 Feb 2003
Posts: 120
Location: Italy - Milan

For the XMLNS domain, I have adapted your instructions in the following way:

Code:

SET OutputRoot.XMLNS.(XML.XmlDecl) = '';
SET OutputRoot.XMLNS.(XML.XmlDecl.Version) = '1.0';
SET OutputRoot.XMLNS.(XML.XmlDecl."Encoding") = 'UTF-8';


but it does not work.

What am I missing?

Thanks,
Andrea Tedone
IBM IT Specialist[/code]
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Testo
PostPosted: Wed Feb 02, 2005 4:33 am    Post subject: Help! Reply with quote

Centurion

Joined: 26 Feb 2003
Posts: 120
Location: Italy - Milan

Here is my chunck of code... anyone able to help me?

Code:

                                CALL CopyMessageHeaders();
      -- CALL CopyEntireMessage();
      
      DECLARE NS1 NAMESPACE 'http://www.ibm.com';
      
      -- SET OutputRoot.Properties.MessageDomain = 'XML';
      
      CREATE FIRSTCHILD OF OutputRoot.XML;
      
      -- XML Declarations
      SET OutputRoot.XML.(XML.XmlDecl) = '';
      SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) = '1.0';
      SET OutputRoot.XML.(XML.XmlDecl).(XML."Encoding") = 'UTF-8';
      
      SET OutputRoot.XML = InputRoot.XMLNS.NS1:msg;
         
      RETURN TRUE;


and the XML message in input is something like

Code:

<?xml version="1.0" encoding="utf-8"?>
<msg xmlns="http://www.ibm.com">
   <RuleEngineDataset xmlns=
   ...
   </RuleEngineDataset >
</msg>


Help!

Thanks
Andrea
Back to top
View user's profile Send private message Send e-mail MSN Messenger
JLRowe
PostPosted: Wed Feb 02, 2005 4:40 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

You need to use the XMLNS parser, you are using the XML parser which does not support namespaces.

e.g. SET OutputRoot.XMLNS.(XML.XmlDecl) = '';
Back to top
View user's profile Send private message Send e-mail
Testo
PostPosted: Wed Feb 02, 2005 5:27 am    Post subject: already tried Reply with quote

Centurion

Joined: 26 Feb 2003
Posts: 120
Location: Italy - Milan

already tried also with OutputRoot.XMLNS.(XML.XmlDecl) = '' and also for the other instructions but with no success....

Any other idea?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
nathanw
PostPosted: Thu Feb 03, 2005 1:54 am    Post subject: Reply with quote

Knight

Joined: 14 Jul 2004
Posts: 550

I assume you are actually settinig the default domain to XMLNS and not XML

Code:
DECLARE xmlns NAMESPACE 'urn:hl7-org:v3';
DECLARE xsi NAMESPACE 'urn:hl7-org:v3 ../Schemas/PORX_MT024001UK05.xsd';

SET "OutputRoot"."XMLNS"."DispenseClaimInformation".(XML.NamespaceDecl)xmlns:space1 = 'urn:hl7-org:v3';
SET "OutputRoot"."XMLNS"."DispenseClaimInformation".xmlns:data1 = 'http://www.w3.org/2001/XMLSchema-instance';


I use the code above for mine in V5

Hope that helps

Also I have a ResetContent Decriptor Node in the flow setting it to XMLNS
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML Declaration is needed
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.