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 prefix not found in iNamespacePrefixes

Post new topic  Reply to topic
 Namespace prefix not found in iNamespacePrefixes « View previous topic :: View next topic » 
Author Message
MikeOliverAZ
PostPosted: Tue Aug 05, 2014 5:30 pm    Post subject: Namespace prefix not found in iNamespacePrefixes Reply with quote

Apprentice

Joined: 10 Jul 2013
Posts: 47

Using IIB V9.0.0.2

Getting Exception

Code:

(0x01000000:Name     ):RecoverableException = (
      (0x03000000:NameValue):File     = 'F:\build\slot1\S900_P\src\DataFlowEngine\ImbRdl\ImbXPathAxes.cpp' (CHARACTER)
      (0x03000000:NameValue):Line     = 270 (INTEGER)
      (0x03000000:NameValue):Function = 'ImbXPathEngine::substituteNamespace' (CHARACTER)
      (0x03000000:NameValue):Type     = '' (CHARACTER)
      (0x03000000:NameValue):Name     = '' (CHARACTER)
      (0x03000000:NameValue):Label    = '' (CHARACTER)
      (0x03000000:NameValue):Catalog  = 'BIPmsgs' (CHARACTER)
      (0x03000000:NameValue):Severity = 3 (INTEGER)
      (0x03000000:NameValue):Number   = 4359 (INTEGER)
      (0x03000000:NameValue):Text     = 'Namespace prefix not found in iNamespacePrefixes' (CHARACTER)
      (0x01000000:Name     ):Insert   = (
        (0x03000000:NameValue):Type = 5 (INTEGER)
        (0x03000000:NameValue):Text = 'boolean($Root/XMLNSC/svd:UDTO/svd:MessageVariables/svd:OtherVariables/svd:OVParam1[1]='dynamic')' (CHARACTER)
      )
      (0x01000000:Name     ):Insert   = (
        (0x03000000:NameValue):Type = 5 (INTEGER)
        (0x03000000:NameValue):Text = 'svd' (CHARACTER)
      )


Here is the schema...with repetitive elements edited for brevity annotated with //...

Code:

<xsd:schema elementFormDefault="qualified" targetNamespace="http://smart.com.ph/svd/"
   xml:lang="en" xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions"
   xmlns:svd="http://smart.com.ph/svd/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <xsd:element name="UDTO" type="svd:UDTOType" />
   
   <xsd:complexType name="UDTOType" >
         <xsd:sequence>
            <xsd:element maxOccurs="1" minOccurs="1" name="OriginalRequest"
               type="svd:OriginalRequest" />
            <xsd:element maxOccurs="1" minOccurs="1" name="OriginalResponse"
               type="svd:OriginalResponse" />
            <xsd:element maxOccurs="1" minOccurs="1" name="AtomicRequest"
               type="svd:AtomicRequest" />
            <xsd:element maxOccurs="1" minOccurs="1" name="AtomicResponse"
               type="svd:AtomicResponse" />
            <xsd:element maxOccurs="1" minOccurs="1" name="MessageVariables"
               type="svd:MessageVariables" />
            <xsd:element maxOccurs="1" minOccurs="1" name="EventKey"
               nillable="false" type="xsd:string" />
         </xsd:sequence>
      </xsd:complexType>

   <xsd:complexType name="Payload">
      <xsd:sequence>
         <xsd:any minOccurs="0" />
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="AtomicRequestPayload">
      <xsd:choice>
//...      </xsd:choice>
   </xsd:complexType>
   
   <xsd:complexType name="AtomicServiceOneRequest">
       <xsd:sequence>
          //...
       </xsd:sequence>
    </xsd:complexType>
   
    <xsd:complexType name="AtomicServiceOneResponse">
       <xsd:sequence>
          //...
       </xsd:sequence>
    </xsd:complexType>
   
    <xsd:complexType name="AtomicServiceTwoRequest">
       <xsd:sequence>
          //...
          
       </xsd:sequence>
    </xsd:complexType>
   
    <xsd:complexType name="AtomicServiceTwoResponse">
       <xsd:sequence>
          //...
       </xsd:sequence>
    </xsd:complexType>
   
    <xsd:complexType name="AtomicServiceThreeRequest">
       <xsd:sequence>
          //...
          
       </xsd:sequence>
    </xsd:complexType>
   
    <xsd:complexType name="AtomicServiceThreeResponse">
       <xsd:sequence>
          //...
       </xsd:sequence>
    </xsd:complexType>
   
   

   <xsd:complexType name="OriginalRequest">
      <xsd:sequence>
         //...
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="OriginalResponse">
      <xsd:sequence>
         //...
      </xsd:sequence>
   </xsd:complexType>
   
   <xsd:complexType name="SVDOriginalRequest">
       <xsd:sequence>
          //...
       </xsd:sequence>
    </xsd:complexType>
   
    <xsd:complexType name="SVDOriginalResponse">
       <xsd:sequence>
          //...
       </xsd:sequence>
    </xsd:complexType>

   <xsd:complexType name="AtomicRequest">
      <xsd:sequence>
         //...
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="AtomicResponse">
      <xsd:sequence>
         <xsd:element maxOccurs="unbounded" minOccurs="0"
            name="AtomicResponsePayload" type="svd:AtomicResponsePayload" />
      </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="OtherVariablesType">
      <xsd:sequence>
         <xsd:element maxOccurs="unbounded" minOccurs="0" name="OVParam1"
            type="xsd:string" nillable="true" />
         <xsd:element maxOccurs="unbounded" minOccurs="0" name="OVParam2"
            type="xsd:string" nillable="true" />
         <xsd:element maxOccurs="unbounded" minOccurs="0" name="OVParam3"
            type="xsd:string" nillable="true" />
         <xsd:element maxOccurs="unbounded" minOccurs="0" name="OVParam4"
            type="xsd:string" nillable="true" />
         <xsd:element maxOccurs="unbounded" minOccurs="0" name="OVParam5"
            type="xsd:string" nillable="true" />
      </xsd:sequence>
   </xsd:complexType>


   <xsd:complexType name="MessageVariables">

      <xsd:sequence>
         <xsd:element maxOccurs="1" minOccurs="1" name="OriginalReplyToQ"
            nillable="false" type="xsd:string" />
         <xsd:element maxOccurs="1" minOccurs="1"
            name="OriginalReplyToQMgr" nillable="false" type="xsd:string" />
         <xsd:element maxOccurs="1" minOccurs="0" name="OriginalCorrelId"
            nillable="true" type="xsd:string" />
         <xsd:element maxOccurs="1" minOccurs="0" name="OriginalMsgId"
            nillable="true" type="xsd:string" />
         <xsd:element maxOccurs="1" minOccurs="0" name="AtomicServiceQ"
            nillable="true" type="xsd:string" />
         <xsd:element default="DOS.IN" maxOccurs="1" minOccurs="1"
            name="AtomicServiceReplyTo" nillable="false" type="xsd:string" />
         <xsd:element maxOccurs="1" minOccurs="0" name="AtomicServiceQMgr"
            nillable="true" type="xsd:string" />
         <xsd:element maxOccurs="1" minOccurs="0" name="JavaClassPath"
            nillable="true" type="xsd:string" />
         <xsd:element maxOccurs="1" minOccurs="0" name="ScriptBody"
            nillable="true" type="xsd:string" />

         <xsd:element maxOccurs="1" minOccurs="0" name="OtherVariables"
            type="svd:OtherVariablesType" />

         <xsd:element maxOccurs="1" minOccurs="1" name="RouteToLabel"
            type="svd:RouteToLabelType" />
      </xsd:sequence>

   </xsd:complexType>

   <xsd:simpleType name="RouteToLabelType">
      <xsd:restriction base="xsd:string">
         //...
      </xsd:restriction>
   </xsd:simpleType>

   <xsd:complexType name="AtomicResponsePayload">
      <xsd:sequence>
         //...
      </xsd:sequence>
   </xsd:complexType>
</xsd:schema>


Here is the xml document input into the flow.


Code:


<?xml version="1.0" encoding="UTF-8"?>
<svd:UDTO xmlns:svd="http://smart.com.ph/svd/" 
   xmlns:xsi="http://www.w3.org/2014/XMLSchema-instance"
   xsi:schemaLocation="http://smart.com.ph/svd/ UDTOSVD.xsd">
  <svd:OriginalRequest>
    <svd:OriginalRequestPayload>
      <svd:SubscriberNumber>9479927462</svd:SubscriberNumber>
      <svd:Amount>100.0</svd:Amount>
      <svd:TimeStamp>2014-07-28T12:00:00</svd:TimeStamp>
    </svd:OriginalRequestPayload>
    <svd:OriginalRequestCorellId>svd:OriginalRequestCorellId</svd:OriginalRequestCorellId>
    <svd:OriginalRequestMsgId>svd:OriginalRequestMsgId</svd:OriginalRequestMsgId>
    <svd:OriginalRequestAuthToken>svd:OriginalRequestAuthToken</svd:OriginalRequestAuthToken>
    <svd:TimeStamp>2014-07-28T12:00:00</svd:TimeStamp>
  </svd:OriginalRequest>
  <svd:OriginalResponse>
    <svd:OriginalResponsePayload/>
    <svd:OriginalResponseReplyToQName>StaticVsDynamic.REPLY</svd:OriginalResponseReplyToQName>
    <svd:OriginalResponseReplyToQMgr>IB9MGR</svd:OriginalResponseReplyToQMgr>
  </svd:OriginalResponse>
  <svd:AtomicRequest>
    <svd:AtomicRequestPayload>
      <svd:AtomicServiceOneRequest>
        <svd:SubscriberNumber>9479927462</svd:SubscriberNumber>
        <svd:Amount>100.0</svd:Amount>
        <svd:TimeStamp>2014-07-28T12:00:00</svd:TimeStamp>
        <svd:Comments>svd:Comments</svd:Comments>
      </svd:AtomicServiceOneRequest>
    </svd:AtomicRequestPayload>
    <svd:AtomicRequestQName>AtomicServiceOne.IN</svd:AtomicRequestQName>
    <svd:AtomicRequestQMgr>IB9Mgr</svd:AtomicRequestQMgr>
    <svd:AtomicRequestReplyToQName>StaticVsDynamic.IN</svd:AtomicRequestReplyToQName>
    <svd:AtomicRequestReplyToQMgr>IB9Mgr</svd:AtomicRequestReplyToQMgr>
    <svd:AtomicRequestJavaClassPath></svd:AtomicRequestJavaClassPath>
    <svd:TimeStamp>2014-07-28T12:00:00</svd:TimeStamp>
  </svd:AtomicRequest>
  <svd:AtomicResponse>
    <svd:AtomicResponsePayload/>
  </svd:AtomicResponse>
  <svd:MessageVariables>
    <svd:OriginalReplyToQ>StaticVsDynamic.REPLY</svd:OriginalReplyToQ>
    <svd:OriginalReplyToQMgr>IB9Mgr</svd:OriginalReplyToQMgr>
    <svd:OriginalCorrelId>svd:OriginalCorrelId</svd:OriginalCorrelId>
    <svd:OriginalMsgId>svd:OriginalMsgId</svd:OriginalMsgId>
    <svd:AtomicServiceQ>svd:AtomicServiceQ</svd:AtomicServiceQ>
    <svd:AtomicServiceReplyTo>StaticVsDynamic.IN</svd:AtomicServiceReplyTo>
    <svd:AtomicServiceQMgr>IB9Mgr</svd:AtomicServiceQMgr>
    <svd:JavaClassPath></svd:JavaClassPath>
    <svd:ScriptBody></svd:ScriptBody>
    <svd:OtherVariables><!--OVParam1 is switch for static or dynamic-->
       <svd:OVParam1>dynamic</svd:OVParam1>
   <!--OVParam2 is repeat counter for iterations of the test-->
       <svd:OVParam2>11</svd:OVParam2>
   <!--OVParam3 will have the RUN Start Time-->
       <svd:OVParam3>tbd</svd:OVParam3>
   <!--OVParam4 will have the RUN End time taken just before writing the result file.-->
       <svd:OVParam4>tbd</svd:OVParam4>
   <!--OVParam5 will hold the total elapsed time since start of run for every message.-->
       <svd:OVParam5>tbd</svd:OVParam5>
    </svd:OtherVariables>
    <svd:RouteToLabel>ATOMICSERVICE</svd:RouteToLabel>
  </svd:MessageVariables>
  <svd:EventKey>SVDMAIN</svd:EventKey>
</svd:UDTO>


The xml document started as a Generated xml from the schema in IIB so the svd namespace prefix was found then.

Further in the Route node the filter pattern that is throwing the exception is...

Code:
$Root/XMLNSC/svd:UDTO/svd:MessageVariables/svd:OtherVariables/svd:OVParam1[1]='dynamic'


uses the [...] editor to build it...I have stared at it till I am blue in the face, figuratively, and do not see the error. Is it a bug? If so is there a work around?
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Wed Aug 06, 2014 4:17 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The error is being reported by the XPath engine.
The XPath engine does not use the namespace declarations ( xmlns attributes ) in the XML file. You must specify them when you build the XPath.

So...did you specify the namespace prefixes when you constructed the XPath?
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
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 prefix not found in iNamespacePrefixes
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.