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 » Read XML message with URL inside Root element

Post new topic  Reply to topic
 Read XML message with URL inside Root element « View previous topic :: View next topic » 
Author Message
premji
PostPosted: Tue Apr 29, 2014 10:59 pm    Post subject: Read XML message with URL inside Root element Reply with quote

Acolyte

Joined: 01 Jul 2013
Posts: 64

Hi All I am trying to read XML message from Environment to Output , for normal message that is working fine but this XML message include some URL after root element so I am not able to read directly. Can any one help for this. Thanks!
Back to top
View user's profile Send private message
Esa
PostPosted: Tue Apr 29, 2014 11:05 pm    Post subject: Re: Read XML message with URL inside Root element Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

premji wrote:
this XML message include some URL after root element so I am not able to read directly.


A namespace declaration, perhaps?

Back to top
View user's profile Send private message
premji
PostPosted: Wed Apr 30, 2014 2:14 am    Post subject: Read XML message with URL inside Root element Reply with quote

Acolyte

Joined: 01 Jul 2013
Posts: 64

Hi Thanks for your reply, I have quick question is it possible to access XML namespace message from Environment. If it is possible can you please post some piece of code
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Apr 30, 2014 2:44 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

How and why did your message end up in Environment? Maybe there is something wrong with your design?

Somehow I get the impression that you have copied a BLOB message in Environment and now you are trying to parse it with string manipulation. Is that correct?
Back to top
View user's profile Send private message
kathirvelt
PostPosted: Wed Apr 30, 2014 7:04 am    Post subject: Reply with quote

Apprentice

Joined: 02 Oct 2010
Posts: 32

DECLARE tns NAMESPACE 'http://test.com/TUpload';
SET OutputRoot.XMLNSC.soapenv:Envelope.soapenv:Body.ser:saveApplicationRequest.applicationType = Environment.Values.Inbound.tns:caseH.tns:app.tns:application.tns:appData.tns:pStatus;
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Apr 30, 2014 7:44 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

@premji: We do not understand what your problem is. You need to give a lot more detail if you want us to help you.

@kathirvelt: Was that supposed to be a solution to premji's problem? If so, then you are making a lot of assumptions.
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
premji
PostPosted: Thu May 01, 2014 11:55 pm    Post subject: How can we add new data to Outputroot Reply with quote

Acolyte

Joined: 01 Jul 2013
Posts: 64

Hi All through below my problem was resolved, my issue is I will get XML message with namespaces that I need to add to environment. I added successfully but when I retrieved from environment and assigned to output, that time I faced problems. But by using below code it's getting resolved.
New issue is if I suppose added some data in environment then assign to output root I got new structure in Output root not old one with new data.
Can any one do some help to resolve this.


Here is the Code

CREATE LASTCHILD OF Environment.Variables.Input DOMAIN('XML') NAME 'XMLMessage';
SET Environment.Variables.XMLMessage = InputRoot.XML;

Later

SET OutputRoot.XML = Environment.Variables.Input.XMLMessage;

This preserves the XML Structure
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri May 02, 2014 12:02 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Please do not use the XML Parser unless you are using a version of broker so old that it should really be pushing up the daisies.

Change the 'XML' to 'XMLNSC'.

The XML Parser has been deprecated for at least THREE if not FOUR Major releases of Broker/IIB. It should only be used on flows that have been migrated from say V2.1
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
premji
PostPosted: Fri May 02, 2014 1:45 am    Post subject: How can we add new data to Outputroot Reply with quote

Acolyte

Joined: 01 Jul 2013
Posts: 64

Hi I already changed XML to XMLNSC, sorry I forgot to change in code which I was posted
Back to top
View user's profile Send private message
premji
PostPosted: Fri May 02, 2014 1:48 am    Post subject: How can we add new data to Outputroot Reply with quote

Acolyte

Joined: 01 Jul 2013
Posts: 64

Now issue is, if I added some new fields to Environment that is not added to old XML data structure for that new tree created with same root name. how can we fix issue. Can any one help to resolve this issue.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri May 02, 2014 3:08 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

so you are now double posting?
How does this latest reply differ from the other post you have going at the moment?
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
premji
PostPosted: Fri May 02, 2014 4:28 am    Post subject: How can we add new data to Outputroot Reply with quote

Acolyte

Joined: 01 Jul 2013
Posts: 64

Hi, Thanks for your reply. Both are same there I given one some example message, here I asked how to add new fields to existing XML name spaces message in environment
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 » Read XML message with URL inside Root element
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.