|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Urgent!! Change !DOCTYPE Message "AAA.dtd" in msg |
« View previous topic :: View next topic » |
Author |
Message
|
syangloo |
Posted: Wed Apr 07, 2004 7:46 pm Post subject: Urgent!! Change !DOCTYPE Message "AAA.dtd" in msg |
|
|
Centurion
Joined: 01 Oct 2002 Posts: 120 Location: Kuala Lumpur
|
Dear all,
Can i change the DTD at XML in the broker message flow?
Example like i want to base on the message id in the XML and put the different dtd at the message flow process. Can it be done?
That mean i want to set the !DOCTYPE Message "AAA.dtd" to !DOCTYPE Message "BBB.dtd" at broker message flow.
Regards
Syangloo |
|
Back to top |
|
 |
kirani |
Posted: Wed Apr 07, 2004 10:31 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Yes. You can find some sample code in ESQL reference manual. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
syangloo |
Posted: Wed Apr 07, 2004 10:42 pm Post subject: |
|
|
Centurion
Joined: 01 Oct 2002 Posts: 120 Location: Kuala Lumpur
|
Hi Kiran,
The <!DOCTYPE IFX "AAA.dtd">is not XML field tag, So how can i set the field value to another?
Below is the example
<?xml version="1.0" encoding="UTF-8" ?>
<?ifx version="1.2.0" ?>
<!DOCTYPE IFX SYSTEM "AAA.dtd">
<IFX>
</IFX>
I want to change the AAA.dtd to BBB.dtd, how can i use the SET command to change it?
Regards
Syangloo |
|
Back to top |
|
 |
kirani |
Posted: Wed Apr 07, 2004 10:53 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Code: |
SET OutputRoot.XML.(XML.DocTypeDecl)IFX ='' ;
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId) = 'AAA.dtd';
|
will give you
[quote]
<!DOCTYPE IFX SYSTEM "AAA.dtd">
[/code] _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
syangloo |
Posted: Wed Apr 07, 2004 11:43 pm Post subject: |
|
|
Centurion
Joined: 01 Oct 2002 Posts: 120 Location: Kuala Lumpur
|
Hi Kiran,
I hit below error when during the deployment time
BIP2432E: (13, 15) : The correlation name 'QT.FC.KL.001' is not valid. Those in scope are: Environment, InputLocalEnvironment, OutputLocalEnvironment, InputRoot, InputBody, InputProperties, OutputRoot, InputExceptionList, OutputExceptionList, InputDestinationList, OutputDestinationList, MsgID, Version, QMgrName.
The first element of a field reference must be a valid correlation name, from those in scope. This message may sometimes be due to an incorrectly formed or spelled expression which is not intended to be a field reference being parsed as if it were a field reference because the parser does not recognize it.
Correct the syntax of the expression and redeploy the message flow.
My source code:
Quote: |
SET OutputRoot = InputRoot;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
DECLARE MsgID CHARACTER;
DECLARE Version CHARACTER;
DECLARE QMgrName CHARACTER;
Set MsgID = UCASE(RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2]."Ifx_MsgID"."msg_ID"));
Set Version = RTRIM(InputRoot.XML."IFX"[2].(XML.tag)[2].(XML.tag)[2]."Ifx_MsgID"."msg_Version");
--**IBM: Retrieve the Target Queue Name
Set QMgrName = THE (SELECT ITEM A1.TARGET_QMNAME FROM Database.TRANSACTION_TARGET AS A1 WHERE A1.MESSAGEID = MsgID and A1.Version = Version);
If QMgrName = "QT.FC.KL.001" THEN
SET OutputRoot.XML.(XML.DocTYypeDecl)IFX='';
SET OutputRoot.XML.(XML.DocTypeDecl).(XML.SystemId) = 'BBB.dtd';
END IF; |
Any idea?
Regards
Syangloo |
|
Back to top |
|
 |
fschofer |
Posted: Wed Apr 07, 2004 11:57 pm Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Try this:
IF QMgrName = 'QT.FC.KL.001' THEN
With your statement WMQI thinks QT.FC.KL.001 is a variable.
Greetings
Frank |
|
Back to top |
|
 |
syangloo |
Posted: Thu Apr 08, 2004 12:09 am Post subject: |
|
|
Centurion
Joined: 01 Oct 2002 Posts: 120 Location: Kuala Lumpur
|
HI Frank,
Now i getting this error msg:
Quote: |
BIP2432E: (14, 22) : The correlation name 'XML' is not valid. Those in scope are: Environment, InputLocalEnvironment, OutputLocalEnvironment, InputRoot, InputBody, InputProperties, OutputRoot, InputExceptionList, OutputExceptionList, InputDestinationList, OutputDestinationList, MsgID, Version, QMgrName.
The first element of a field reference must be a valid correlation name, from those in scope. This message may sometimes be due to an incorrectly formed or spelled expression which is not intended to be a field reference being parsed as if it were a field reference because the parser does not recognize it.
Correct the syntax of the expression and redeploy the message flow. |
Now is whih XML problem?
Regards
Syangloo |
|
Back to top |
|
 |
JT |
Posted: Thu Apr 08, 2004 5:25 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
You have a typo:
Code: |
SET OutputRoot.XML.(XML.DocTYypeDecl)IFX=''; |
should be:
Code: |
SET OutputRoot.XML.(XML.DocTypeDecl)IFX=''; |
|
|
Back to top |
|
 |
syangloo |
Posted: Thu Apr 08, 2004 6:17 pm Post subject: |
|
|
Centurion
Joined: 01 Oct 2002 Posts: 120 Location: Kuala Lumpur
|
Thanks JT, Sorry for the typo.
Now i can see the DTD is change at the XML.
Thanks Kiran, Frank and JT.
Regards
Syangloo |
|
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
|
|
|
|