|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
!DOCTYPE question |
« View previous topic :: View next topic » |
Author |
Message
|
schroederms |
Posted: Wed Nov 22, 2006 7:04 am Post subject: !DOCTYPE question |
|
|
 Disciple
Joined: 21 Jul 2003 Posts: 169 Location: IA
|
I've checked the forum and tried somethings I've found out there but am still having an issue building the HTTP response with the !DOCTYPE looking correct.
Here is the esql:
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.HTTPInputHeader = InputRoot.HTTPInputHeader;
SET OutputRoot.XML.(XML.XmlDecl) = InputRoot.XML.(XML.XmlDecl);
SET OutputRoot.XML.(XML.DocTypeDecl) = InputRoot.XML.(XML.DocTypeDecl);
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId) = 'http://xml.cxml.org/schemas/cXML/1.2.011/cXML.dtd';
SET OutputRoot.XML.cXML = InputRoot.XML.cXML;
SET OutputRoot.XML.cXML.(XML.Attribute)version = InputRoot.XML.cXML.(XML.Attribute)version;
SET OutputRoot.XML.cXML.(XML.Attribute)payloadID = 'payload id';
SET OutputRoot.XML.cXML.(XML.Attribute)timestamp = 'current time';
SET OutputRoot.XML.cXML.(XML.Attribute)xml:lang = InputRoot.XML.cXML.(XML.Attribute)xml:lang;
SET OutputRoot.XML.cXML.cXML.Response.Status = '';
SET OutputRoot.XML.cXML.cXML.Response.Status.(XML.Attribute)code = '200';
SET OutputRoot.XML.cXML.cXML.Response.Status.(XML.Attribute)text = 'OK';
This is what I want it to look like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.013/cXML.dtd">
<cXML payloadID="9949494@cxml.workchairs.com" xml:lang="en-US"
timestamp="1999-03-12T18:39:09-08:00">
<Response>
<Status code="200" text="OK"/>
</Response>
</cXML>
This is what is being produced, it is taking the cXML from the !DOCTYPE and creating its own level, causing what is produced to have TWO cXML tag levels.
)
(0x01000010):XML = (
(0x05000018):XML = (
(0x06000011): = '1.0'
(0x06000012): = 'UTF-8'
)
(0x05000020):cXML = (
(0x06000008): = 'http://xml.cxml.org/schemas/cXML/1.2.011/cXML.dtd'
(0x01000000):cXML = (
(0x03000000):payloadID = 'payload id'
(0x03000000):timestamp = 'current time'
(0x01000000):Response = (
(0x01000000):Status = (
(0x02000000): = ''
(0x03000000):code = '200'
(0x03000000):text = 'OK'
)
)
)
)
)
)
Any ideas?
Thanks,
Mike |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 22, 2006 7:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Please at least use the XMLNS parser. XML domain is deprecated.
I would normally suggest you use the XMLNSC parser - but it's not clear to me right now (not that I've tried it) how to create a System ID using XMLNSC. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
schroederms |
Posted: Wed Nov 22, 2006 7:25 am Post subject: |
|
|
 Disciple
Joined: 21 Jul 2003 Posts: 169 Location: IA
|
Jeff,
I changed the parser on the HTTP input node to XMLNS and I get the same results.
mike |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 22, 2006 7:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, I honestly didn't expect it to fix the problem. But it needed to be changed anyway.
I would try simplifying the code a bit and see what comes out.
Comment out or remove everything after you copy InputRoot.XMLNS.cXML to OutputRoot.XMLNS, and see if you still have two cXML elements. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|