ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Ways of getting input XML

Post new topic  Reply to topic Goto page 1, 2  Next
 Ways of getting input XML « View previous topic :: View next topic » 
Author Message
dilse
PostPosted: Mon Oct 18, 2004 6:36 am    Post subject: Ways of getting input XML Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Guys,
This may be a silly question but i need it...what are the different ways to get the input XML file?All I know is
OutputRoot.XML.message = InputRoot.XML;

I am having some problems when I am ttrying to access this field in the compute node of EXCEPTION terminal and was not able to get the whole message.

Let me know are there any other ways to access the input XML. I am using MQSI2.1 with CSD07 and WMQ5.3 CSD08

Thanks,
DilSe..
_________________
DilSe..

Take life as it comes..
Back to top
View user's profile Send private message
JT
PostPosted: Mon Oct 18, 2004 7:11 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Can you post the exact error you're receiving, also please post all of the relevant ESQL code.

Quote:
....and was not able to get the whole message

How do you know this, i.e. no message put to an output queue?
Back to top
View user's profile Send private message
dilse
PostPosted: Mon Oct 18, 2004 11:13 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

JT,

I was able to analyze what is the error and what i want to do is along with the error I want to send the input order. This is how my output XML will be
-------------------------------------------------------
--******* Output XML *********
-------------------------------------------------------
SET OutputRoot.XML.(XML.XmlDecl).(XML.Version) = '1.0';
SET OutputRoot.XML.response.(XML.attr).type = 'err';
SET OutputRoot.XML.response.transdate = CURRENT_DATE;
SET OutputRoot.XML.response.Complete='NO';
SET OutputRoot.XML.response.Target= Target;
SET OutputRoot.XML.response.Error.ErrorNumber = Error;
SET OutputRoot.XML.response.Error.Description = ErrDesc;
SET OutputRoot.XML.response.MachineName.(XML.CDataSection) = MachineName;
/* HERE I WANT TO SEND THE INPUT ORDER ALONG WITH ERROR TO THE OUTPUT */
SET OutputRoot.XML.response.OriginalMessage = InputRoot.XML;

while doing this I am not able to get the whole message. let me know how to get the whole mwssage.

Thanks,
DilSe..
Back to top
View user's profile Send private message
JT
PostPosted: Mon Oct 18, 2004 12:27 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Quote:
while doing this I am not able to get the whole message

What portion of the message are you "not able to get" (just the OutputRoot.XML.response.OriginalMessage tag)?
So does that mean you are getting the other OutputRoot.XML.response tags?
Back to top
View user's profile Send private message
Nizam
PostPosted: Mon Oct 18, 2004 1:29 pm    Post subject: Reply with quote

Disciple

Joined: 10 Feb 2004
Posts: 160

dilse,
why dont you put trace nodes before and after the compute and try to see what you are getting and what you are sending as output..
Back to top
View user's profile Send private message
kirani
PostPosted: Mon Oct 18, 2004 1:38 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

You might be loosing the ExceptionList tree before you get to the node where you are building output XML. As others have said, please use Trace node to capture EXceptionList and post there contents here.
_________________
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
View user's profile Send private message Visit poster's website
dilse
PostPosted: Tue Oct 19, 2004 7:28 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Thanx Nizam and Kiran for ur reply. I put one trace between MQInput node catch terminal and compute node and another trace node between compute node and MQOutput node. I checked both trace files for the XML message that are in the trace files. XML messages in Both trace files are same but the thing is that I am not getting the whole XML message from the catch terminal of the MQInput node itself. I know that because of the XML message is invalid on one Tag it is not getting the whole message. But what I want to know is how can I be able to attach the whole message along with the error message to the output message.


Thanks alot,
DilSe..
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 19, 2004 7:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You probably want to use ASBITSTREAM instead of trying to copy the tree.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dilse
PostPosted: Thu Oct 21, 2004 8:21 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Thanks Jefflowrey..

I did use ASBITSTREAM and i have the whole message coming but it is appearing in the output in the following format:

<partnerpluspoversion1.0>
<route>B2BI</route>
<orderhead>
</orderheader>
<orderdetail>
</orderdetail>
</partnerpluspoversion1.0>


how would I convert this format into normal format before it goes to the output? Let me know. ok.


Thanks,
DilSe..
_________________
DilSe..

Take life as it comes..
Back to top
View user's profile Send private message
dilse
PostPosted: Thu Oct 21, 2004 10:24 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

I used the following command to get the input XML :

SET OutputRoot.XML.response.OriginalMessage = CAST(ASBITSTREAM(InputRoot.XML) AS CHAR CCSID CAST(InputRoot.MQMD.CodedCharSetId AS INT) ENCODING CAST(InputRoot.MQMD.Encoding AS INT));


it seems working fine. But I am getting message in output is not exactly XML.


it showing as

<partnerpluspoversion1.0>
<route>B2BI</route>
<orderhead>
</orderheader>
<orderdetail>
</orderdetail>
</partnerpluspoversion1.0>

how can I convert this into the form

<partnerpluspoversion1.0>
<route>B@BI</route>
<orderhead>
</orderheader>
<orderdetail>
</orderdetail>
</partnerpluspoversion1.0>

any input is appreciated....


Thanks,
DilSe..
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Oct 21, 2004 10:55 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

You have already stated:
Quote:
I know that because of the XML message is invalid on one Tag

So how do you expect to get:
Quote:
But I am getting message in output is not exactly XML


The ASBITSTREAM has stored the conents of your "broken" XML into a single field. The &lt. and &gt. is how XML handles the < and > characters. If these were left "as-is", then this new XML would also be invalid. When you read that data, using an XML parser, the data you get back will be correct.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
dilse
PostPosted: Thu Oct 21, 2004 11:35 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Thanks EddieA,

let this is my invalid xml. It is invalid because Tag</Middl> should be </Middle> .

<Name>
<Last></Last>
<Middle></Middl>
<First></First>
</Name>

when I am prcoessing this xml in exception node, I want to attach the error with the input xml though it is invalid. when i didn't use ASBITSTREAM the attached input xml appear in output as

<Name>
<Last></Last>
<First></First>
</Name>

when I used ASBITSTREAM as in the above form, I successfully getting the whole xml but in the form of

&lt;Name&gt;
&lt;Last&gt;&lt;/Last&gt;
&lt;Middle&gt;&lt;/Middl&gt;
&lt;First&gt;&lt;/First&gt;
&lt;/Name&gt;


I want in the normal form to attach. how do I do that?

Thanks,
DilSe..
_________________
DilSe..

Take life as it comes..
Back to top
View user's profile Send private message
dilse
PostPosted: Mon Oct 25, 2004 5:29 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Anybody has any idea how to get the original input XML? gimme a clue..


Thanks,
_________________
DilSe..

Take life as it comes..
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Oct 25, 2004 5:32 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Do you understand what &lt; and &gt; mean?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dilse
PostPosted: Mon Oct 25, 2004 6:05 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Jeff,

I think I know these. '<' is '&lt', '>' is '&gt' . But what I want to know is I want to appear these in output XML as '<' and '>' instead of '&lt' and '&gt'.

The statement I am using is:
SET OutputRoot.XML.response.OriginalMessage = CAST ((InputRoot.XML) AS CHAR CCSID CAST(InputRoot.MQMD.CodedCharSetId AS INT) ENCODING CAST(InputRoot.MQMD.Encoding AS INT));

I even tried to use XML.AsisElementContent to get without these characters, but no luck.

Give me a clue as how to change this to get the output without '&lt' and '&gt's.

Thanks,
_________________
DilSe..

Take life as it comes..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Ways of getting input XML
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.