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 » Problems in accessing Environment variables

Post new topic  Reply to topic
 Problems in accessing Environment variables « View previous topic :: View next topic » 
Author Message
Raj kumar
PostPosted: Fri Dec 05, 2008 6:07 am    Post subject: Problems in accessing Environment variables Reply with quote

Novice

Joined: 27 Jun 2008
Posts: 14
Location: India

Hi All,

I get a xml message as a string under an element which contains attributes/elements etc..., To convert this string to a xml, I am using the below code to convert and assign it to environment variable.

DECLARE Msg BLOB ASBITSTREAM (InputRoot.XMLNSC CCSID InputRoot.Properties.CodedCharSetId ENCODING InputRoot.Properties.Encoding) ;

CREATE LASTCHILD OF LocalEnvironment.Destination.Tmp DOMAIN('XMLNSC')
PARSE (Msg
ENCODING InputRoot.Properties.Encoding
CCSID InputRoot.Properties.CodedCharSetId
FORMAT 'XMLNS_OPAQUE' TYPE 'http://www.w3.org/schemas/Test.xsd');


While trying to create an OutputRoot, I have mapped the environment values to Output Body. However these values are not getting mapped/accessible.

Could you please help on this?

Thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Dec 05, 2008 8:55 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Looking at your code, several questions spring to mind:
- Why are you using ASBITSTREAM immediately followed by CREATE...PARSE? Why not just copy the elements into the environment tree?
- Why are you using a format name of XMLNS_OPAQUE? Do you know what that means?
- Why are you attempting to use XMLNS_OPAQUE with the XMLNSC domain?
- Why are you putting a filename into the TYPE parameter of your CREATE...PARSE statement?

I think you should explain what you are trying to do - maybe you are solving the wrong problem.
Back to top
View user's profile Send private message
Raj kumar
PostPosted: Fri Dec 05, 2008 9:42 am    Post subject: Reply with quote

Novice

Joined: 27 Jun 2008
Posts: 14
Location: India

Looking at your code, several questions spring to mind:
- Why are you using ASBITSTREAM immediately followed by CREATE...PARSE? Why not just copy the elements into the environment tree?

Ans: I have xml escape characters in the string which I recieve from InputRoot.XMLNSC

For other questions - I just took an template code from help.

My requirement is, I need to convert the string data with escape characters in to an xml and access the elements and atrtibutes to create an output from those values.

Could please suggest some better way to do this.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Dec 05, 2008 12:21 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I just took an template code from help
You should read more carefully
That topic is explaining how to use the 'opaque parsing' feature of the XMLNS parser. And it does not show a filename being used in the TYPE parameter.
Quote:
I have xml escape characters in the string which I recieve from InputRoot.XMLNSC
The XMLNSC parser will expand any escaped characters when it parses the message. There must be some detail which you have not told us yet - maybe these characters come from a CDATA section? Or maybe they have been escaped twice before arriving in your message flow?
Quote:
My requirement is, I need to convert the string data with escape characters in to an xml and access the elements and atrtibutes to create an output from those values.
It's hard to advise without knowing a few more details. Please insert a Trace node immediately before your Compute node, and set the pattern to '${Root}'. Post the input message and the Trace node output here. If they are large, just post the relevant parts.
Back to top
View user's profile Send private message
Raj kumar
PostPosted: Fri Dec 05, 2008 12:40 pm    Post subject: Reply with quote

Novice

Joined: 27 Jun 2008
Posts: 14
Location: India

Yes, they have been escaped twice before arriving in my message flow

Will soon post the trace details..

For now, the trace had looked like

Properties....
MQMD....
XMLNSC
Header
ns = www.example.org/..
Main
element = 'test'
element2 = 'test2'


I am just giving an idea, since I dont have access to run/get the trace at present. Will post it shortly!!
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 » Problems in accessing Environment variables
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.