Author |
Message
|
mymq |
Posted: Wed Jun 20, 2007 7:01 am Post subject: Subscription Issue |
|
|
Centurion
Joined: 01 Mar 2007 Posts: 101 Location: US-Greenwille
|
Hi All,
I have 2 flows, one is a Publisher flow and another one is a subscriber flow. The Publisher flow publishes with a Topic "LOG/PROCESSSHIPMENT/SHIPPING/CREATE/2/0" and. What i want is that my subscriber flow receives this message with the below filter condition
(Body.ProcessShipment.DataArea.gic:Shipment.gic:ShipmentHeader.gic:ShipToParty.Location.ID='DU')
The point is that i need to use the NAMESPACE "gic" in the filter condition. Because, my Publisher output is a Canonical XML which has this namespace as "gic". So, how do i do it?
The issue what i am facing rightnow is that i am unable to register this subscription with "gic" namespace. Another point here is that if i dont mention the namespace, then i am not receving the message in the subscription queue.
Do u guys have any idea?
--SRK-- _________________ --SRK-- |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 20, 2007 7:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
"gic" is the namespace prefix, not the namespace.
If you trace your publication message, you should see what needs to be put in. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mymq |
Posted: Wed Jun 20, 2007 7:42 am Post subject: Subscription Issue |
|
|
Centurion
Joined: 01 Mar 2007 Posts: 101 Location: US-Greenwille
|
Hi,
Infact, i am putting the message in a TEMP(Trap) queue before publishing to broker. And i know Canonial XML output.
But, when i register it, it is not getting registered in broker. This is what my issue?
Hope i answered your question. Let me know still you want me to have trace node output. _________________ --SRK-- |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 20, 2007 8:14 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I guess I'm saying that instead of writing Body.ProcessShipment.DataArea.gic:...
You need to replace the namespace prefix gic with the actual namespace. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mymq |
Posted: Wed Jun 20, 2007 12:42 pm Post subject: |
|
|
Centurion
Joined: 01 Mar 2007 Posts: 101 Location: US-Greenwille
|
Hi Jeff,
Thankx for your reply.
Below is the field, i is the FILTER condition that i supposed to use during the registeration:
Root.XMLNS.oagis:ProcessShipment.gic:Shipment.gic:ShipmentHeader.gic:ShipToParty.oagis:Location.oagis:ID='DU'
This is how i am referring in my ESQL code for further processing inside the flow.
As you suggested, i tried the below one too:
(Body.ProcessShipment.http://www.gic.michelin.com/oagis/9/michelin/1:Shipment.http://www.gic.michelin.com/oagis/9/michelin/1:ShipmentHeader.http://www.gic.michelin.com/oagis/9/michelin/1:ShipToParty.Location.ID='DU')
But, still the Subscription is not getting registered in broker. I am not sure what is happening.
Please correct me if i misread your suggestions.
NOTE:
Infact, i am trying to register the above through RFHUTIL tool. _________________ --SRK-- |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 20, 2007 12:46 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
No, that's my suggestion. You might need to put the namespace in quotes - try double quotes first.
So, Body.ProcessShipment."http://gic.michelin.com/oagis/9/michelin/1":....
That *should* work. You should also be able to get RFHUtil to get the broker response to the Subscription request - in the ReplyToQueue you set - that would help tell you why the subscription isn't being made. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mymq |
Posted: Wed Jun 20, 2007 1:00 pm Post subject: |
|
|
Centurion
Joined: 01 Mar 2007 Posts: 101 Location: US-Greenwille
|
Hi Jeff,
As you advised, i tried the below FILTER condition to register my Subscription in broker, but still the broker does not accept the register request, due to some reason. I did set the ReplyToQ option also in RFHUTIL tool, but i dont see any messages in the ReplyToQ.
(Body.ProcessShipment."http://www.gic.michelin.com/oagis/9/michelin/1":Shipment."http://www.gic.michelin.com/oagis/9/michelin/1":ShipmentHeader."http://www.gic.michelin.com/oagis/9/michelin/1":ShipToParty.Location.ID='DU')
Anything else, i can try it out? _________________ --SRK-- |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 20, 2007 3:26 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Just a silly question but can you please provide us with the subscription that you send to the broker?
Is there a problem because your filter condition does not work as expected? Or is there a problem because your subscription does not work.
The subscription has nothing to do with the name space. It should solely be done on the Topic:LOG/PROCESSSHIPMENT/SHIPPING/CREATE/2/0
Now be a good boy and define the name space:
DECLARE gic NAMESPACE 'http://www.gic.michelin.com/oagis/9/michelin/1';
You should then be able to use it walking the tree:
Body.ProcessShipment.gic:Shipment.gic:ShipmentHeader.gic:ShipToParty.Location.ID
or Body.gic:ProcessShipment.gic:Shipment.gic:ShipmentHeader.gic:ShipToParty.gic:Location.gic:ID or something like it...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 20, 2007 5:29 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Not in the Filter expression, FJ.
Or are you proposing that the DECLARE NAMESPACE be added to the filter expression? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 20, 2007 8:45 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Don't know if that is possible as I'm not too up to date on subscription filtering... but Yes I would at least try it (defining the namespace in the filter).
The next step would really be to analyze the unfiltered message and check the namespace (fieldnamespace function) at each level on the relevant tree branch. I believe that the tree as described may not be namespace acurate. Seen it happen way too often...
As an alternative you can always subscribe a flow to the raw publication and republish adding the field to the topic tree or filter (compute node) before republishing. You can then have a targeted subscription to the specific criteria...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
AkankshA |
Posted: Thu Jun 21, 2007 12:31 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
AFAIK we can not do content based filtering of namespace aware messages.
i would prefer registering only the topic subsciption with the broker with a local queue as destination and further doing the filtering using JCN xpath.. of course i would require database having details of initial subcription destination etc etc _________________ Cheers |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 21, 2007 1:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You should be able to do content based filtering on any message that the broker can actually parse. If nothing else - MRM-XML is namespace aware, and you would be able to do this with a message set.
There should be nothing that prevents using namespaces or not.
If there is, I believe that a PMR should be opened and that IBM would fix that. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 21, 2007 8:14 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
fjb_saper wrote: |
The next step would really be to analyze the unfiltered message and check the namespace (fieldnamespace function) at each level on the relevant tree branch. I believe that the tree as described may not be namespace acurate. Seen it happen way too often...
|
And to do that you'd have to use a reference to walk the tree.
Make sure you use both fieldname and fieldnamespace.
Or just add a raw subscription for the topic and dump the message in a trace node. This should give you the true makeup of the message and it may differ from what you expect.
Remember you cannot filter if you are not namespace acurate, unless you want to wildcard the namespace or use a reference to walk the tree and work with fieldname() and fieldnamespace()...
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|