Hello all,

I'm working on a Flex app which calls a web service, and I'm getting this 
error:


RPC Fault faultString="Error #1009: Cannot access a property or method of 
a null object reference."

What I can't tell is which "object" is null -- and from what I can tell, 
this is purely a Flex error, i.e. it's before the web service is called, 
so it's not from the app server (am I diagnosing this right?). The stack 
trace looks like this:


file:/D:/Documents and Settings/3onyemaechi/My Documents/Flex Builder 
2/TestWS/bin/TestWS-debug.html
        Main Thread (Suspended: [RPC Fault faultString="Error #1009: Cannot 
access a property or method of a null object reference." 
faultCode="EncodingError" faultDetail="null"])
        mx.rpc.soap.mxml::WebService/dispatchEvent
        
mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent
        
mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invokePendingCall
        mx.rpc.soap::Operation/send
        Function/http://adobe.com/AS3/2006/builtin::apply [no source]
        mx.rpc.soap.mxml::Operation/send
        TestWS/TestWS::submitReservation
        TestWS/___Button1_click


Your thoughts on this problem would be greatly appreciated -- or better 
yet, tips on techniques for using the debugger to find it myself next 
time, and then I won't have to bother you good people again. :) I've 
written other flex web service clients where the (non-required) arguments 
were null, with no problem, but this one is stumping me :(

-Kaylea



Here's my .mxml:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:af="*" xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute"  width="960">
        <mx:WebService  id="wsAlice" 
wsdl="https://parakeet.uchicago.edu:8443/ReservationsWebService/ReservationsWebService?wsdl";
 
useProxy="false">
                        <mx:operation name="saveReservation">
                        <mx:request>
                        <reservation>
                                <checkInTime>666</checkInTime>
                                <checkOutTime>666</checkOutTime>
                                <description>some text</description>
                                <endTime>some date</endTime>
                                <id>{null}</id>
                                <items>
                                        <item>
                                                <id>109</id>
                                                <name>Some Name</name>
                                                <description>Some 
Description</description>

<reservations>{null}</reservations>

<subItems>{null}</subItems>

<superItems>{null}</superItems>
                                        </item>
                                </items>
                                <startTime>some text</startTime>
                                <user>
                                        <userName>joebob</userName>
                                </user>
                        </reservation>
                        </mx:request>
                </mx:operation>
        </mx:WebService>
        <mx:Script><![CDATA[
                import mx.controls.Alert;

                private function submitReservation():void
         {

                 wsAlice.saveReservation.send();

         }
         ]]>
        </mx:Script>
        <mx:Panel x="10" y="23" width="250" height="200" 
layout="absolute">
                <mx:Button x="85" y="69" label="Do It!" 
click="submitReservation();"/>
        </mx:Panel>

</mx:Application>


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to