Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 707949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:20:07+00:00 2026-05-14T04:20:07+00:00

I have created one application in flex that is accessing the Java webservice using

  • 0

I have created one application in flex that is accessing the Java webservice using Actionscript3.0. In which I am getting the error during the accessing the one of the webservice method.That method is returning the list of child object I am taking this List of object in ArrayCollection class object.My code is:-

    [Bindable]
     private var photoFeed:Array; 
    public var user:SBTSWebService;

    public function initApp():void
    {
       user = new SBTSWebService();

       user.addSBTSWebServiceFaultEventListener(handleFaults);

    }

    public function displayString():void
    {
           // Instantiate a new Entry object.
           var newEntry:GetSBTSMobileAuthentication = new GetSBTSMobileAuthentication();
            newEntry.mobile=mobileno.text;
            newEntry.password=password.text;
            user.addgetSBTSMobileAuthenticationEventListener(authenticationResult);

            user.getSBTSMobileAuthentication(newEntry);

    }

    public function handleFaults(event:FaultEvent):void
    {
        Alert.show("A fault occured contacting the server. Fault message is: " + event.fault.faultString);
    }

    public function authenticationResult(event:GetSBTSMobileAuthenticationResultEvent):void
    {
        if(event.result != null) 
        {

           if(event.result._return > 0)
           {
             var UserId:int = event.result._return;
              getChildList(UserId);       
              viewstack2.selectedIndex=1;
           }
           else
           {
             Alert.show("Authentication fail");
           }


        }

    }
  public function getChildList(userId:int):void
  {
     var childEntry:GetSBTSMobileChildrenInfo = new GetSBTSMobileChildrenInfo();
     childEntry.UserId = userId;
     user.addgetSBTSMobileChildrenInfoEventListener(sbtsChildrenInfoResult);
     user.getSBTSMobileChildrenInfo(childEntry);
  }
   public function sbtsChildrenInfoResult(event:GetSBTSMobileChildrenInfoResultEvent):void
    {
        if(event.result != null && event.result._return!=null) 
        {

        photoFeed  = event.result._return as Array;
        childid.dataProvider = photoFeed; 

        }

    }


]]>

<mx:Move id="hideEffect"
    xTo="-500" />
<mx:Move id="showEffect"
    xFrom="500" />

<mx:Panel width="500" height="300"
    headerColors="[#000000,#FFFFFF]">

    <mx:TabNavigator id="viewstack2"
        selectedIndex="0"
        historyManagementEnabled="false"
        width="100%" height="100%">

        <mx:Form label="Login Form"
            hideEffect="{hideEffect}" showEffect="{showEffect}">
              <mx:FormItem>
                 <mx:TextInput id="mobileno"/>
              </mx:FormItem>
              <mx:FormItem>
                 <mx:TextInput id="password"/>
              </mx:FormItem>
              <mx:FormItem>
                 <mx:Button label="Login" click="displayString()"/>
              </mx:FormItem>
         </mx:Form>

        <mx:Form label="Child List"
            hideEffect="{hideEffect}" showEffect="{showEffect}">
           <mx:DataGrid id="childid" visible="false"/>



            <mx:Button label="click here to see location"
                click="viewstack2.selectedIndex=2" />
        </mx:Form>

        <mx:Form label="Bus Location"
            hideEffect="{hideEffect}" showEffect="{showEffect}">
            <mx:Text text="" />
        </mx:Form>
       <mx:Form label="Trace Path"
            hideEffect="{hideEffect}" showEffect="{showEffect}">
            <mx:Text text="" />
        </mx:Form>
    </mx:TabNavigator>

</mx:Panel>

I am getting the error like “TypeError: Error #1009: Cannot access a property or method of a null object reference”.when the line “photoFeed = event.result._return as Array;” is compile.
Please help me to remove this error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:20:08+00:00Added an answer on May 14, 2026 at 4:20 am

    It seems strange that you are getting the error on that line as you have already made the check that both result and result._return are not null. It is more likely that the line…

    childid.dataProvider = photoFeed; 
    

    …is causing the error because childid is null? This would probably be because you tab navigator has not created the second tab yet. Try adding creationPolicy=”all” to the tab navigator to make sure it has been created.

    <mx:TabNavigator id="viewstack2"
            selectedIndex="0"
            creationPolicy="all"
            historyManagementEnabled="false"
            width="100%" height="100%">
    

    By default it is set to ‘auto’ which means it will only create panels other than the default when you click on them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created one application which will send and receive mails, so in that
I have created one application in j2me, I have used json parsing in that
I have created one Catalyst application and I have created Schema and Model using
I am using asp.net .. i have created one small application.. I have Configure
I have created one service in my grails application. in that service 25 methods
I have created one application on Vista, that is running with admin privileges. I
I have created one java-swing application. The application runs perfectly runs perfect on my
I am trying to develop one simple application using Java, Flex and Blazeds. I
I have created a core data database in one application which involved sucking out
I have created one application which is reading outlook mail, but when user install

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.