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 » DOCTYPE in XML document

Post new topic  Reply to topic
 DOCTYPE in XML document « View previous topic :: View next topic » 
Author Message
CHERIANV
PostPosted: Wed Feb 23, 2005 12:10 pm    Post subject: DOCTYPE in XML document Reply with quote

Apprentice

Joined: 15 Feb 2002
Posts: 43
Location: New York

Hi,
Is it possible to create the following DOCTYPE line the XML doc. in the ESQL as the target application is expecting it... Is it possible to create an XML message with this line ?


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE test SYSTEM 'test.dtd' >
<Update_SAP_OrderStatus version='1.0'>

</Update_SAP_OrderStatus>

I tried the following but it didnt work . Any ideas ?

SET OutputRoot.Properties.MessageDomain = 'XML';
SET OutputRoot.Properties.MessageFormat = 'XML';
SET OutputRoot.MQMD.Format = 'MQSTR';
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.(XML.DocTypeDecl)test = '';

SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId) = 'test.dtd';


Regards,
Cherian
Back to top
View user's profile Send private message
Craig B
PostPosted: Wed Feb 23, 2005 1:23 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

Hi,

When you say that it did not work, can you give details of this? Did you get an output message that did not contain your DOCTYPE? Did you get an exception from the XML Writer? If you did get an exception, can your give details of it?
_________________
Regards
Craig
Back to top
View user's profile Send private message
CHERIANV
PostPosted: Thu Feb 24, 2005 7:26 am    Post subject: DOCTYPE element error Reply with quote

Apprentice

Joined: 15 Feb 2002
Posts: 43
Location: New York

Am able to get the DOCTYPE line to the XML doc. but it's failing with the following error posted below when I try to assign the DOCTYPE the same as root element "Update_SAP_OrderStatus" . It works fine when I try to assign it as something else other than the root elemetnt .

For example, here's an XML I would like to create :
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Update_SAP_OrderStatus SYSTEM 'Update_SAP_OrderStatus_PTX30.dtd' >
<Update_SAP_OrderStatus version='1.0'>
<OrderStatus> <Status>C</Status>
</OrderStatus>
</Update_SAP_OrderStatus>

Here's the error message that I am getting when trying to create it :
BIP5005E No valid body of the document could be
found.
Explanation: There should be one, and only one, top
level element of type Element or EmptyElement and
this is not the case for the current message.
User Response: Check that the XML message being
passed in is a well formed XML message that adheres
to the XML specification and that only one of the above
exists as a child of the root.


Here's my ESQL code :

SET OutputRoot.Properties.MessageDomain = 'XML';
SET OutputRoot.Properties.MessageFormat = 'XML';
SET OutputRoot.MQMD.Format = 'MQSTR';
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.(XML.DocTypeDecl)SAP_OrderStatus = '';
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId) = 'Update_SAP_OrderStatus_PTX30.dtd';
Back to top
View user's profile Send private message
CHERIANV
PostPosted: Thu Feb 24, 2005 9:10 am    Post subject: Reply with quote

Apprentice

Joined: 15 Feb 2002
Posts: 43
Location: New York

I think I found the solution :

I had to use (XML.Element) to assign the XML elements to create the XML message to differentiate the DOCTYPE and the XML body and it worked...


Thanks...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DOCTYPE in XML document
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.