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 » Convert XML to String

Post new topic  Reply to topic
 Convert XML to String « View previous topic :: View next topic » 
Author Message
ovasquez
PostPosted: Fri Dec 28, 2007 1:10 pm    Post subject: Convert XML to String Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

Hi have this ESQL code:
SET OutputRoot.Properties.MessageSet = 'MS1';
SET OutputRoot.Properties.MessageType = 'Envelope';
SET OutputRoot.Properties.MessageFormat = 'XML1';
SET OutputRoot.MRM.tns:Body.ns:doDetect.ns:stringInXml=¿?
--stringInXML='<?xml version="1.0"><city><place>x</place></city>'
stringInXML is String parameter, but InputBody is a MRM XML format, how can i convert XML a simple String ¿?

Thanks.
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri Dec 28, 2007 1:43 pm    Post subject: Reply with quote

Grand High Poobah

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

You don't seem to understand the concepts. There is no string you're in the presence of a tree. You might want to do an ESQL query...

I'd say you need some training. Request it from your management
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ovasquez
PostPosted: Fri Dec 28, 2007 1:53 pm    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

i have WebServices Method: doDetect, and have only a parameter type String, same: '<?xml version="1.0"><city><place>x</place></city>'

are you underestand?
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Fri Dec 28, 2007 2:05 pm    Post subject: Reply with quote

Grand High Poobah

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

So what you're saying is that you do a service call and pass the full XML message to it? It might be faster to have the broker do this simple determination...
fjb_saper wrote:

I'd say you need some training. Request it from your management

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ovasquez
PostPosted: Wed Jan 02, 2008 4:32 pm    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

Solutions,
DECLARE MsgString CHARACTER;
DECLARE MsgBlob BLOB;
SET OutputRoot.XML =InputRoot.MRM;
SET MsgBlob = ASBITSTREAM(OutputRoot.XML OPTIONS FolderBitStream);
SET MsgString =CAST( MsgBlob AS CHARACTER CCSID 1208) ;
SET OutputRoot.XML = NULL;

SET OutputRoot.Properties.MessageSet = 'MS1';
SET OutputRoot.Properties.MessageType = 'Envelope';
SET OutputRoot.Properties.MessageFormat = 'XML1';
SET OutputRoot.MRM.tns:Body.ns:doDetect.ns:stringInXml=MsgString;

Thansk fjb_saper!!!!!!!!!!!!!!!!!!!

_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu Jan 03, 2008 1:26 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Hi ovasquez,

That solution is wrong. All your attributes will become elements in the output message. It is also over-complicated and slow. Why not this:

- Parse the input message in the BLOB domain and save InputRoot.BLOB.BLOB in the local environment
- Use an RCD node to switch to the MRM domain for the main part of the message flow
- When building the output tree, retrieve the input BLOB from the local environment and add it as an MRM.Bitstream node.
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 » Convert XML 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.