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 » unable to convert string to XML!!!

Post new topic  Reply to topic
 unable to convert string to XML!!! « View previous topic :: View next topic » 
Author Message
nagarjun_vv
PostPosted: Tue Dec 02, 2008 3:48 am    Post subject: unable to convert string to XML!!! Reply with quote

Apprentice

Joined: 24 Jun 2008
Posts: 33

Hi All,

We got a new requirement of sending a XML message to downstream system in string format.
So i used the function CAST(ASBITSTEAM(InputRoot.XML) AS CHAR CCSID InputRoot.Properties.CharCodedSetId)

Now after receiving the message in string format i am unable to convert it to XML.

Please give some ideas for converting the string to XML.
NOTE: there is no message set for XML.

Every idea will get a smile. Please

Regards,
Nagarjun.
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Tue Dec 02, 2008 4:01 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Look up the CREATE command....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Dec 02, 2008 4:01 am    Post subject: Re: unable to convert string to XML!!! Reply with quote

Grand High Poobah

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

nagarjun_vv wrote:
Please give some ideas for converting the string to XML.


I'd try parsesing it. Into an XMLNS or XMLNSC rather than XML.

nagarjun_vv wrote:
NOTE: there is no message set for XML.


Gosh - really???
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Tue Dec 02, 2008 4:16 am    Post subject: Re: unable to convert string to XML!!! Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

create a new child in env tree and specify the doamin as XML (though we would suggest XMLNSC)
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
kimbert
PostPosted: Tue Dec 02, 2008 4:22 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Sorry - I do not understand what you are trying to do. Please answer the following questions.
Quote:
We got a new requirement of sending a XML message to downstream system in string format
Is there any other way to send XML? What is special about this 'string format'?
Quote:
i used the function CAST(ASBITSTEAM(InputRoot.XML) AS CHAR CCSID InputRoot.Properties.CharCodedSetId)

You are writing out the entire XML tree. So why not simply use an output node ( e.g. MQOutput ).
Quote:
Now after receiving the message in string format i am unable to convert it to XML.
Two questions here:
1. I thought you were trying to *send* it to a downstream system.
2. What do you mean by 'convert it to XML'? Are you trying to parse it ( i.e. convert it to a message tree)?
Back to top
View user's profile Send private message
bhumulas
PostPosted: Tue Dec 02, 2008 6:49 am    Post subject: Reply with quote

Apprentice

Joined: 17 Feb 2006
Posts: 41

CREATE LASTCHILD of Environment.Variables.MyXML DOMAIN('XML') PARSE(inputstring);

Try something like this
Back to top
View user's profile Send private message
nagarjun_vv
PostPosted: Wed Dec 03, 2008 9:01 am    Post subject: Thanks its worked Reply with quote

Apprentice

Joined: 24 Jun 2008
Posts: 33

Thanks everyone i am very happy by seeing your quick responses thanks a lot.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Wed Dec 03, 2008 10:50 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please do not use this code:
Code:
CREATE LASTCHILD of Environment.Variables.MyXML DOMAIN('XML') PARSE(inputstring);

You should be using XMLNSC or XMLNS:
Code:
CREATE LASTCHILD of Environment.Variables.MyXML DOMAIN('XMLNSC') PARSE(inputstring CCSID myCCSID Encoding myEncoding);
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 » unable to convert string to 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.