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 exception.

Post new topic  Reply to topic Goto page 1, 2  Next
 namespace exception. « View previous topic :: View next topic » 
Author Message
mvs
PostPosted: Fri Oct 03, 2008 6:56 am    Post subject: namespace exception. Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Hi All,
I have some simple error/exception.

my flow looks like

InputNode-->ComputeNode1-->ComputeNode2-->OutpuNode




In computeNode1, is mapping and passing to computeNode2. In computeNode2, I am adding whole input message to one element and passing.

i am using namespace only for output message but not for input message.

my code looks like below

Code:

SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.(XMLNSC.NamespaceDecl)"xsi:schemaLocation"      =   'http://www.example.com/Any D:\temp_sbl\GenericXMLMessage.xsd';
SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.(XMLNSC.NamespaceDecl)xmlns      =   Environment.Variable.General_NS;
SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.(XMLNSC.NamespaceDecl)"xmlns:xsi"   =   'http://www.w3.org/2001/XMLSchema-instance';      
SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{Environment.Variable.General_NS}:MessageType   =   'abc';
SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{Environment.Variable.General_NS}:SourceApplication   = 'XML';
Declare ns1 CHAR;
SET ns1 = 'http://www.siebel.com/xml/Exemption';
   
SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SeibelMessage (XMLNSC.NamespaceDecl) xmlns = ns1;
SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SeibelMessage   =   InputRoot.XMLNSC;


The exception i am getting

(0x01000000):ParserException = (
(0x03000000):File = 'F:\build\S600_P\src\MTI\MTIforBroker\GenXmlParser3\ImbGenericXmlAsgardWriter.cpp'
(0x03000000):Line = 525
(0x03000000):Function = 'ImbGenericXmlAsgardWriter::writeElement'
(0x03000000):Type = ''
(0x03000000):Name = ''
(0x03000000):Label = ''
(0x03000000):Catalog = 'BIPv600'
(0x03000000):Severity = 3
(0x03000000):Number = 5014
(0x03000000):Text = 'Element must have a namespace specified if there is a default namespace in scope'
(0x01000000):Insert = (
(0x03000000):Type = 5
(0x03000000):Text = 'Exemptions'

[/code]

I have added the trace node after computenode2, trace shows the exactly what i expected and while placing message to outputnode/outputqueue the exception generating.


I am not using any name space for the input message.

Any idea regarding this exception
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Fri Oct 03, 2008 9:44 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi mvs,

Are you showing us the whole code ? Where does this 'Exemptions' field lie ?

Check if you have used the namespace while creating that field.

Regards.
Back to top
View user's profile Send private message Send e-mail
mvs
PostPosted: Fri Oct 03, 2008 10:20 am    Post subject: Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Exemptions is the root tag of comuterNode1 output, the output of the computeNode1
XMLNSC.Exemptions.Document.Source
I am not using any namespace in ComputeNode1.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Fri Oct 03, 2008 9:01 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi mvs,
mvs wrote:
Exemptions is the root tag of comuterNode1 output, the output of the computeNode1
Please take a file trace after compute1 and paste the contents here.

Regards.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Sat Oct 04, 2008 11:05 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You need to assign the correct namespace to 'Exemptions' and all other elments which have the same namespace. What's wrong with the error message? It seems fairly clear to me.
Back to top
View user's profile Send private message
mvs
PostPosted: Mon Oct 06, 2008 9:38 am    Post subject: Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Hi,
I tried couple of other method also but didn't worked. I guess trace result may be helpful to find out the problem.


the Compute Node2 Code looks like below


Code:
CREATE COMPUTE MODULE FusionReplyTgt_Wrapper
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN
      CALL CopyMessageHeaders();
      DECLARE EnvRef REFERENCE TO Environment.Variable;
      DECLARE ns1 CHAR;
      DECLARE IntObjectName CHAR;
         
      SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.(XMLNSC.NamespaceDecl)"xsi:schemaLocation"                     =   'http://www.example.com/Any D:\temp_sbl\GenericXMLMessage.xsd';
      SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.(XMLNSC.NamespaceDecl)xmlns                                 =   Environment.Variable.General_NS;
      SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.(XMLNSC.NamespaceDecl)"xmlns:xsi"                           =   'http://www.w3.org/2001/XMLSchema-instance';      
      SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{Environment.Variable.General_NS}:MessageType                  =   Environment.Variable.MsgTyp;
      SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{Environment.Variable.General_NS}:SourceApplication               =   Environment.Variable.AppGrp;
   
      SET EnvRef.Results[]   =   (SELECT T.REFERENCE,T.TARGETVALUE FROM Database.DATAXREF AS T WHERE T.APPLICATION = Environment.Variable.AppGrp AND T.TARGETAPPLICATION = 'FUSION' AND T.MESSAGETYPE = Environment.Variable.MsgTyp);
   
   
      DECLARE NN INTEGER;
      SET NN = CARDINALITY(EnvRef.Results[]);
      IF NN = 1 THEN
         FOR results AS EnvRef.Results[] DO
            SET   IntObjectName   =   TRIM(results.REFERENCE);
            SET ns1          =   TRIM(results.TARGETVALUE);
         END FOR;         
         
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage.(XMLNSC.NamespaceDecl)xmlns            =   ns1;         
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage.(XMLNSC.Attribute)MessageId            =   '';
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage.(XMLNSC.Attribute)MessageType         =   '';
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage.(XMLNSC.Attribute)IntObjectName         =   IntObjectName;
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage.(XMLNSC.Attribute)IntObjecntObjectFormat   =   'Hierarchical';
         
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage                  =   InputBody;      --'Test The Message';


      END IF;


The trace results of before compute node2 and





(
(0x01000000):Properties = (
(0x03000000):MessageSet = 'TAXWARE'
(0x03000000):MessageType = 'TaxwareTaxExemptCertRep'
(0x03000000):MessageFormat = 'XML'
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 819
(0x03000000):Transactional = TRUE



(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2008-10-06 15:31:52.480'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'QL.FU.RPY.TGT'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Format = 'MQHRF2 '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 1
(0x03000000):MsgId = X'414d51204d5153494456322020202020aece84482072682f'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'MQSIDV2 '
(0x03000000):UserIdentifier = 'MUSR_MQADMIN'
(0x03000000):AccountingToken = X'160105150000005c9a4cfb6921b6a2651468a5ec03000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 28
(0x03000000):PutApplName = 'WebSphere MQ Client for Java'
(0x03000000):PutDate = DATE '2008-10-06'
(0x03000000):PutTime = GMTTIME '15:31:52.480'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):MQRFH2 = (
(0x03000000):Version = 2
(0x03000000):Format = 'MQSTR '
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 819
(0x03000000):Flags = 0
(0x03000000):NameValueCCSID = 1208
(0x01000000):mcd = (
(0x01000000):Msd = (
(0x02000000): = 'XMLNSC'
)
(0x01000000):Set = (
(0x02000000): = 'TAXWARE'
)
(0x01000000):Type = (
(0x02000000): = 'TaxwareTaxExemptCertRep'
)
(0x01000000):Fmt = (
(0x02000000): = 'XML'
)
)
)

(0x01000000):XMLNSC = (
(0x03000000):Exemptions = ''
(
(0x01000000):Document = (
(0x03000000):LegalEntity = 'Exception Message'
(0x03000000):Source = 'Siebel Customer'
(0x03000000):CompanyId = '12121241251325'
(0x03000000):RowId = '1-2QJN'
(0x03000000):Status = 'True'
(0x01000000):ListOfExemptionDetails = (
(0x01000000):ExemptionDetails = (
(0x03000000):LegalEntity = 'USD'
(0x03000000):JurisdictionName = ''
(0x03000000):Status = 'Active'
(0x03000000):EffectiveDate = '08/22/2007 0024:00:00'
(0x03000000):EndDate = '08/22/2009 0024:00:00'
(0x03000000):EntityUse = 'Entity 1'
(0x03000000):TaxTypeName = ''
(0x03000000):ReceivedFlag = 'Flag1'
(0x03000000):TaxRuleName = ''
(0x03000000):Level = 'L1'
(0x03000000):AppliesToTJ = 'ap'
(0x03000000):CustomerRegNo = 'cn1'
(0x03000000):CerificateNo = '123'
(0x03000000):Amount = '10'
(0x03000000):Rate = '11'
(0x03000000):ErrorMsg = 'err'
(0x03000000):ErrorCode = 'ECR'
)
(0x01000000):ExemptionDetails = (
(0x03000000):LegalEntity = 'USD1'
(0x03000000):JurisdictionName = ''
(0x03000000):Status = 'Active'
(0x03000000):EffectiveDate = '08/22/2007 0024:00:00'
(0x03000000):EndDate = '08/23/2009 0024:00:00'
(0x03000000):EntityUse = 'Chw'
(0x03000000):TaxTypeName = ''
(0x03000000):ReceivedFlag = 'ecf'
(0x03000000):TaxRuleName = ''
(0x03000000):Level = 'fff'
(0x03000000):AppliesToTJ = 'aj'
(0x03000000):CustomerRegNo = ''
(0x03000000):CerificateNo = 'cn1'
(0x03000000):Amount = '10'
(0x03000000):Rate = '11'
(0x03000000):ErrorMsg = 'err'
(0x03000000):ErrorCode = 'ECR'
)
(0x01000000):ExemptionDetails = (
(0x03000000):LegalEntity = 'USD2'
(0x03000000):JurisdictionName = ''
(0x03000000):Status = 'Active'
(0x03000000):EffectiveDate = '08/22/2007 0024:00:00'
(0x03000000):EndDate = '08/24/2009 0024:00:00'
(0x03000000):EntityUse = 'Chw'
(0x03000000):TaxTypeName = ''
(0x03000000):ReceivedFlag = 'ecf'
(0x03000000):TaxRuleName = ''
(0x03000000):Level = 'fff'
(0x03000000):AppliesToTJ = 'aj'
(0x03000000):CustomerRegNo = ''
(0x03000000):CerificateNo = 'cn1'
(0x03000000):Amount = '10'
(0x03000000):Rate = '11'
(0x03000000):ErrorMsg = 'err'
(0x03000000):ErrorCode = 'ECR'
)
(0x01000000):ExemptionDetails = (
(0x03000000):LegalEntity = 'USD3'
(0x03000000):JurisdictionName = ''
(0x03000000):Status = 'Active'
(0x03000000):EffectiveDate = '08/22/2007 0024:00:00'
(0x03000000):EndDate = '08/25/2009 0024:00:00'
(0x03000000):EntityUse = 'Chw'
(0x03000000):TaxTypeName = ''
(0x03000000):ReceivedFlag = 'ecf'
(0x03000000):TaxRuleName = ''
(0x03000000):Level = 'fff'
(0x03000000):AppliesToTJ = 'aj'
(0x03000000):CustomerRegNo = ''
(0x03000000):CerificateNo = 'cn1'
(0x03000000):Amount = '10'
(0x03000000):Rate = '11'
(0x03000000):ErrorMsg = 'err'
(0x03000000):ErrorCode = 'ECR'
)
)
)
)
)
)


The trace results of after compute node2





----------Root------------------



(
(0x01000000):Properties = (
(0x03000000):MessageSet = 'TAXWARE'
(0x03000000):MessageType = 'TaxwareTaxExemptCertRep'
(0x03000000):MessageFormat = 'XML'
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 819
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = TRUE
(0x03000000):CreationTime = GMTTIMESTAMP '2008-10-06 15:31:52.480'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
(0x03000000):ContentType = ''
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'QL.FU.RPY.TGT'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 273
(0x03000000):CodedCharSetId = 819
(0x03000000):Format = 'MQHRF2 '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 1
(0x03000000):MsgId = X'414d51204d5153494456322020202020aece84482072682f'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'MQSIDV2 '
(0x03000000):UserIdentifier = 'MUSR_MQADMIN'
(0x03000000):AccountingToken = X'160105150000005c9a4cfb6921b6a2651468a5ec03000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 28
(0x03000000):PutApplName = 'WebSphere MQ Client for Java'
(0x03000000):PutDate = DATE '2008-10-06'
(0x03000000):PutTime = GMTTIME '15:31:52.480'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000000):MQRFH2 = (
(0x03000000):Version = 2
(0x03000000):Format = 'MQSTR '
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 819
(0x03000000):Flags = 0
(0x03000000):NameValueCCSID = 1208
(0x01000000):mcd = (
(0x01000000):Msd = (
(0x02000000): = 'XMLNSC'
)
(0x01000000):Set = (
(0x02000000): = 'TAXWARE'
)
(0x01000000):Type = (
(0x02000000): = 'TaxwareTaxExemptCertRep'
)
(0x01000000):Fmt = (
(0x02000000): = 'XML'
)
)
)
(0x01000000):XMLNSC = (
(0x01000000)http://www.example.com/Any:GenericMessage = (
(0x03000102):xsi:schemaLocation = 'http://www.example.com/Any D:\temp_sbl\GenericXMLMessage.xsd'
(0x03000102):xmlns = 'http://www.example.com/Any'
(0x03000102):xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'
(0x03000000)http://www.example.com/Any:MessageType = 'TaxwareTaxExemptCertRep'
(0x03000000)http://www.example.com/Any:SourceApplication = 'TAXWARE'
(0x01000000)http://www.siebel.com/xml/ListofTaxExemptInquiry:SiebelMessage = (
(0x03000000):Exemptions = ''
(
(0x01000000):Document = (
(0x03000000):LegalEntity = 'Exception Message'
(0x03000000):Source = 'Siebel Customer'
(0x03000000):CompanyId = '12121241251325'
(0x03000000):RowId = '1-2QJN'
(0x03000000):Status = 'True'
(0x01000000):ListOfExemptionDetails = (
(0x01000000):ExemptionDetails = (
(0x03000000):LegalEntity = 'USD'
(0x03000000):JurisdictionName = ''
(0x03000000):Status = 'Active'
(0x03000000):EffectiveDate = '08/22/2007 0024:00:00'
(0x03000000):EndDate = '08/22/2009 0024:00:00'
(0x03000000):EntityUse = 'Entity 1'
(0x03000000):TaxTypeName = ''
(0x03000000):ReceivedFlag = 'Flag1'
(0x03000000):TaxRuleName = ''
(0x03000000):Level = 'L1'
(0x03000000):AppliesToTJ = 'ap'
(0x03000000):CustomerRegNo = 'cn1'
(0x03000000):CerificateNo = '123'
(0x03000000):Amount = '10'
(0x03000000):Rate = '11'
(0x03000000):ErrorMsg = 'err'
(0x03000000):ErrorCode = 'ECR'
)
(0x01000000):ExemptionDetails = (
(0x03000000):LegalEntity = 'USD1'
(0x03000000):JurisdictionName = ''
(0x03000000):Status = 'Active'
(0x03000000):EffectiveDate = '08/22/2007 0024:00:00'
(0x03000000):EndDate = '08/23/2009 0024:00:00'
(0x03000000):EntityUse = 'Chw'
(0x03000000):TaxTypeName = ''
(0x03000000):ReceivedFlag = 'ecf'
(0x03000000):TaxRuleName = ''
(0x03000000):Level = 'fff'
(0x03000000):AppliesToTJ = 'aj'
(0x03000000):CustomerRegNo = ''
(0x03000000):CerificateNo = 'cn1'
(0x03000000):Amount = '10'
(0x03000000):Rate = '11'
(0x03000000):ErrorMsg = 'err'
(0x03000000):ErrorCode = 'ECR'
)
(0x01000000):ExemptionDetails = (
(0x03000000):LegalEntity = 'USD2'
(0x03000000):JurisdictionName = ''
(0x03000000):Status = 'Active'
(0x03000000):EffectiveDate = '08/22/2007 0024:00:00'
(0x03000000):EndDate = '08/24/2009 0024:00:00'
(0x03000000):EntityUse = 'Chw'
(0x03000000):TaxTypeName = ''
(0x03000000):ReceivedFlag = 'ecf'
(0x03000000):TaxRuleName = ''
(0x03000000):Level = 'fff'
(0x03000000):AppliesToTJ = 'aj'
(0x03000000):CustomerRegNo = ''
(0x03000000):CerificateNo = 'cn1'
(0x03000000):Amount = '10'
(0x03000000):Rate = '11'
(0x03000000):ErrorMsg = 'err'
(0x03000000):ErrorCode = 'ECR'
)
(0x01000000):ExemptionDetails = (
(0x03000000):LegalEntity = 'USD3'
(0x03000000):JurisdictionName = ''
(0x03000000):Status = 'Active'
(0x03000000):EffectiveDate = '08/22/2007 0024:00:00'
(0x03000000):EndDate = '08/25/2009 0024:00:00'
(0x03000000):EntityUse = 'Chw'
(0x03000000):TaxTypeName = ''
(0x03000000):ReceivedFlag = 'ecf'
(0x03000000):TaxRuleName = ''
(0x03000000):Level = 'fff'
(0x03000000):AppliesToTJ = 'aj'
(0x03000000):CustomerRegNo = ''
(0x03000000):CerificateNo = 'cn1'
(0x03000000):Amount = '10'
(0x03000000):Rate = '11'
(0x03000000):ErrorMsg = 'err'
(0x03000000):ErrorCode = 'ECR'
)
)
)
)
)
)
)
)



I am getting the below exception while writing message to output queue.

----------
No user action required.
2008-10-06 10:31:52.973350 14384 UserTrace BIP2231E: Error detected whilst processing a message in node 'FusionReplyTgt.QL.FU.RPY.TGT'.
The message broker detected an error whilst processing a message in node 'FusionReplyTgt.QL.FU.RPY.TGT'. The message has been augmented with an exception list and has been propagated to the node's failure terminal for further processing.
See the following messages for details of the error.
2008-10-06 10:31:52.973365 14384 RecoverableException BIP2230E: Error detected whilst processing a message in node 'FusionReplyTgt.VISWA.TEST'.
The message broker detected an error whilst processing a message in node 'FusionReplyTgt.VISWA.TEST'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2008-10-06 10:31:52.973377 14384 ParserException BIP5010E: XML Writing Errors have occurred.
Errors have occurred during writing of XML.
Review further error messages for an indication to the cause of the errors.
2008-10-06 10:31:52.973384 14384 ParserException BIP5014E: Element must have a namespace specified if there is a default namespace in scope.
Whilst writing the XMLNS message, element 'Exemptions' was found to be in scope of a default namespace, but this element does not have a namespace defined.
This error can occur if the NamespaceDecl correlation name has been used to create a default namespace for a parent element, and a child element has been created that does not have a namespace. If you have defined a default namespace in your output message tree, then all elements that are in scope of this default namespace must be defined to be in a namespace. Modify the output message tree so that element 'Exemptions' is defined to be in a namespace. If element 'Exemptions' belongs to the default namespace, then this element needs to be created in the default namespace.
2008-10-06 10:31:52
-------

Is there any need to change in my esql code to work on this?
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Oct 06, 2008 10:05 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi mvs,
mvs wrote:
Code:
SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage                  =   InputBody;      --'Test The Message';


Code:
(0x01000000):XMLNSC     = (
    (0x01000000)http://www.example.com/Any:GenericMessage = (
      (0x03000102):xsi:schemaLocation                                            = 'http://www.example.com/Any D:\temp_sbl\GenericXMLMessage.xsd'
      (0x03000102):xmlns                                                         = 'http://www.example.com/Any'
      (0x03000102):xmlns:xsi                                                     = 'http://www.w3.org/2001/XMLSchema-instance'
      (0x03000000)http://www.example.com/Any:MessageType                 = 'TaxwareTaxExemptCertRep'
      (0x03000000)http://www.example.com/Any:SourceApplication           = 'TAXWARE'
      (0x01000000)http://www.siebel.com/xml/ListofTaxExemptInquiry:SiebelMessage = (
        (0x03000000):Exemptions = ''
        (
          (0x01000000):Document = (
            (0x03000000):LegalEntity            = 'Exception Message'
            (0x03000000):Source                 = 'Siebel Customer'
            (0x03000000):CompanyId              = '12121241251325'
            (0x03000000):RowId                  = '1-2QJN'
            (0x03000000):Status                 = 'True'
The line of code in your compute 2 is taking the inputBody as such without namespace and putting it into a message which requires namespaces.

In the trace snippet above you can see that starting with your "Exemptions" the fields below do not have a namespace qualifier.

Even though a default namespace means that a prefix is not required, when you create the fields you do need to specify it.

Regards.
Back to top
View user's profile Send private message Send e-mail
mvs
PostPosted: Mon Oct 06, 2008 10:12 am    Post subject: Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Hi Elvis,
Thanks for the info. I am not sure what's the default name space prefix. Could you please let me know how to find the default namespace ?
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Oct 06, 2008 11:17 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi mvs,

Code:
(0x03000102):xmlns = 'http://www.example.com/Any'

The one without the prefix is the default namespace...unless someone tried to be a real genius

Now in the esql you need to DECLARE a prefix for it and use it to code the fields...BUT not the namespace declaration itself(it should come out as the code above).

Regards.
Back to top
View user's profile Send private message Send e-mail
mvs
PostPosted: Tue Oct 07, 2008 7:22 am    Post subject: Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Hi elvis,

i declared the name space
in my ESQL code like

Code:
DECLARE InRoot REFERENCE To InputRoot;
      DECLARE OutRoot REFERENCE TO OutputRoot.XMLNSC;
      DECLARE ns1 NAMESPACE 'http://www.siebel.com/xml/ListofTaxExemptInquiry';
      DECLARE ns2 NAMESPACE 'http://www.example.com/Any';
      
      
SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.(XMLNSC.NamespaceDecl)"xsi:schemaLocation"                     =   'http://www.example.com/Any D:\temp_sbl\GenericXMLMessage.xsd';
       SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.(XMLNSC.NamespaceDecl) xmlns                                 =   ns2;
      SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.(XMLNSC.NamespaceDecl)"xmlns:xsi"                           =   'http://www.w3.org/2001/XMLSchema-instance';      
      SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{Environment.Variable.General_NS}:MessageType                  =   Environment.Variable.MsgTyp;
      SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{Environment.Variable.General_NS}:SourceApplication               =   Environment.Variable.AppGrp;
   
      SET EnvRef.Results[]   =   (SELECT T.REFERENCE,T.TARGETVALUE FROM Database.DATAXREF AS T WHERE T.APPLICATION = Environment.Variable.AppGrp AND T.TARGETAPPLICATION = 'FUSION' AND T.MESSAGETYPE = Environment.Variable.MsgTyp);
   
   
      DECLARE NN INTEGER;
      SET NN = CARDINALITY(EnvRef.Results[]);
      IF NN = 1 THEN
         FOR results AS EnvRef.Results[] DO
            SET   IntObjectName   =   TRIM(results.REFERENCE);
--            SET ns1          =   TRIM(results.TARGETVALUE);
         END FOR;         
         
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage.(XMLNSC.NamespaceDecl)xmlns         =   ns1;         
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage.(XMLNSC.Attribute)MessageId            =   '';
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage.(XMLNSC.Attribute)MessageType         =   '';
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage.(XMLNSC.Attribute)IntObjectName         =   IntObjectName;
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage.(XMLNSC.Attribute)IntObjecntObjectFormat   =   'Hierarchical';
         
         SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.{ns1}:SiebelMessage                  =   InputRoot.XMLNSC;   




But still i am getting the same error.
one more thing i tried is

i commented the line(i.e first defualt namespace in first place) and its working fine but it adds prefix <NS1:GenericMessage xmlns:NS1


-- SET OutputRoot.XMLNSC.{Environment.Variable.General_NS}:GenericMessage.(XMLNSC.NamespaceDecl) xmlns = ns2;



Could you pls let me know where i am doing wrong?
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Oct 07, 2008 9:59 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi mvs,

I think you have not still understood the concept of the default namespace.

When you comment out the line of code, you are only saying that there is no default namespace (and that does not mean that the elements, which till now were using this default namespace don't have a namespace tied to them anymore).

So what happens is, of all the elements which were meant to have the default namespace, the parent most will add an "xmlns:NS1" at it's level, and all these elements will attain a prefix NS1.

By commenting that line of code, you are saying that your xml can have fields which don't belong to/need/use any namespace. That's why your code starts working.

What you should be doing is, creating every element which you need from the InputRoot, explicitly in the esql.

Regards.
Back to top
View user's profile Send private message Send e-mail
mvs
PostPosted: Tue Oct 07, 2008 11:41 am    Post subject: Reply with quote

Voyager

Joined: 06 Jul 2007
Posts: 85

Hi elvis,
Thanks. It works if add individual elements.

But,My requirement is to add the whole input message not individual fields. (i mean output of the compute node1 )becuase i don't know the what is the input message elements ( or Content).

And one more thing is, i am getting the name space from the database table.

Help is greatly appreciated regarding this?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 07, 2008 11:45 am    Post subject: Reply with quote

Grand High Poobah

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

The manual says that even if you do declare a default name space you still have to set it in the tree for each element affected. So finally deal with it instead of trying to get around it.

Does not really matter to machines, only to poor humans like you and me...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
chris boehnke
PostPosted: Tue Sep 15, 2009 6:16 am    Post subject: Reply with quote

Partisan

Joined: 25 Jul 2006
Posts: 369

Quote:
What you should be doing is, creating every element which you need from the InputRoot, explicitly in the esql.


In case, if we need to add specific elements from InputRoot to OutputRoot, it will be fine to add the nsamespace qualifier to each element, however, if we jsut have to copy the InputRoot to OutRoot what can we do? Even if we have to add specific elements from InputRoot to OutputRoot, is there any way we can add the namespace to the parent element and get it assigned to its child elements? If we have to generate a large XML message and if we miss the namespace qualifier for one element, we have to go through the whole ESQL code to search for that particular element for which the namespace qualifier. Is ther any way that we can code the ESQL we can assign the namepace to parent element and namespace will be assigned to all child elements?

Thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Sep 15, 2009 6:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
If we have to generate a large XML message and if we miss the namespace qualifier for one element, we have to go through the whole ESQL code to search for that particular element for which the namespace qualifier. Is ther any way that we can code the ESQL we can assign the namepace to parent element and namespace will be assigned to all child elements?
There is no way to cause namespaces in the message tree to be 'inherited' in the way that you would like.
I take your point about the danger of missing a single namespace qualifier from some random element. Possible solutions are:
- switch on validation in the output node. You will quickly discover which element was at fault
or
- make the namespace a default namespace, as in this thread. You will get 'BIP5014E: Element must have a namespace specified if there is a default namespace in scope.' if you miss out any of the elements. And the error message will identify which element it was.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

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