|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
DOCTYPE in XML document |
« View previous topic :: View next topic » |
Author |
Message
|
CHERIANV |
Posted: Wed Feb 23, 2005 12:10 pm Post subject: DOCTYPE in XML document |
|
|
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 |
|
 |
Craig B |
Posted: Wed Feb 23, 2005 1:23 pm Post subject: |
|
|
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 |
|
 |
CHERIANV |
Posted: Thu Feb 24, 2005 7:26 am Post subject: DOCTYPE element error |
|
|
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 |
|
 |
CHERIANV |
Posted: Thu Feb 24, 2005 9:10 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|