Announcement Announcement Module
Collapse
No announcement yet.
Application-context messaging Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Application-context messaging

    Hello,

    I'm developping a flex program for android. Our company allready has a flex program for desktop. So I can easily use some pieces of that code.

    But I have a small problem with this:
    In my application-context.xml I want to add messaging in the top of the file.
    like this:
    Code:
    <objects xmlns="http://www.springactionscript.org/schema/objects"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:messaging="http://www.springactionscript.org/schema/messaging"
             xsi:schemaLocation="
            http://www.springactionscript.org/schema/objects http://www.pranaframework.org/schema/objects/spring-actionscript-objects-1.0.xsd
            http://www.springactionscript.org/schema/messaging http://www.pranaframework.org/schema/messaging/spring-actionscript-messaging-1.0.xsd">
    When I now want to run my program I get this error:
    Code:
    Error: No namespace handler found for node '' with URI 'http://www.springactionscript.org/schema/messaging'
    	at org.springextensions.actionscript.ioc.factory.xml.parser.support::XMLObjectDefinitionsParser/parseCustomNode()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\parser\support\XMLObjectDefinitionsParser.as:357]
    	at org.springextensions.actionscript.ioc.factory.xml.parser.support::XMLObjectDefinitionsParser/parseNode()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\parser\support\XMLObjectDefinitionsParser.as:324]
    	at org.springextensions.actionscript.ioc.factory.xml.parser.support::XMLObjectDefinitionsParser/parseObjectDefinitions()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\parser\support\XMLObjectDefinitionsParser.as:312]
    	at org.springextensions.actionscript.ioc.factory.xml.parser.support::XMLObjectDefinitionsParser/parse()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\parser\support\XMLObjectDefinitionsParser.as:273]
    	at org.springextensions.actionscript.context.support::XMLApplicationContext/parse()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\context\support\XMLApplicationContext.as:399]
    	at org.springextensions.actionscript.context.support::XMLApplicationContext/loadNextConfigLocation()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\context\support\XMLApplicationContext.as:440]
    	at org.springextensions.actionscript.context.support::XMLApplicationContext/loader_completeHandler()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\context\support\XMLApplicationContext.as:373]
    	at flash.events::EventDispatcher/dispatchEventFunction()
    	at flash.events::EventDispatcher/dispatchEvent()
    	at flash.net::URLLoader/onComplete()
    Does somebody know why I can't use this for my mobile development?

    Kind regards,

    Thibault Heylen

  • #2
    faulty XML?

    Hey Thibault,

    are you sure that the actual XML in your configuration is valid? We haven't done any testing yet with the new Mobile functions of the SDK, so this might indeed be a bug related to that. But looking at the error message it seems as if a node without a name has been encountered.
    Can you show us the full XML config, just to make sure?

    cheers,

    Roland

    Comment


    • #3
      RE:faulty XML?

      Hello,

      Well I didn't had that fault before I added messaging, so I don't think there is a fault in my XML.

      Here you can see the full XML:
      Code:
      <objects xmlns="http://www.springactionscript.org/schema/objects"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:messaging="http://www.springactionscript.org/schema/messaging"
               xsi:schemaLocation="
              http://www.springactionscript.org/schema/objects http://www.pranaframework.org/schema/objects/spring-actionscript-objects-1.0.xsd
              http://www.springactionscript.org/schema/messaging http://www.pranaframework.org/schema/messaging/spring-actionscript-messaging-1.0.xsd">
              
      	<!-- Stage wire processor -->
      
      	<object id="defaultAutowiringStageProcessor"
      		class="org.springextensions.actionscript.stage.DefaultAutowiringStageProcessor">
      		<property name="objectSelector">
      			<object
      				class="org.springextensions.actionscript.stage.selectors.ClassBasedObjectSelector">
      				<constructor-arg>
      					<array>
      						<value>^mx.</value>
      						<value>^flash.</value>
      						<value>^flexlib.*</value>
      						<value>^it.sepiroth.*</value>
      						<value>^com.flextoolbox.*</value>
      						<value>^com.degrafa.*</value>
      						<value>^com.arc90.*</value>
      						<value>main__embed*</value>
      						<value>^com.traficon.tmsng.view::ConfigurationPanel_*</value>
      						<value>^com.traficon.tmsng.view.navigation::NavigationButton</value>
      						<value>^com.traficon.tmsng.view.controls::Link</value>
      						<value>ConfigButton$</value>
      						<value>_inlineComponent.*$</value>
      						<value>.*ImageIconRenderer.*</value>
      						<value>Button$</value>
      					</array>
      				</constructor-arg>
      			</object>
      		</property>
      	</object>
      
      	<!-- Messaging -->
      
      	<messaging:channel-set id="channelSet" channels="streamingAMFChannel" />
      	
      	<messaging:streaming-amf-channel id="streamingAMFChannel"
      		ref="mobileMobilLocator.streamingAMFChannel" />
      		
      	<messaging:consumer id="trafficMapFeedConsumer"
      		destination="trafficMapFeed" channel-set="channelSet" />
      
      
      	<!-- RMI -->
      
      	<object id="remoteObject" class="mx.rpc.remoting.mxml.RemoteObject"
      		abstract="true">
      		<property name="endpoint" ref="mobileModelLocator.endPointUrl" />
      		<property name="showBusyCursor" value="true" />
      	</object>
      
      	<object id="eventMessageHistoryRemoteObject" parent="remoteObject">
      		<property name="destination" value="eventMessageHistoryService" />
      	</object>
      
      	<object id="messageSourceRemoteObject" parent="remoteObject">
      		<property name="destination" value="messageSourceService" />
      	</object>
      
      	<object id="eventImageUrl" class="String">
      		<constructor-arg ref="mobileModelLocator.eventImageUrl" />
      	</object>
      
      	<object id="eventVideoUrl" class="String">
      		<constructor-arg ref="mobileModelLocator.eventVideoUrl" />
      	</object>
      
      
      	<!-- Controllers -->
      
      	<object id="streamplayerMgr"
      		class="com.traficon.tmsng.client.mobile.command.StreamingPlayerManager" />
      
      	<!-- Domain Objects -->
      
      	<object id="mobileModelLocator"
      		class="com.traficon.tmsng.client.mobile.command.MobileModelLocator"
      		factory-method="getInstance">
      	</object>
      
      	<object id="modelLocator" class="com.traficon.domain.ModelLocator"
      		factory-method="getInstance">
      		<property name="detectors" ref="detectors" />
      		<property name="realTimeEventMessages" ref="realTimeEventMessages" />
      		<property name="trafficEventMessages" ref="trafficEventMessages" />
      		<property name="eventImageUrl" ref="eventImageUrl" />
      	</object>
      
      	<object id="detectors" class="com.traficon.domain.detector.DetectorCollection" />
      
      	<object id="trafficEventMessages" class="com.traficon.domain.EventMessageCollection">
      		<property name="maxLength" value="0" />
      	</object>
      
      	<object id="realTimeEventMessages" class="com.traficon.domain.EventMessageCollection">
      		<property name="enableCaching" value="false" />
      		<property name="cacheLimit" value="20" />
      		<property name="cacheTimeOut" value="1000" />
      	</object>
      </objects>
      I've done some testing to:
      First test : only objects en nothing else
      Second test : object with the first object
      Third text : objects and only the messaging blocks

      In this 3 cases I got this error:
      Code:
      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      	at org.springextensions.actionscript.ioc.factory.xml.preprocessors::ParentAttributePreprocessor/preprocess()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\preprocessors\ParentAttributePreprocessor.as:49]
      	at org.springextensions.actionscript.ioc.factory.xml.parser.support::XMLObjectDefinitionsParser/preProcessXML()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\parser\support\XMLObjectDefinitionsParser.as:300]
      	at org.springextensions.actionscript.ioc.factory.xml.parser.support::XMLObjectDefinitionsParser/parse()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\ioc\factory\xml\parser\support\XMLObjectDefinitionsParser.as:270]
      	at org.springextensions.actionscript.context.support::XMLApplicationContext/parse()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\context\support\XMLApplicationContext.as:399]
      	at org.springextensions.actionscript.context.support::XMLApplicationContext/loadNextConfigLocation()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\context\support\XMLApplicationContext.as:440]
      	at org.springextensions.actionscript.context.support::XMLApplicationContext/loader_completeHandler()[C:\projects\se-springactionscript-as\spring-actionscript-core\src\main\actionscript\org\springextensions\actionscript\context\support\XMLApplicationContext.as:373]
      	at flash.events::EventDispatcher/dispatchEventFunction()
      	at flash.events::EventDispatcher/dispatchEvent()
      	at flash.net::URLLoader/onComplete()
      Hope this helps. And thank you for the help!

      Kind regards,

      Thibault Heylen

      Comment


      • #4
        Figured it out. You need to add a namespacehandler for the messaging context

        applicationContext.addNamespaceHandler(new MessagingNamespaceHandler());
        Last edited by bob67; Jun 29th, 2011, 06:08 PM.

        Comment

        Working...
        X