Author |
Message
|
mca |
Posted: Thu Sep 06, 2007 11:25 am Post subject: Building DocType XML header |
|
|
Disciple
Joined: 09 Mar 2005 Posts: 196
|
I am trying to build
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.1.010/cXML.dtd">
in my output XML message using ESQL. And for that i tried the following ESQL statements and it doesn't work. Moreover these two statements are preventing building the XML.
SET OutputRoot.XML.(XML.DocTypeDecl)cXML = '';
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId) = 'http://xml.cXML.org/schemas/cXML/1.1.010/cXML.dtd';
I refered IBM documentation and they recommended using the above code to build DOCTYPE in XML message. But for some reason it doesn't work. Please advice. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Sep 06, 2007 12:49 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
But for some reason it doesn't work. Please advice. |
No. Not until you take the time to describe your problem properly. All I know so far is 'it doesn't work'.
You should not be using the XML domain in a new message flow. Use XMLNSC or XMLNS. |
|
Back to top |
|
 |
mca |
Posted: Thu Sep 06, 2007 5:48 pm Post subject: |
|
|
Disciple
Joined: 09 Mar 2005 Posts: 196
|
Thanks for your reply. I tried changing domain to XMLNS, still same issue. I will explian my problem in detail.
I am trying to construct an XML whose header part looks like this
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.1.010/cXML.dtd">
<cXML payloadID="PAC_GET_RESOURCES_B2B2007-08-27T08:14:47-05:00" timestamp="2007-08-27T08:14:47-05:00">
<Header>
<From>
-----
</From>
</Header>
</cXML>
For constructing this XML i coded this way in ESQL
Line 1: SET OutputRoot.XMLNS.(XML.XmlDecl) = '';
Line 2: SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Version) = '1.0';
Line 3: SET OutputRoot.XMLNS.(XML.XmlDecl).(XML."Encoding") = 'UTF-8';
Line 4: SET OutputRoot.XMLNS.(XML.DocTypeDecl)cXML = '';
Line 5: SET OutputRoot.XMLNS.(XML.DocTypeDecl).(XML.SystemId) = 'http://xml.cXML.org/schemas/cXML/1.1.010/cXML.dtd';
Line 6: SET OutputRoot.XMLNS.cXML.(XML.Attribute)payloadID = 'PAC_GET_RESOURCES_B2B2006-06-12T12:43:48-05:00';
Line 7: SET OutputRoot.XMLNS.cXML.(XML.Attribute)timestamp = '2006-06-12T12:43:49-05:00';
Lines 4 and 5 are not working. If i comment them off the required XML is being generated with out the DOCTYPE header part in output XML. But if i include them in the code the output XMl itself is not being generated. It throws 'No valid Body Found in output XML' exception. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 07, 2007 3:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
In order to explain your problem in detail, you need to explain what "not working" means.
Are you getting errors? Are you getting something different than what you expect?
What are the results you are getting from that code?
Once you have that information, then you can start thinking about why the code you have written produces that result. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Sep 07, 2007 4:03 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Can't see anything wrong with your code. Can you please post
- the BIP number of the error
- the version and FP level of WMB that you are using
- a trace of your message tree just before the output node ( use a Trace node ). |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Sep 07, 2007 5:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you tried:
Quote: |
Line 6: SET OutputRoot.XMLNS.(XML.Element)cXML.(XML.Attribute)payloadID = 'PAC_GET_RESOURCES_B2B2006-06-12T12:43:48-05:00'; |
_________________ MQ & Broker admin |
|
Back to top |
|
 |
|