|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XML msg - element bad positioned... |
« View previous topic :: View next topic » |
Author |
Message
|
Testo |
Posted: Fri Sep 12, 2003 2:15 am Post subject: XML msg - element bad positioned... |
|
|
 Centurion
Joined: 26 Feb 2003 Posts: 120 Location: Italy - Milan
|
I'm trying to help a collegue remotely.
He has an XML msg that in input is
<?xml version='1.0' ?>
<!DOCTYPE DIECOM_InterProcessProtocol SYSTEM "/var/xml/dtd/DiecomC.dtd">
<DIECOM_InterProcessProtocol>
<Status_Cmd>OPEN</Status_Cmd>
<Command>CCR</Command>
<ACTION ACTION_ID = "TSTACT11">
<INPUT_OBJECT><Software_Baseline Part_Number = "EE001" Part_Version = "---"/>
</INPUT_OBJECT>
<OUTPUT_OBJECT>
<Software_Baseline Part_Number = "EE002" Part_Version = "---"/>
</OUTPUT_OBJECT>
</ACTION>
<Context>LCA To PVCS</Context>
</DIECOM_InterProcessProtocol>
then is managed by this eSQL code:
SET "OutputRoot"."Properties"."MessageDomain"='XML';
SET "OutputRoot"."MQMD"."ReplyToQ"='PVCS_REPLY';
SET "OutputRoot"."MQMD"."ReplyToQMgr"=' ';
IF( "InputRoot"."WfMessage"."WfMessageHeader"."ResponseRequired"='Yes')
THEN
SET "OutputRoot"."MQMD"."MsgType" = MQMT_REQUEST;
End IF;
DECLARE CAMPO CHARACTER;
-- SET "OutputRoot"."MRM"."ECO_Number"= "InputBody"."WfMessage"."ActivityImplInvoke"."ProgramInputData"."ChangeRequest"."ECO_Number";
SET OutputRoot.XML.DIECOM_InterProcessProtocol =
"InputBody"."WfMessage"."ActivityImplInvoke"."ProgramInputData"."ChangeRequest"."XMLIPP".DIECOM_InterProcessProtocol;
-- per ovviare ai doppi apici tradotti in "
SET CAMPO = "InputBody"."WfMessage"."ActivityImplInvoke"."ProgramInputData"."ChangeRequest"."XMLIPP".DIECOM_InterProcessProtocol."Status_Cmd";
SET OutputRoot.XML.DIECOM_InterProcessProtocol.Status_Cmd.(XML.Content) = '';
SET OutputRoot.XML.DIECOM_InterProcessProtocol.Status_Cmd.(XML.AsisElementContent) = CAMPO;
SET CAMPO = "InputBody"."WfMessage"."ActivityImplInvoke"."ProgramInputData"."ChangeRequest"."XMLIPP".DIECOM_InterProcessProtocol."Command";
SET OutputRoot.XML.DIECOM_InterProcessProtocol.Command.(XML.Content) = '';
SET OutputRoot.XML.DIECOM_InterProcessProtocol.Command.(XML.AsisElementContent) = CAMPO;
-- Set attributes
SET CAMPO = "InputBody"."WfMessage"."ActivityImplInvoke"."ProgramInputData"."ChangeRequest"."ECO_Number";
SET OutputRoot.XML.DIECOM_InterProcessProtocol.ACTION.(XML.Attribute)ACTION_ID = CAMPO;
SET CAMPO = "InputBody"."WfMessage"."ActivityImplInvoke"."ProgramInputData"."ChangeRequest"."PartNumberInput";
SET OutputRoot.XML.DIECOM_InterProcessProtocol.ACTION.INPUT_OBJECT.Software_Baseline.(XML.Attribute)Part_Number = CAMPO;
SET CAMPO = "InputBody"."WfMessage"."ActivityImplInvoke"."ProgramInputData"."ChangeRequest"."PartVersionInput";
SET OutputRoot.XML.DIECOM_InterProcessProtocol.ACTION.INPUT_OBJECT.Software_Baseline.(XML.Attribute)Part_Version = CAMPO;
SET CAMPO = "InputBody"."WfMessage"."ActivityImplInvoke"."ProgramInputData"."ChangeRequest"."PartNumberOutput";
SET OutputRoot.XML.DIECOM_InterProcessProtocol.ACTION.OUTPUT_OBJECT.Software_Baseline.(XML.Attribute)Part_Number = CAMPO;
SET CAMPO = "InputBody"."WfMessage"."ActivityImplInvoke"."ProgramInputData"."ChangeRequest"."PartVersionOutput";
SET OutputRoot.XML.DIECOM_InterProcessProtocol.ACTION.OUTPUT_OBJECT.Software_Baseline.(XML.Attribute)Part_Version = CAMPO;
SET CAMPO = "InputBody"."WfMessage"."ActivityImplInvoke"."ProgramInputData"."ChangeRequest"."XMLIPP"."Context";
SET OutputRoot.XML.DIECOM_InterProcessProtocol.Context = CAMPO;
BUT the output is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE DIECOM_InterProcessProtocol SYSTEM "/var/xml/dtd/DiecomC.dtd">
<DIECOM_InterProcessProtocol>
<Status_Cmd>ACCEPTED</Status_Cmd>
<Command>CMD</Command>
<Context>PVCS to LCA</Context>
<ACTION ACTION_ID = "TSTACT11">
<OUTPUT_OBJECT>
<Software_Baseline Part_Number= "EE002" Part_Version="---">
</Software_Baseline>
</OUTPUT_OBJECT>
</ACTION>
</DIECOM_InterProcessProtocol>
with the 'Context' element bad positioned....
Any idea?
Thanks
Andrea Tedone
IBM AMS EMEA |
|
Back to top |
|
 |
Craig B |
Posted: Fri Sep 12, 2003 3:47 am Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
Hi,
In your ESQL your reference fields that are InputBody."Wfmessage", however there is no "Wfmessage" in your input XML message. For this to be giving you the output message you are getting, then this makes me believe you are using the MRM-XML parser to parse your input message and not the XML domain. Is this case? If so, then it would be useful to know a little more about the structure of your MRM definition for this input message. If you are not using MRM-XML and using the generic XML parser on input, then is this the correct input message for this scenario? _________________ Regards
Craig |
|
Back to top |
|
 |
Testo |
Posted: Fri Sep 12, 2003 5:04 am Post subject: Thanks... |
|
|
 Centurion
Joined: 26 Feb 2003 Posts: 120 Location: Italy - Milan
|
...I don't know the MRM-XML structure, because I don't have the MsgSet available but only the flows...
As soon as I'll get the MsgSet, I will try to understand better what is happening.
Thanks a lot Craig,
Andrea |
|
Back to top |
|
 |
Craig B |
Posted: Fri Sep 12, 2003 5:48 am Post subject: |
|
|
Partisan
Joined: 18 Jun 2003 Posts: 316 Location: UK
|
Hi,
It sounds like you are using MRM-XML to parse your input message. I would examine what the structure of your input tree is. You might find that one of your previous field assignment copies the Context field (as a child) over into the Output message, then your explicit set of this field, just alters it in the original position it was created. _________________ Regards
Craig |
|
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
|
|
|
|