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 » adding type in XML using ESQL along with namespaces(Urgent)

Post new topic  Reply to topic
 adding type in XML using ESQL along with namespaces(Urgent) « View previous topic :: View next topic » 
Author Message
nmaddisetti
PostPosted: Wed Apr 06, 2005 12:04 pm    Post subject: adding type in XML using ESQL along with namespaces(Urgent) Reply with quote

Centurion

Joined: 06 Oct 2004
Posts: 145

Hi all
i want to define type along with name spaces in ESQL
i.e i want to constuct following message in ESQL
every thing is ok
except adding
xsi:type="xsd:string"
xsi:type="xsd2:byte"

how can i add above two using ESQL in the following message
my main concern is adding name spaces
xsi,xsd,xsd2

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org
/2001/XMLSchema" xmlns:xsd2="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns0:updatedb xmlns:ns0="http://xxxx/xxx">
<seqnum xsi:type="xsd:string">aaaaa</seqnum>
<userid xsi:type="xsd:string">bbbbb</userid>
<username xsi:type="xsd2:base64">ccccc</username>
</ns0:updatedb>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Thanks
nmaddisetti
Back to top
View user's profile Send private message
alexey
PostPosted: Wed Apr 06, 2005 1:09 pm    Post subject: Reply with quote

Acolyte

Joined: 18 Dec 2003
Posts: 62
Location: Israel

Hi!
Look in the help for Manipulating messages in the XMLNS domain - it has all information you need.

Your code should be somth. like this (beware, I did not debug this ):

Declare your namespaces in ESQL:
Code:

DECLARE soap_ns NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
DECLARE xsi_ns NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
-- the same for ns0


Use the following to add namespace declarations:
Code:

SET OutputRoot.XMLNS.soap_ns:SOAP-ENV(XML.NamespaceDecl)xmlns:SOAP-ENV = ='http://schemas.xmlsoap.org/soap/envelope/';
SET OutputRoot.XMLNS.soap_ns:SOAP-ENV(XML.NamespaceDecl)xmlns:xsi = ='http://www.w3.org/2001/XMLSchema-instance';
-- the same for xsd2


Add your type attributes:
Code:

SET OutputRoot.XMLNS.soap_ns:SOAP_ENV.soap_ns.Body.ns0:updatedb.ns0:seqnum='aaaaaa';
SET OutputRoot.XMLNS.soap_ns:SOAP_ENV.soap_ns.Body.ns0:updatedb.ns0:seqnum.(XML.Attribute)xsi_ns:type='xsd:string';
-- and the same way for others
Back to top
View user's profile Send private message
nmaddisetti
PostPosted: Wed Apr 06, 2005 1:44 pm    Post subject: Reply with quote

Centurion

Joined: 06 Oct 2004
Posts: 145

Hi Alexy
Thanks for the reply
in the following statemnt you mentioned 'xsd:string' as a value to the type attribute

then xsd wont reffer to
http://www.w3.org/2001/XMLSchema
and it only part of sting


OutputRoot.XMLNS.soap_ns:SOAP_ENV.soap_ns.Body.ns0:updatedb.ns0:seqnum.(XML.Attribute)xsi_ns:type='xsd:string';


can you help me on how to make it to reffer to
http://www.w3.org/2001/XMLSchema
while assigning value to type

Thanks
nmaddisetti
Back to top
View user's profile Send private message
alexey
PostPosted: Wed Apr 06, 2005 1:57 pm    Post subject: Reply with quote

Acolyte

Joined: 18 Dec 2003
Posts: 62
Location: Israel

Hi again,
Quote:
then xsd wont reffer to
http://www.w3.org/2001/XMLSchema
and it only part of sting


It doesn't really need to refer to anything, because there is no namesapces in values of XML, only in tags.

The only thing you have to take care of is the xmlns declaration at the beginning of the message, using (XML.NamespaceDecl), the same way as for xsi namespace. Than just assign the 'xsd:string' as a string value to the attribute.

Alexey.
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 » adding type in XML using ESQL along with namespaces(Urgent)
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.