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 » reference variables with default namespace

Post new topic  Reply to topic
 reference variables with default namespace « View previous topic :: View next topic » 
Author Message
dilse
PostPosted: Tue Sep 13, 2005 8:27 am    Post subject: reference variables with default namespace Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Hi folks,
I am having problem in specifying the default namespace for reference variables. I am on WBIMB V5 with CSD 05. Here is my ESQL scenario.

Code:
DECLARE dns NAMESPACE 'http://www.ibm.com/industries/financialservices/xxx';
DECLARE xsi NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance';
      
SET OutputRoot.XMLNS.(XML.XmlDecl)= '';
SET OutputRoot.XMLNS.(XML.XmlDecl).(XML.Version) = '1.0';
SET OutputRoot.XMLNS.(XML.XmlDecl).(XML."Encoding") = 'UTF-8';
      
SET OutputRoot.XMLNS.dns:Message.(XML.Attribute)bodyType = 'XX-XML';
SET OutputRoot.XMLNS.dns:Message.(XML.Attribute)Version = '';
SET OutputRoot.XMLNS.dns:Message.(XML.NamespaceDecl)xmlns ='http://www.ibm.com/industries/financialservices/xxx';
SET OutputRoot.XMLNS.dns:Message.(XML.NamespaceDecl)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance';
SET OutputRoot.XMLNS.dns:Message.(XML.Attribute)xsi:schemaLocation = 'http://www.ibm.bom/indudtsries/financialservices/xxxservices.xsd';


I was able to specify default namespace(dns) successfully in the above code. I am getting the output without NS! etc...
But when I am trying to create reference to a variable I am finsding it difficult specify default namespace. I tried the following way.

Code:
DECLARE msgRef REFERENCE TO OutputRoot.XMLNS.dns:Message;
CREATE LASTCHILD OF msgRef NAME 'MyMessage';
DECLARE myMsgRef REFERENCE TO msgRef.dns:MyMessage;


When I debug the flow with this code it is executing fine in the compute node but it was not able to write to the MQOutput node. Exceptionlist gives this info for 'MyMessage'.
"Element must have a namespace specified if there is a default namespace in scope".

Please throw some light on this as to how to go about declaring a reference with default namespace.

Thanks in advance,
_________________
DilSe..

Take life as it comes..
Back to top
View user's profile Send private message
dilse
PostPosted: Tue Sep 13, 2005 10:06 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

I appreciate any kind of input...


Thanks..,
_________________
DilSe..

Take life as it comes..
Back to top
View user's profile Send private message
recallsunny
PostPosted: Tue Sep 13, 2005 1:12 pm    Post subject: Reply with quote

Disciple

Joined: 15 Jun 2005
Posts: 163
Location: Massachusetts

Code:
CREATE LASTCHILD OF msgRef NAME 'MyMessage' NAMESPACE dns;


Try this to specify the Namespace in CREATE statement.
Back to top
View user's profile Send private message
dilse
PostPosted: Tue Sep 13, 2005 1:34 pm    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Thanks for reply sunny. I tried with the step you told me but it is coming up with the syntax error saying:

Quote:
Syntax error : expected ';' but found 'keyword NameSpace'.

The expected token was not found.

Correct the syntax of your expression and redeploy the message flow.


Any other suggestions?????
_________________
DilSe..

Take life as it comes..
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Sep 13, 2005 2:16 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

The tooling requires the NAMESPACE clause before the NAME clause like this:

Code:
CREATE LASTCHILD OF msgRef NAMESPACE dns NAME 'MyMessage';


The docs for the CREATE statement do show the NAMESPACE clause, and they do document what it is for and they do document the order of the clauses, and you are allowed to read them


Regards
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
dilse
PostPosted: Wed Sep 14, 2005 5:06 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Thanks a lot mgk & sunny for your input. I read the manual before posting here but I didn't get a clear idea and also searched in this forum but couldn't find one that suits to this situation.
_________________
DilSe..

Take life as it comes..
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 » reference variables with default namespace
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.