Author |
Message
|
wraymore |
Posted: Tue May 06, 2008 10:33 am Post subject: Resolved: Applied FixPack 6 to WMB6.0.0.5 - ESQL not working |
|
|
Centurion
Joined: 16 Aug 2005 Posts: 114 Location: Burlington, NC USA
|
We applied Fix Pack 6 to WMB6.0.0.5 and now the following ESQL does not work:
CREATE COMPUTE MODULE TRD_EDIManager_UpdateMsg
CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN
/*
Author: Weldon Moore
Updated: 3/17/2008
PROGRAM NOTES:
This program adds the Updated HL7 String to the XMLWrapper
as the payload
VERSION NOTES:
Version 1
- Replace the payload with the updated HL7 String
*/
CALL CopyEntireMessage();
DECLARE triadMsgNS NAMESPACE 'http://www.labcorp.com/02/11/2008/V1/TriadMessage.xsd';
DECLARE triadNS NAMESPACE 'http://www.labcorp.com/02/11/2008/V1/TriadCommon.xsd';
DECLARE triadPayld REFERENCE TO OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadPayload;
SET triadPayld.triadNS:Payload = Null;
SET triadPayld.triadNS:Payload.(XML.Attribute)type = 'HL7';
SET triadPayld.triadNS:Payload.(XML.Attribute)format = 'TEXT';
SET triadPayld.triadNS:Payload.(XML.Attribute)version = '1.0';
SET triadPayld.triadNS:Payload.(XML.CDataSection) = CAST(Environment.HL7Data.HL7Work AS CHAR);
RETURN TRUE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
Getting the following error:
Whilst writing the XMLNS message, element 'type' was found to be in scope of a default namespace, but this element does not have a namespace defined.
This error can occur if the NamespaceDecl correlation name has been used to create a default namespace for a parent element, and a child element has been created that does not have a namespace. If you have defined a default namespace in your output message tree, then all elements that are in scope of this default namespace must be defined to be in a namespace. Modify the output message tree so that element 'type' is defined to be in a namespace. If element 'type' belongs to the default namespace, then this element needs to be created in the default namespace.
Last edited by wraymore on Thu May 15, 2008 4:00 am; edited 1 time in total |
|
Back to top |
|
 |
kimbert |
Posted: Tue May 06, 2008 7:24 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Very surprising. I know what the error message means ( and I expect you do too ) but I cannot explain why applying FP6 should cause it to start happening.
I suggest that you double-check that it works on 6.0.0.5.
If it does
- Insert a Trace node immediately before the output node and save its output
- Apply FP6 and save the Trace node output again
- Compare the two outputs
If they are different, raise a PMR. |
|
Back to top |
|
 |
wraymore |
Posted: Wed May 07, 2008 6:28 am Post subject: |
|
|
Centurion
Joined: 16 Aug 2005 Posts: 114 Location: Burlington, NC USA
|
Thanks, Kimbert. I have forwarded your reply to our MQSupport staff and they are looking at gathering more data and perhaps entering a PMR. |
|
Back to top |
|
 |
mgk |
Posted: Wed May 07, 2008 8:40 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi, I'm not saying this will help with your problem, but your code appears to be wrong. This line refers to XMLNSC:
Code: |
DECLARE triadPayld REFERENCE TO OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadPayload; |
Where as these lines refer to XML.Attribute. These should be
etc
Code: |
SET triadPayld.triadNS:Payload.(XML.Attribute)type = 'HL7' |
etc...
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
wraymore |
Posted: Thu May 08, 2008 11:59 am Post subject: |
|
|
Centurion
Joined: 16 Aug 2005 Posts: 114 Location: Burlington, NC USA
|
I changed to XMLNSC.Attribute and XMLNSC.CDataValue, however that only got the same outcome. I went back to the original code for the posting.
In the meantime, I went in and moved the elements from the InputRoot.XMLNSC to the OutputRoot.XMLNSC from top to bottom and this code is working.  |
|
Back to top |
|
 |
kimbert |
Posted: Mon May 12, 2008 1:07 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I didn't understand your description of the fix, but I'm glad it's working  |
|
Back to top |
|
 |
wraymore |
Posted: Thu May 15, 2008 3:59 am Post subject: |
|
|
Centurion
Joined: 16 Aug 2005 Posts: 114 Location: Burlington, NC USA
|
I replaced the code with
CALL CopyMessageHeaders();
DECLARE triadMsgNS NAMESPACE 'http://www.labcorp.com/02/11/2008/V1/TriadMessage.xsd';
DECLARE triadNS NAMESPACE 'http://www.labcorp.com/02/11/2008/V1/TriadCommon.xsd';
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Version = '1.0';
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-8';
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.(XMLNSC.NamespaceDecl)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance' ;
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.(XMLNSC.NamespaceDecl)xmlns:xsd = 'http://www.w3.org/2001/XMLSchema' ;
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.(XMLNSC.NamespaceDecl)xmlns = 'http://www.labcorp.com/02/11/2008/V1/TriadMessage.xsd' ;
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.(XMLNSC.NamespaceDecl)xmlns:triad = 'http://www.labcorp.com/02/11/2008/V1/TriadCommon.xsd';
DECLARE InTriadRouteInfo REFERENCE TO InputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadRouteInfo;
DECLARE J INTEGER 1;
DECLARE I INTEGER 1;
SET J = CARDINALITY(InTriadRouteInfo.*[]);
WHILE I <= J DO
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadRouteInfo.triadNS:*[I] = InTriadRouteInfo.*[I];
SET I = I + 1;
END WHILE;
DECLARE InTriadSourceInfo REFERENCE TO InputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadSourceInfo;
SET J = 1;
SET I = 1;
SET J = CARDINALITY(InTriadSourceInfo.*[]);
WHILE I <= J DO
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadSourceInfo.triadNS:*[I] = InTriadSourceInfo.*[I];
SET I = I + 1;
END WHILE;
DECLARE InTriadDestinationInfo REFERENCE TO InputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadDestinationInfo;
SET J = 1;
SET I = 1;
SET J = CARDINALITY(InTriadDestinationInfo.*[]);
WHILE I <= J DO
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadDestinationInfo.triadNS:*[I] = InTriadDestinationInfo.*[I];
SET I = I + 1;
END WHILE;
DECLARE InTriadDeliveryOptions REFERENCE TO InputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadDestinationInfo.triadNS:DeliveryOptions;
SET J = 1;
SET I = 1;
SET J = CARDINALITY(InTriadDeliveryOptions.*[]);
WHILE I <= J DO
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadDestinationInfo.triadNS:DeliveryOptions.triadNS:*[I] = InTriadDeliveryOptions.*[I];
SET I = I + 1;
END WHILE;
DECLARE InTriadEDIOptions REFERENCE TO InputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadDestinationInfo.triadNS:DeliveryOptions.triadNS:EDIOptions;
SET J = 1;
SET I = 1;
SET J = CARDINALITY(InTriadEDIOptions.*[]);
WHILE I <= J DO
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadDestinationInfo.triadNS:DeliveryOptions.triadNS:EDIOptions.triadNS:*[I] = InTriadEDIOptions.*[I];
SET I = I + 1;
END WHILE;
And then replaced the
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadPayload.triadNS:Payload.(XMLNSC.Attribute)type = 'HL7';
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadPayload.triadNS:Payload.(XMLNSC.Attribute)format = 'TEXT';
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadPayload.triadNS:Payload.(XMLNSC.Attribute)version = '1.0';
SET OutputRoot.XMLNSC.triadMsgNS:TriadMessage.triadMsgNS:TriadPayload.triadNS:Payload.(XMLNSC.CDataValue) = CAST(Environment.HL7Data.HL7Work AS CHAR);
RETURN TRUE; |
|
Back to top |
|
 |
|