Results 1 to 4 of 4

Thread: securityHelper.channelSet

  1. #1
    Join Date
    Apr 2010
    Posts
    8

    Default securityHelper.channelSet

    Hello Forum,
    How channelSet is getting instantiated in the scope of SpringBlazeDS Integration?
    Since we don't define "<login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>" in the services-config.xml, the line "securityHelper.channelSet.login()" throws null pointer exception - channelSet == null.

    Many thanks,
    Michael

  2. #2
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

    What is securityHelper exactly? Is that your own object?

    You generally need to have your own definition of <mx:ChannelSet> on the client whenever you aren't using the default channel, and you need to assign it to the channelSet property of any object (RemoteObject, Producer, Consumer, etc.) that is communicating with the server.

    The existence of a ChannelSet on the client-side doesn't have any relation to whether or not you have TomcatLoginCommand defined.
    Jeremy Grelle

    Staff Engineer, Web Products Team
    SpringSource

  3. #3

    Default securityHelper

    I saw same sort of error when I first used the Security3Helper class in my application just like it was used in the TestDrive. I exposed the bean as a remoting destination, as follows:

    Code:
    <bean id="securityHelper" class="com.riainaday.security.Security3Helper">
            <flex:remoting-destination/>
        </bean>
    On client side, if you then define a RemoteObject for securityHelper, and also ChannelSet and channel, it should work. This is what I've done:

    Code:
    <mx:RemoteObject id="securityHelper" destination="securityHelper" fault="faultHandler(event)">
    		<mx:channelSet>
    			<mx:ChannelSet>
    				<mx:channels>
    					<mx:AMFChannel id="amf" url="http://localhost:8080/yourApp/messagebroker/amf"/>
    				</mx:channels>
    			</mx:ChannelSet>
    		</mx:channelSet>
    		<mx:method name="getAuthentication" result="userHandler(event)"/>
    	</mx:RemoteObject>
    Hope it helps....

    Larry

  4. #4
    Join Date
    Apr 2010
    Posts
    8

    Default

    I was off for a couple of days..
    Many Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •