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 » General Discussion » conversion of XML Message to String

Post new topic  Reply to topic
 conversion of XML Message to String « View previous topic :: View next topic » 
Author Message
mvs
PostPosted: Fri Jul 06, 2007 5:21 am    Post subject: conversion of XML Message to String Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

I am converting XML message to the String like below but am not able to success.


Declare msgblob BLOB;

SET Environment.Variables.TXML6 =InputRoot.XML;
SET msgblob =ASBITSTREAM(Environment.Variables.TXML6 options FolderBitStream);
set Environment.Variables.msgchar = cast (msgblob as char CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);

Any suggestions regarding how to convert XML message to String?
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 06, 2007 5:23 am    Post subject: Re: conversion of XML Message to String Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mvs wrote:
I am converting XML message to the String like below but am not able to success.


What goes wrong? Error codes, messages, unexpected results? If so, what error codes, messages or results?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mvs
PostPosted: Fri Jul 06, 2007 6:04 am    Post subject: Conerting XML to String Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

I am not getting any error.

Please find the code and trace results and its not giving any error.
-------------

CALL CopyMessageHeaders();
SET OutputRoot.Properties.MessageSet='JM30L2O002001';
SET OutputRoot.Properties.MessageFormat='XML';
SET OutputRoot.Properties.MessageType ='Envelope';

SET Environment.Variables.TXML6 = InputRoot.BLOB.BLOB;
DECLARE msgblob BLOB;
SET msgblob =ASBITSTREAM(Environment.Variables.TXML6 options FolderBitStream);
set Environment.Variables.msgchar = cast (msgblob as char CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);

-----------------

Trace results
----------
--------------------
(
(0x01000000):Properties = (
(0x03000000):MessageSet = 'JM30L2O002001'
(0x03000000):MessageType = 'Envelope'
(0x03000000):MessageFormat = 'XML'
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 1208
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2007-07-06 13:57:35.550'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = 'text/xml; charset=utf-8'
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'CHECKOUTQ'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 1208
(0x03000000):Format = 'WSREQHDR'
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d51204c4d4436554d5149202020204624a52022053e02'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'LMD6UMQI '
(0x03000000):UserIdentifier = 'mqm '
(0x03000000):AccountingToken = X'0000000000000000000000000000000000000000000000000000000000000000'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 28
(0x03000000):PutApplName = 'WebSphere MQ Client for Java'
(0x03000000):PutDate = DATE '2007-07-06'
(0x03000000):PutTime = GMTTIME '13:57:35.550'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)

(0x01000021):MRM = (
(0x01000000)http://schemas.xmlsoap.org/soap/envelope/:Body = (
(0x01000000)http://www.liberty.co.za/:RequestTaxYears = (
(0x03000000):node = ''
)
)
)
)



(
(0x01000000):Variables = (
(0x03000000):TXML6 = X'3c3f786d6c2076657273696f6e3d22312e30223f3e3c54584c6966655265717565737420786d6c6e733a7873643d22687474703
a2f2f7777772e77332e6f7267'... (data of len 578 truncated)'
(0x03000000):msgchar = ''
)
)

NULL




--msg char----------
''
*********msgblob**************
X'3c3f786d6c2076657273696f6e3d22312e30223f3e3c54584c6966655265717565737420786d6c6e733a7873643d22687474703a2f2f7777772e77332e6f7267'.
.. (data of len 578 truncated)'
=====
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jul 06, 2007 6:09 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What about the result you get is "not success"?

Are you sure you want to be using FolderBitStream?

Also... Why exactly are you trying to ASBITSTREAM what is InputRoot.BLOB.BLOB?

That's already a bitstream...
_________________
I am *not* the model of the modern major general.
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 » General Discussion » conversion of XML Message to String
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.