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 » Namespace assignment

Post new topic  Reply to topic
 Namespace assignment « View previous topic :: View next topic » 
Author Message
mvs
PostPosted: Wed Oct 01, 2008 1:02 pm    Post subject: Namespace assignment Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Dear all,
Can any one help me regarding the below.

I have scenario like

InputNode---->ComputeNode1---->ComputeNode2---->OutputNode

In ComputeNode1, ESQL code looks like below


--------------------------------------------------------------------------------
Code:

DECLARE ns_tw_rep NAMESPACE 'http://www.eample.com/xml/ListofTaxExemptInquiry';
SET Environment.Variable.Seibel_NS = ns_tw_rep;
SET OutputRoot.XMLNSC.ns_tw_rep:SiebelMessage.(XMLNSC.NamespaceDecl)xmlns = ns_tw_rep;
SET OutputRoot.XMLNSC.ns_tw_rep:SiebelMessage.ns_tw_rep:Exemptions.ns_tw_rep:Document.ns_tw_rep:LegalEntity = 'Exception Message';
SET OutputRoot.XMLNSC.ns_tw_rep:SiebelMessage.ns_tw_rep:Exemptions.ns_tw_rep:Document.ns_tw_rep: Source = 'Customer';



output of compute node1

--------------------------------------------------------------------------------
<SiebelMessage xmlns="http://www.eample.com/xml/ListofTaxExemptInquiry" MessageId="" IntObjectName="123" IntObjectFormat="Hierarchical">
<Exemptions>
<Document>
<LegalEntity>Exception Message</LegalEntity>
<Source>Siebel Customer</Source>
</Document>
</Exemptions>
</SiebelMessage>

--------------------------------------------------------------------------------

In computeNode2 code looks below
---------------------------------------
Code:
DECLARE ns1 REFERENCE TO Environment.Variable.Seibel_NS;
SET OutputRoot.XMLNSC.ns1:SiebelMessage.(XMLNSC.NamespaceDecl)xmlns = ns1;
SET OutputRoot.XMLNSC.ns1:SiebelMessage.ns1:TestMessage = InputRoot.XMLNSC.ns1:SiebelMessage.ns1:Exemptions.ns1:D ocument.ns1:LegalEntity ;


I am getting error while tracing , Failed to parse becuase path 3 doesn't exist.

if i do the code in Compute Node2 like below, it works fine
--------------------------------------------------------------------------------
Code:
DECLARE ns1 NAMESPACE 'http://www.eample.com/xml/ListofTaxExemptInquiry';

SET OutputRoot.XMLNSC.ns1:SiebelMessage.(XMLNSC.NamespaceDecl)xmlns = ns1;
SET OutputRoot.XMLNSC.ns1:SiebelMessage.ns1:TestMessage = InputRoot.XMLNSC.ns1:SiebelMessage.ns1:Exemptions.ns1:D ocument.ns1:LegalEntity ;


Could you please help me in this regard. one more intresting thing, its works well for OutputRoot,
SET OutputRoot.XMLNSC.ns1:SiebelMessage.(XMLNSC.NamespaceDecl)xmlns = ns1;
in tracing it shows, assigns namespace. but why its not working for InputRoot[code]
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Oct 02, 2008 12:51 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

An ESQL namespace constant must be declared like this:
Quote:
DECLARE ns_tw_rep NAMESPACE 'http://www.eample.com/xml/ListofTaxExemptInquiry';


You cannot use a reference to a CHARACTER variable in place of a proper namespace constant, as you are attempting to do in Compute2:
Quote:
DECLARE ns1 REFERENCE TO Environment.Variable.Seibel_NS;

You may be able to use the {} syntax to evaluate Environment.Variable.Seibel_NS, like this ( not tested ):
Code:
SET OutputRoot.XMLNSC.{ns1}:SiebelMessage.{ns1}:TestMessage = InputRoot.XMLNSC.{ns1}:SiebelMessage.{ns1}:Exemptions.{ns1}:D ocument.{ns1}:LegalEntity ;
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Thu Oct 02, 2008 1:39 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

How about declaring these reusable namespaces at the schema level in other word in own ESQL -file? I'm remembering that it could work also with that way.

Marko
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Thu Oct 02, 2008 5:50 am    Post subject: Reply with quote

Grand High Poobah

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

Kimbert, could he use following:

Code:
DECLARE ns1 NAMESPACE Environment.Variable.Seibel_NS;


Of course this means that for the duration of the message this namespace ns1 would be locked to the value given at declare time...

This could potentially be alleviated with the scope in which the namespace is declared and used...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mvs
PostPosted: Thu Oct 02, 2008 7:02 am    Post subject: Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Hi Kimbert,

Its working now if i use in curly braces like
{Environment.Variable.Seibel_NS}.

Thanks a lot.

Hi fjb_saper,

DECLARE ns1 NAMESPACE Environment.Variable.Seibel_NS;
if i declare like aove it gives systax error. like below
Syntax error. Valid options include: OVERLAY SUBSTRING TRIM
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 » Namespace assignment
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.