1 Reply Latest reply on Jun 16, 2008 12:19 AM by raymond_domingo

    My First Flex webservice client not working

    raymond_domingo
      Hello,

      I'm trying to create my first flex client app which connects to a webservice. It looks like it can connect to several webservices on the net, but NOT to my own

      For example working is:
      - http://www.webservicex.net/WeatherForecast.asmx?WSDL

      But I can't call for example the default getVersion service of axis.
      - http://s01.domingo.nl:8080/axis2/services/Version?wsdl

      What can be the problem ??

      My client code:
      <?xml version="1.0" encoding="UTF-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">

      <mx:WebService
      id="versionService"
      wsdl=" http://s01.domingo.nl:8080/axis2/services/Version?wsdl"
      useProxy="false">
      <mxperation name="getVersion">
      </mxperation>
      </mx:WebService>

      <mx:Button click="versionService.getVersion.send()" label="getVersion"></mx:Button>
      <mx:Label text="Version:"></mx:Label>
      <mx:TextArea text="{versionService.getVersion.lastResult}"></mx:TextArea>

      <mx:HRule></mx:HRule>

      <mx:WebService id="WS"
      wsdl=" http://www.webservicex.net/WeatherForecast.asmx?WSDL"
      useProxy="false">

      <mxperation name="GetWeatherByZipCode" resultFormat="e4x" >
      <mx:request>
      <ZipCode>30117</ZipCode>
      </mx:request>
      </mxperation>
      </mx:WebService>
      <mx:Button click="WS.GetWeatherByZipCode.send()" label="getWeather"></mx:Button>
      <mx:TextArea text="{WS.GetWeatherByZipCode.lastResult}"></mx:TextArea>



      </mx:Application>

      My crossdomain xml:
      <?xml version="1.0"?>
      <cross-domain-policy>
      <allow-access-from domain="*"/>
      </cross-domain-policy>

      The error:

      [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL ( http://s01.domingo.nl:8080/axis2/services/Version?wsdl)"
      at mx.rpc.wsdl::WSDLLoader/faultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\ws dl\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()[E:\dev\3.0.x\frameworks\pro jects\rpc\src\mx\rpc\AbstractInvoker.as:168
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.0.x\frameworks\project s\rpc\src\mx\rpc\AbstractInvoker.as:220
      at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49 ]
      at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]
      at DirectHTTPMessageResponder/securityErrorHandler()[E:\dev\3.0.x\frameworks\projects\rpc\sr c\mx\messaging\channels\DirectHTTPChannel.as:368]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/redirectEvent()

      Please give me some tips.

      Best regards,
      Raymond