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 » XML Format

Post new topic  Reply to topic
 XML Format « View previous topic :: View next topic » 
Author Message
venkat kurra
PostPosted: Fri Jun 09, 2006 7:28 pm    Post subject: XML Format Reply with quote

Master

Joined: 18 Oct 2001
Posts: 245
Location: Bloomington , IL

Hi,

I am trying to get SSNTaxID (= SSN) from the follwoing xml message,

<?xml version="1.0" encoding="UTF-8"?><bons0:CustomerResponse xmlns:bons0="http://CRMIntegrationLibrary/Customer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://CRMIntegrationLibrary/Customer CustomerResponse.xsd "><SSN>SSN</SSN><dateOfBirth>dateOfBirth</dateOfBirth><response>response1</response></bons0:CustomerResponse>

the following statement is not working for me,

SET OutputRoot.XML.CustomerResponse.SSN = InputRoot.XML.CustomerResponse.SSNTaxID;

also tried

SET OutputRoot.XML.SSN = InputRoot.XML.CustomerResponse.SSNTaxID;


Do i need to add any additional tag?
_________________
Thanks,

Venkat Kurra

IBM Certified Specialist-MQSeries
IBM Websphere MQSeries Administrator
IBM WebSphere Message Broker System Admin
Back to top
View user's profile Send private message Send e-mail
jbanoop
PostPosted: Fri Jun 09, 2006 11:04 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

Seems ur XML has the tag called SSN while u r trying to refer to SSNTaxID in the code (InputRoot.XML.CustomerResponse.SSNTaxID)

Anoop
Back to top
View user's profile Send private message Yahoo Messenger
venkat kurra
PostPosted: Sat Jun 10, 2006 4:00 am    Post subject: Reply with quote

Master

Joined: 18 Oct 2001
Posts: 245
Location: Bloomington , IL

Previously i gave the reverse order...

SET OutputRoot.XML.CustomerResponse.SSNTaxID = InputRoot.XML.CustomerResponse.SSN;

also tried

SET OutputRoot.XML.SSNTaxID = InputRoot.XML.SSN;

What ever how to format this type of XML?
_________________
Thanks,

Venkat Kurra

IBM Certified Specialist-MQSeries
IBM Websphere MQSeries Administrator
IBM WebSphere Message Broker System Admin
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Sat Jun 10, 2006 4:42 am    Post subject: Re: XML Format Reply with quote

Grand High Poobah

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

venkat kurra wrote:
Hi,

I am trying to get SSNTaxID (= SSN) from the follwoing xml message,

<?xml version="1.0" encoding="UTF-8"?><bons0:CustomerResponse xmlns:bons0="http://CRMIntegrationLibrary/Customer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://CRMIntegrationLibrary/Customer CustomerResponse.xsd "><SSN>SSN</SSN><dateOfBirth>dateOfBirth</dateOfBirth><response>response1</response></bons0:CustomerResponse>

the following statement is not working for me,

SET OutputRoot.XML.CustomerResponse.SSN = InputRoot.XML.CustomerResponse.SSNTaxID;

also tried

SET OutputRoot.XML.SSN = InputRoot.XML.CustomerResponse.SSNTaxID;


Do i need to add any additional tag?


Try (from memory)
Code:
declare bons0 namespace 'http://CRMIntegrationLibrary/Customer';
Set OutputRoot.XML.SSNTaxID=InputRoot.XML.bons0:CustomerResponse.SSN;

Read up all about the XMLNS and namespaces that's what the manuals are for.

If in doubt use a reference and move it down the tree. As you move it print out the fieldnamespace(myref) information.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sat Jun 10, 2006 5:39 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You must use a namespace enabled parser to handle namespaces.

You can't use 'XML' for namespace enabled XML. You have to use XMLNS, or preferably XMLNSC in v6.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
venkat kurra
PostPosted: Sat Jun 10, 2006 10:11 am    Post subject: Reply with quote

Master

Joined: 18 Oct 2001
Posts: 245
Location: Bloomington , IL

Thanks ..i will look in to it.

For now it worked with the following syntax,

SET OutputRoot.XML."bons0:CustomerResponse".SSN = InputRoot.XML."bons0:CustomerResponse".SSNTaxID;
_________________
Thanks,

Venkat Kurra

IBM Certified Specialist-MQSeries
IBM Websphere MQSeries Administrator
IBM WebSphere Message Broker System Admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon Jun 19, 2006 1:18 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Jeff said
Quote:
You must use a namespace enabled parser to handle namespaces.

You can't use 'XML' for namespace enabled XML. You have to use XMLNS, or preferably XMLNSC in v6.
This is true. You may have got it 'working' for now, but your solution is fundamentally flawed. You are using a parser which is effectively deprecated, and your message flow logic is assuming that the namespace prefixes will never change. PLEASE change the parser to XMLNS ( if you're on v5 ) or XMLNSC ( if you're on v6 ). The development cost will be small, and the potential payoff will be large in both performance and future maintenance.
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 » XML Format
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.