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 » Hot to cast Charecter to XML

Post new topic  Reply to topic
 Hot to cast Charecter to XML « View previous topic :: View next topic » 
Author Message
sw_conslnt
PostPosted: Fri Jun 18, 2010 11:59 pm    Post subject: Hot to cast Charecter to XML Reply with quote

Newbie

Joined: 18 Jun 2010
Posts: 3

Hi,

I am using WMB v6.1. I am getting a response from external web service that the response xml contains a charecter in a tag what is basically an xml comming as char.
Like that :

<NS1:OrderResponse xmlns:NS1="http://www.xx.com/web-services/intOrder">
<response>
<?xml version="1.0" encoding="UTF-8"><result timestamp="2010-06-17T19:43:58.976-04:00" xmlns="http://www.xx.com/rules/client"> <messages> <message>Order is not well-formed .</message> </messages> </result>
</response>
</NS1:OrderResponse>

I need to convert the payload char into xmlnsc. I have used :

CREATE LASTCHILD OF Environment.Payload DOMAIN ('XMLNSC')
PARSE ( InputRoot.XMLNSC.ns:OrderResponse ,InputRoot.Properties.Encoding, InputRoot.Properties.CodedCharSetId);

But after that I am not getting data from Environment.Payload.XMLNSC.

Can Anybody help me regarding that ?

Thanks
Suman
Back to top
View user's profile Send private message
kimbert
PostPosted: Sat Jun 19, 2010 12:36 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

InputRoot.XMLNSC.ns:OrderResponse is a CHARACTER field in the message tree. What is the code page of the characters?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Jun 19, 2010 4:27 am    Post subject: Reply with quote

Grand High Poobah

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

sw_conslnt wrote:
I need to convert the payload char into xmlnsc. I have used :

CREATE LASTCHILD OF Environment.Payload DOMAIN ('XMLNSC')
PARSE ( InputRoot.XMLNSC.ns:OrderResponse ,InputRoot.Properties.Encoding, InputRoot.Properties.CodedCharSetId);

But after that I am not getting data from Environment.Payload.XMLNSC.

Kimbert's advice paying great attention. then act on it!
You are not following the manual for your Create /parse...
Also insert a trace node displaying the Environment after your node...
Why would you look at Environment.Payload.XMLNSC ?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sw_conslnt
PostPosted: Sat Jun 19, 2010 11:50 am    Post subject: Reply with quote

Newbie

Joined: 18 Jun 2010
Posts: 3

Can I directly cast a charecter as xml using exql ? Normal cast statement is not working on it.
Back to top
View user's profile Send private message
Vitor
PostPosted: Sat Jun 19, 2010 3:37 pm    Post subject: Reply with quote

Grand High Poobah

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

sw_conslnt wrote:
Can I directly cast a charecter as xml using exql ? Normal cast statement is not working on it.


Follow the advise given - take a trace, insert a trace node and read other threads on this topic. Especially those with parsing & casting advice from kimbert.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Sun Jun 20, 2010 10:40 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Can I directly cast a charecter as xml using exql ? Normal cast statement is not working on it.
The CAST function converts one simple data type to another simple data type. It does not invoke an XML parser. Please read the infocenter - it has an excellent topic about the CAST function.

Your first approach was correct, but you are using the CREATE...PARSE statement wrongly.
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 » Hot to cast Charecter 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.