I ran into a strange problem when I was trying to call a web
service.Here's the source:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="vertical">
        <mx:Script>
                <![CDATA[
                        import mx.rpc.events.FaultEvent;
                        import mx.controls.Alert;
                        import mx.rpc.events.ResultEvent;
                        import 
com.adobe.cairngorm.control.CairngormEventDispatcher;
                        import com.ceno.umc.control.LoginEvent;
                        
                        private function onResult(event : ResultEvent) : void
                        {
                                Alert.show(event.result.toString(),"result");
                        }
                        
                        private function onFault(event : FaultEvent) : void
                        {
                                
Alert.show(event.fault.faultString,"faultString");
                        }
                ]]>
        </mx:Script>
        <mx:WebService id="aService" service="umc/umc/auth"
port="umc/umc/authHttpPort" 
                wsdl="http://localhost:8008/ws/services/umc/umc/auth?wsdl";
showBusyCursor="true"
                result="onResult(event)" fault="onFault(event)"> 
          <mx:operation name="login" resultFormat="e4x">
            <mx:request>
                <req>
                        <subject>
                                admin
                        </subject>
                        <username>
                                admin
                        </username>
                        <password>
                                admin
                        </password>
                </req>
            </mx:request>
          </mx:operation>         
        </mx:WebService>        
        <mx:Button label="Login" click="aService.login.send()"/>
</mx:Application>
when I clicked the login button it first showed me an error dialog saying:
[WSDLError faultString="Element http://cmd.umc.ceno.com:loginResponse
not resolvable" faultCode="WSDL.BadElement" faultDetail="null"]
        at
mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::parseMessage()
        at mx.rpc.soap::WSDLOperation/parseMessages()
        at
mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()
        at mx.rpc.soap::Operation/send()
        at Function/http://adobe.com/AS3/2006/builtin::apply()
        at mx.rpc.soap.mxml::Operation/send()
        at WSTest/___Button1_click()
then I clicked the login button again,eveything worked.Any idea? Thanks.





--
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/

<*> 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