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 » XML tag name to determine label name?

Post new topic  Reply to topic
 XML tag name to determine label name? « View previous topic :: View next topic » 
Author Message
vickie_ews
PostPosted: Mon Oct 07, 2002 1:29 pm    Post subject: XML tag name to determine label name? Reply with quote

Novice

Joined: 04 Sep 2002
Posts: 18

Our client wants to send multiple request types in XML, we transform to Cobol, and send to a legacy application. Since the first XML tag identifies the request type, can it be used to specify the type of request and send to the appropriate labelname and flow for transformation?

Unfortunately, the XML tag names are period delimited. How do I specify the 'period.delimited.tag.name' to a label name in the Compute node:

-- ESQL in my Set Label Name Compute Node

Set OutputRoot = InputRoot;

-- Assign a name to the Request Type?

SET InputRoot.XML."period.delimited.FinanceRequest" = 'Finance'
SET InputRoot.XML."period.delimited.FacilitiesRequest" = 'Facilities'

--Set labelname to route to? Is 'Parent' the correct way to specify the upper XML tag?


Set OutputDestinationList.Destination.RouterList.DestinationData[1].labelname = CASE (InputRoot.XML."Parent?")

WHEN 'Finance' THEN '0100_Request'
WHEN 'Facilities' THEN '0200_Request'

END;


gratefully,
vickie_ews
Back to top
View user's profile Send private message Yahoo Messenger
kirani
PostPosted: Mon Oct 07, 2002 7:35 pm    Post subject: Reply with quote

Jedi Knight

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

vickie,

Is your top level tag name different for different request types? Could you post an example of request msg type and point me to the element, which will contains request type data.

Generally speaking you should be able to set your router list in this way,
Code:

Set OutputDestinationList.Destination.RouterList.DestinationData[1].labelname = UPPER(InputBody.*[FIRST]);


Name your label nodes like this FINANCE, FACILITIES, ...
_________________
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
vickie_ews
PostPosted: Tue Oct 08, 2002 7:47 am    Post subject: 2. XML tag to determine label name Reply with quote

Novice

Joined: 04 Sep 2002
Posts: 18

The last node of the top level tag name is different on each request. Here are a few examples of the top level XML tag name:

<org.hn.pa.ari.SignOnClientReqReq>
</org.hn.pa.ari.SignOnClientReqReq>

<org.hn.pa.api.StartSearchforScheduleSlotsReq>
</org.hn.pa.api.StartSearchforScheduleSlotsReq>

<org.hn.pa.api.GetInformationMessageTextReq>
</org.hn.pa.api.GetInformationMessageTextReq>


Some tags are much longer. Thanks for the prompt response. I will use your suggestions.

gratefully,
vickie_ews
Back to top
View user's profile Send private message Yahoo Messenger
vickie_ews
PostPosted: Wed Oct 09, 2002 3:38 pm    Post subject: help w/routing logic for labelnode Reply with quote

Novice

Joined: 04 Sep 2002
Posts: 18

I need help understainding how to code the logic in ESQL for routing to the appropriate label node.

A successful test routed to this label node using this ESQL code:

SET OutputRoot = InputRoot;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.

-- Assign a name to the Request Type
SET OutputRoot."XML"."org.hn.pa.api.Demographics" = 'Demographics';


--Set labelnode name to route to by Request Name
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = 'Demographics';

However, when I added a second label node and sent that request type through the message flow, it goes to the FAILURE queue. Here is the unsuccessful code.

SET OutputRoot = InputRoot;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.

-- Assign a name to the Request Type
SET OutputRoot."XML"."org.hn.pa.api.DemographicsReq"= 'Demographics';
SET OutputRoot."XML"."org.hn.pa.api.FacilitiesReq" = 'Facilities';

--Set labelnode name to route to by Request Name
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = 'Demographics';
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[2].labelname = 'Facilties';


how do i code in the logic for various requests? any suggestions would be appreciated,
vickie_ews
Back to top
View user's profile Send private message Yahoo Messenger
tchagan
PostPosted: Thu Oct 10, 2002 2:48 am    Post subject: Reply with quote

Apprentice

Joined: 10 Feb 2002
Posts: 31

Vickie,

what is the error when it goes to the FAILURE queue, potentially the error may have nothing to do with the RouteToLabel stuff.

The logic in your coding for routing could be done based upon your message content using IF statements, or CASE WHEN statements etc. Basically set up your destinations based upon the message content!

Terry (eHR)
Back to top
View user's profile Send private message
lillo
PostPosted: Thu Oct 10, 2002 5:11 am    Post subject: Reply with quote

Master

Joined: 11 Sep 2001
Posts: 224

Vickie,

The RouteToLable (RTL) node will do the routing based on the information held in the OutputLocalEnvironment.Destination.RouterList.DestinationData not based in the input or output message.

Your messages go to the failure queue because the xml to generate in your compute node is not well-formed (two top-level tags, "org.hn.pa.api.DemographicsReq" and "org.hn.pa.api.FacilitiesReq").

If you need more help using RTL node you can refer to chapter 8 in the latest redbook about WMQI which covers Route to Label node in details. See
http://www.redbooks.ibm.com/pubs/pdfs/redbooks/sg246579.pdf

I hope this help you.

Cheers,
_________________
Lillo
IBM Certified Specialist - WebSphere MQ
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML tag name to determine label name?
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.