I am getting an odd error when accessing the web service. This is 
the error message I am getting.

[RPC Fault faultString="Error #1065: Variable 1 is not defined." 
faultCode="EncodingError" faultDetail="null"]
        at 
mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::in
vokePendingCall()
        at mx.rpc.soap::Operation/send()
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at mx.rpc.soap.mxml::Operation/send()
        at WireStatus/::callWS()
        at WireStatus/___Button1_click()


The variable reported as not defined is the value entered in the 
screen and it is not a variable at at. Any value entered in "wireId" 
text field in the following code is reported as undefined variable. 
This is very odd and I am stuck at this point. I appreciate any help 
on this.

Here is the Flex code for reference.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
        <mx:WebService  id="WS_WIRE" 
wsdl="/WireEJBHttpRouter/services/WireServiceSOAP/wsdl/WireService.ws
dl"  
                makeObjectsBindable="true"  showBusyCursor="true" 
result="showResponse()">
                <mx:operation name="GetWireStatus" 
resultFormat="xml">
                        <mx:request>
                                <WireStatusRequest>
                                        <WireIdentifier>{wireId.text}
</WireIdentifier>
                                </WireStatusRequest>
                        </mx:request>
                </mx:operation>
        </mx:WebService>  
        
    <mx:Script>
        <![CDATA[
        import mx.rpc.events.FaultEvent;   
        import mx.controls.Alert;
        
                private function showResponse():void
                {
                
        outputText.text=WS_WIRE.GetWireStatus.lastResult.toString();
                }       
                private function callWS():void
                {
                        WS_WIRE.GetWireStatus.send();
                }
        ]]>
    </mx:Script>
        <mx:HBox>
<mx:VBox>
        
<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml"; id="form">
        <mx:FormItem label="Wire Identifier">
                <mx:TextInput id="wireId"/>
        </mx:FormItem>
</mx:Form>
        <mx:Button label="Get Wire Status" click="callWS()"/>
</mx:VBox>
<mx:FormItem label="Output">
         <mx:TextArea  id="outputText" editable="false"  width="300" 
height="100"/> 
</mx:FormItem>

</mx:HBox>
        
</mx:Application>


Thanks, Maha

Reply via email to