0 Replies Latest reply on May 24, 2010 1:43 PM by _H_P_

    HTTP Request Error

    _H_P_

      Hello,

       

      I am getting the following error when I try to request a WebService:

       

      [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://192.168.10.203:8080/EchoService/EchoBean?wsdl)"]
          at mx.rpc.wsdl::WSDLLoader/faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\wsdl\WSDLLoader.as:98]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170]
          at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:225]
          at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53]
          at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]
          at DirectHTTPMessageResponder/errorHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:362]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at flash.net::URLLoader/redirectEvent()

       

      I am able to access my crossdomain.xml from http://localhost:8080/crossdomain.xml. My crossdomain.xml lookis like:

       

      <cross-domain-policy>
         <allow-access-from domain="*" to-ports="*" secure="false" />
         <site-control permitted-cross-domain-policies="all" />
         <allow-http-request-headers-from domain="*" headers="*"/>
      </cross-domain-policy>
      

       

      My client mxml looks like:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
          creationComplete="echoService.printEcho()">
      <mx:Script>
          <![CDATA[
              import mx.rpc.events.FaultEvent;
              import mx.rpc.events.ResultEvent;
              [Bindable]
              public var res:String;
              public function echoService_resultHandler(event:ResultEvent):void{
                  res = event.result as String;
              }
              public function echoService_faultHandler(event:FaultEvent):void{
                  
              }
          ]]>
      </mx:Script>
          <mx:Form x="101" y="110" width="241" height="129">
              <mx:FormItem label="Echo" fontSize="15" id ="echoForm1">
                  <mx:Text width="100%" height="25" id ="echoText1"
                      text = "{res}"/>
              </mx:FormItem>
      
              <mx:FormItem label="Value">
                  <mx:Button id="button" 
                      label="Button"
                      
                      />
              </mx:FormItem>
          </mx:Form>
          
          <mx:WebService id= "echoService"
              wsdl="http://192.168.10.203:8080/EchoService/EchoBean?wsdl">
              <mx:operation name ="printEcho" 
                  result = "echoService_resultHandler(event)"
                  fault="echoService_faultHandler(event)"/>
          </mx:WebService>
      </mx:Application>
      

       

       

       

      -H