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 » Access Xml Attribite

Post new topic  Reply to topic
 Access Xml Attribite « View previous topic :: View next topic » 
Author Message
DBN-GUY
PostPosted: Wed Jul 26, 2006 9:58 am    Post subject: Access Xml Attribite Reply with quote

Newbie

Joined: 26 Jul 2006
Posts: 6
Location: South Africa

Hi All

I am currently using MQ Broker 6(interim fix 4) running on Windows.
I am getting a message from a Web Service

My structure is HTTP Input--> compute --> MQoutput
The properties of my Input node are
Domain MRM
Format XML1

<?xml version="1.0" encoding="UTF-8"?>
<ReceiveData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="AIPOfferDecision.xsd">
<Application AccountName="" Number="0">
<Decision Code="0"/>
<Originator Code="" Name="" ReferenceNumber="">
<Vendor Code=""/>
</Originator>
</Application>
<Operational DateTime="2001-12-31T12:00:00">
<Message code="0" name=""/>
<Security Signature=""/>
</Operational>
</ReceiveData>

I need to access one of the attributes ie "Number" but I am not able to do so.
I have tried the following in my ESQL code
DECLARE tns NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';

SET OutputRoot.MRM.W02_APLCN_N = InputBody.tns:Body.Application.(XML.Attribute)Number;

But this doesnt work

and

SET OutputRoot.MRM.W02_APLCN_N = (SELECT FIELDVALUE(I.Application) AS Application,
-- FIELDVALUE(I.Application.(XML.Attribute)Number) AS number
-- FROM InputBody.tns:Body AS I);

No success as well

Basically I need to just access the attibute from within the XML.

Thanks in advance for your assistance
Back to top
View user's profile Send private message
madi
PostPosted: Wed Jul 26, 2006 11:16 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

I havent worked with namespaces much but shouldn't u specify
Code:
ReceiveData
somewhere in the ESQL

--madi
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jul 26, 2006 2:33 pm    Post subject: Re: Access Xml Attribite Reply with quote

Grand High Poobah

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

DBN-GUY wrote:
DECLARE tns NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';

SET OutputRoot.MRM.W02_APLCN_N = InputBody.tns:Body.Application.(XML.Attribute)Number;


Try
Code:
DECLARE tns NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE ref REFERENCE TO InputBody.tns:Body;
Now you need to step through the children of ref to find the one with name 'Application' and ask for its namespace before you can code.
See fieldnamespace function...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Access Xml Attribite
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.