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 » Manipulating XML

Post new topic  Reply to topic Goto page Previous  1, 2
 Manipulating XML « View previous topic :: View next topic » 
Author Message
kimbert
PostPosted: Thu Sep 04, 2008 12:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
InputRoot.XMLNS.Message.MessageBody is returning null value. why is this so? i tried (parsing to XMLNS)

SET charTest = InputRoot.XMLNS.Message.MessageBody.ServiceId;

and i got null also. but when i tried (parsing to XML)

SET charTest = InputRoot.XML.Message.MessageBody.ServiceId;

i got the value. What is wrong?
Hi angka,
- You should definitely add a Trace node to your flow. That should be standard practice for anybody who is debugging a message flow.
- You are obviously still using the XML domain, even though you are trying to use the XMLNS domain. Check your input node settings, and check that your re-deploy was successful.
Back to top
View user's profile Send private message
angka
PostPosted: Thu Sep 04, 2008 10:53 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

Below is what i got from trace node with
${Root}
XMLNS Test: ${Body.Message.MessageBody.ServiceId}
as the pattern:

(
(0x01000000):Properties = (
(0x03000000):MessageSet = ''
(0x03000000):MessageType = ''
(0x03000000):MessageFormat = ''
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2008-09-05 05:19:06.750'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'cfbd0000000100008001eb94080403000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'HQ.SYSB.SYSA.TST.L.01'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = 'MQSTR '
(0x03000000):Version = 2
(0x03000000):Report = 768
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 1
(0x03000000):MsgId = X'414d512051434d414e50303120202020e401be48200334e7'
(0x03000000):CorrelId = X'cfbd0000000100008001eb94080403000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = 'HQ.SYSA.SYSB.ACK.L.01 '
(0x03000000):ReplyToQMgr = 'SYSB '
(0x03000000):UserIdentifier = 'administrato'
(0x03000000):AccountingToken = X'1601051500000001b4f6a4b306d74caeea5832f401000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = 's\SYSMQService\MQSYSSYSB.exe'
(0x03000000):PutDate = DATE '2008-09-05'
(0x03000000):PutTime = GMTTIME '05:19:06.750'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000010):XMLNS = (
(0x05000018):XML = (
(0x06000011): = '1.0'
(0x06000012): = 'utf-16'
)
(0x06000002): = '
'
(0x01000000)http://SYSAMessage.com/Message:Message = (
(0x07000012)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'
(0x07000012)xmlns:xsd = 'http://www.w3.org/2001/XMLSchema'
(0x07000012):xmlns = 'http://SYSAMessage.com/Message'
(0x02000000): = '
'
(0x01000000)http://SYSAMessage.com/Message:MessageHeader = (
(0x02000000): = '
'
(0x01000000)http://SYSAMessage.com/Message:MsgRefId = (
(0x02000000): = 'CCCCBBBBB000001'
)
(0x02000000): = '
'
(0x01000000)http://SYSAMessage.com/Message:TimeStampCreated = (
(0x02000000): = '20080905131906755'
)
(0x02000000): = '
'
(0x01000000)http://SYSAMessage.com/Message:MsgType = (
(0x02000000): = 'UPD'
)
(0x02000000): = '
'
(0x01000000)http://SYSAMessage.com/Message:SourceSysID = (
(0x02000000): = '00001'
)
(0x02000000): = '
'
(0x01000000)http://SYSAMessage.com/Message:AgencyID = (
(0x02000000): = '00001'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
(0x01000000)http://SYSAMessage.com/Message:MessageBody = (
(0x03000000):ServiceId = '12345678'
(0x02000000): = '
'
(0x01000000)https://ABC/Common/SYSBTremor.xsd:TremorInfo = (
(0x07000012)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'
(0x07000012)xmlns:xsd = 'http://www.w3.org/2001/XMLSchema'
(0x07000012):xmlns = 'https://ABC/Common/SYSBTremor.xsd'
(0x02000000): = '
'
(0x01000000)https://ABC/Common/SYSBTremor.xsd:TremorID = (
(0x02000000): = '
'
(0x01000000)https://ABC/Common/SYSBTremor.xsd:RecordID = (
(0x02000000): = '2'
)
(0x02000000): = '
'
(0x01000000)https://ABC/Common/SYSBTremor.xsd:FolderID = (
(0x02000000): = '1'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
(0x01000000)https://ABC/Common/SYSBTremor.xsd:TremorDetail = (
(0x02000000): = '
'
(0x01000000)https://ABC/Common/SYSBTremor.xsd:RoadName = (
(0x02000000): = 'Alex Road'
)
(0x02000000): = '
'
(0x01000000)https://ABC/Common/SYSBTremor.xsd:TimeChecked = (
(0x02000000): = '12 45'
)
(0x02000000): = '
'
(0x01000000)https://ABC/Common/SYSBTremor.xsd:Status = (
(0x02000000): = '0'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
)
(0x02000000): = '
'
)
)
)XMLNS Test: NULL

try to navigate thru the body but got nothing.

Thanks
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Thu Sep 04, 2008 11:05 pm    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

For me it looks that you are missing namespace references in you pattern

Quote:
Body.Message.MessageBody.ServiceId


Something like this(not tested):

Body."http://SYSAMessage.com/Message":Message."http://SYSAMessage.com/Message":MessageBody.ServiceId

Marko
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Fri Sep 05, 2008 12:34 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

marko is correct. And your code will be tidier if you DECLARE a namespace constant in your ESQL: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ac67194_.htm
Back to top
View user's profile Send private message
angka
PostPosted: Thu Sep 18, 2008 4:04 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

How do i get the namespace for incoming message?? i parsed it to xmlns and how use the InputRoot.XMLNS to get the namespace for the message? Thanks
Back to top
View user's profile Send private message
kspranava
PostPosted: Thu Sep 18, 2008 5:35 am    Post subject: Reply with quote

Centurion

Joined: 27 Apr 2003
Posts: 124

Quote:
How do i get the namespace for incoming message??


FIELDNAMESPACE function returns you the namespace associated with the field.

Or if you are not worried about the namespace as such, try something like this,

SET charTest = InputRoot.XMLNS.*:Message.*:MessageBody.*:ServiceId;
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Manipulating 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.