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 » Get Namespace alias dynamically in ESQL

Post new topic  Reply to topic
 Get Namespace alias dynamically in ESQL « View previous topic :: View next topic » 
Author Message
talalanwar
PostPosted: Wed Aug 03, 2016 12:48 am    Post subject: Get Namespace alias dynamically in ESQL Reply with quote

Newbie

Joined: 26 Jan 2013
Posts: 7

Hi Team,

I have a WSDL in which some operations have a Base Type as input parameter. This same Base Type has many derived types defined within same XSD/WSDL. So consumer of this wsdl can pass derived in same operation.

To represent this in an xml/soap message we have to use xsi:type as attribute with the element tag and set the respective type referred with its namespace.

Now the issue we are facing in ESQL is Namespace alias gets changed at run-time and i am unable to set xsi:type with correct NS alias reference.


Here is an example of the code:


Code:

DECLARE ns1 NAMESPACE 'http://schemas.test.org/2004/07/Test';
DECLARE ns NAMESPACE 'http://tempuri.org/';
DECLARE xsi NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';

SET OutputRoot.SOAP.Body.ns:Get.ns:request.(XMLNSC.Attribute)xsi:type = 'ns1:DerivedRequest';
SET OutputRoot.SOAP.Body.ns:Get.ns:request.ns1:EndDate = CURRENT_TIMESTAMP;


ns1 is getting changed to NS2 at runtime. That is breaking the xml because xsi:type is hardcoded.
Back to top
View user's profile Send private message
talalanwar
PostPosted: Wed Aug 03, 2016 1:51 am    Post subject: Reply with quote

Newbie

Joined: 26 Jan 2013
Posts: 7

Found a work around by declaring ns explicitly with root object. It will force alias name to be retained at run time.

Thanks to one of the friends.

Code:

SET OutputRoot.SOAP.Body.ns:Get.(XMLNSC.NamespaceDecl)xmlns:ns1 = ns1;
SET OutputRoot.SOAP.Body.ns:Get.(XMLNSC.NamespaceDecl)xmlns:xsi = xsi;


Last edited by talalanwar on Wed Aug 03, 2016 1:55 am; edited 1 time in total
Back to top
View user's profile Send private message
timber
PostPosted: Wed Aug 03, 2016 1:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1292

You may be hitting a known issue with the XMLNSC domain. Which version of IIB are you using ( please quote the full version number)?
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 » Get Namespace alias dynamically in ESQL
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.