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 » Converting from XML to String format in WMQI2.1/WBIMB5.0

Post new topic  Reply to topic
 Converting from XML to String format in WMQI2.1/WBIMB5.0 « View previous topic :: View next topic » 
Author Message
jai1234
PostPosted: Thu Dec 02, 2004 7:12 am    Post subject: Converting from XML to String format in WMQI2.1/WBIMB5.0 Reply with quote

Novice

Joined: 02 Dec 2004
Posts: 10

Hello All,

I have an XML input message like the one below:

<VehicleInfoRequest><RegistrationNumber>009736</RegistrationNumber><RegistrationType>07</RegistrationType></VehicleInfoRequest>

I have to generate an output (string format) like the one below:

00973607 (basically concatenating the values of the xml fields)

If I am using XML domain as the parser to parse the input XML and use XML as the wire format, my output will also be in an XML format right.

What should I write in compute node to ensure that the output will be in string format. The output message should not be in XML/MRM message structure.

How to do it in WMQI 2.1/WBIMB5.0?
Back to top
View user's profile Send private message
JT
PostPosted: Thu Dec 02, 2004 8:59 am    Post subject: Reply with quote

Padawan

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

As jefflowrey previously suggested in another thread, you can use the BLOB domain, which doesn't require the creation of a Message Set:

Code:
Set OutputRoot.BLOB.BLOB = CAST(InputRootInputRoot.XML.VehicleInfoRequest.RegistrationNumber as BLOB CCSID InputRoot.Properties.CodedCharSetId) ||
CAST(InputRootInputRoot.XML.VehicleInfoRequest.RegistrationType as BLOB CCSID InputRoot.Properties.CodedCharSetId);

or you can:
  • Create a message set in the MRM domain.
  • Create an Element, say MyElement
  • Create a Message, say MyMessage, which contains MyElement
In a Compute node:
Code:
Set OutputRoot.MRM.MyMessage.MyElement  =  InputRoot.XML.VehicleInfoRequest.RegistrationNumbert || InputRoot.XML.VehicleInfoRequest.RegistrationType;
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Dec 02, 2004 11:53 pm    Post subject: Reply with quote

Jedi Knight

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

If you are using messageset solution then make sure your MRM field is long enough to hold the value.
_________________
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
jai1234
PostPosted: Fri Dec 03, 2004 1:42 am    Post subject: Converting from XML to String format in WMQI2.1/WBIMB5.0 Reply with quote

Novice

Joined: 02 Dec 2004
Posts: 10

Hi JT,

Thanks for your reply. I am able to concatenate the outputs. But it is not reaching the output queue. This is the output I am getting in the trace node

(
(0x1000000)Properties = (
(0x3000000)MessageSet = 'E3A2VHK08E001'
(0x3000000)MessageType = ''
(0x3000000)MessageFormat = 'XML'
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 437
(0x3000000)Transactional = TRUE
(0x3000000)Persistence = FALSE
(0x3000000)CreationTime = GMTTIMESTAMP '2004-12-03 09:42:10.790'
(0x3000000)ExpirationTime = -1
(0x3000000)Priority = 0
(0x3000000)ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x3000000)ReplyProtocol = 'MQ'
(0x3000000)Topic = NULL
)
(0x1000000)MQMD = (
(0x3000000)SourceQueue = 'InputQueue'
(0x3000000)Transactional = TRUE
(0x3000000)Encoding = 546
(0x3000000)CodedCharSetId = 437
(0x3000000)Format = 'MQSTR '
(0x3000000)Version = 2
(0x3000000)Report = 0
(0x3000000)MsgType = 8
(0x3000000)Expiry = -1
(0x3000000)Feedback = 0
(0x3000000)Priority = 0
(0x3000000)Persistence = 0
(0x3000000)MsgId = X'414d512042726f6b65725f514d20202077e7af41200023bf'
(0x3000000)CorrelId = X'000000000000000000000000000000000000000000000000'
(0x3000000)BackoutCount = 0
(0x3000000)ReplyToQ = ' '
(0x3000000)ReplyToQMgr = 'Broker_QM '
(0x3000000)UserIdentifier = 'jai '
(0x3000000)AccountingToken = X'16010515000000be043e32833d2b4607e53b2be803000000000000000000000b'
(0x3000000)ApplIdentityData = ' '
(0x3000000)PutApplType = 11
(0x3000000)PutApplName = 'C:\WINNT\system32\mmc.exe '
(0x3000000)PutDate = DATE '2004-12-03'
(0x3000000)PutTime = GMTTIME '09:42:10.790'
(0x3000000)ApplOriginData = ' '
(0x3000000)GroupId = X'000000000000000000000000000000000000000000000000'
(0x3000000)MsgSeqNumber = 1
(0x3000000)Offset = 0
(0x3000000)MsgFlags = 0
(0x3000000)OriginalLength = -1
)
(0x1000021)MRM = (
(0x1000000)MyMessage = (
(0x3000000)MyElement = 12345612
)
)
)
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Dec 03, 2004 9:50 am    Post subject: Reply with quote

Jedi

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

Quote:
(0x1000021)MRM = (
(0x1000000)MyMessage = (
(0x3000000)MyElement = 12345612
)
)

So, it looks like you took this route:
Quote:
    Create a message set in the MRM domain.

    Create an Element, say MyElement

    Create a Message, say MyMessage, which contains MyElement

Which, in my opion, was the harder of the two choices for this example.

So, did you create the Mesage Set. Maybe, because you have:
Quote:
MessageSet = 'E3A2VHK08E001'

But you also need to set:
Quote:
MessageType =

And the Mesageformat should be 'MRM'.

**Update** Forgot to ask. What is the error you are getting when this is put to the Queue. That should give you some clue as to why it didn't.

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
shanson
PostPosted: Mon Dec 06, 2004 10:26 am    Post subject: Reply with quote

Partisan

Joined: 17 Oct 2003
Posts: 344
Location: IBM Hursley

Correction to above from EddieA:

- MessageFormat should be the identifier of your physical format eg 'CWF1'
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 » Converting from XML to String format in WMQI2.1/WBIMB5.0
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.