2 Replies Latest reply on Jul 31, 2007 3:18 PM by tmv_forum

    flex2 and axis2 problem

    tmv_forum
      Hi,

      I tried out Flex2 with the Weather web service sample that came with Apache Axis2 distribution and ran into the error below. I have no problem with connecting to the Weather service with a non-flex client (see soap messages below). I also have no problem connecting flex to a basic webservice that only deals with native types like the getVersion webservice that came with Axis2. However, anytime I want to connnect to any 'real world' web services that have complex types, whether implemented by Sun's JAX-WS RI or Axis2, I encountered the error below. I'm running flex with hotfix2.


      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns:local="*" creationComplete="ws.getWeather()">

      <mx:WebService id="ws" wsdl=" http://localhost:8080/axis2/services/WeatherService?wsdl">
      <mx:operation name="getWeather"/>
      </mx:WebService>

      </mx:Application>

      [RPC Fault faultString="Runtime exception Error #1009: Cannot access a property or method of a null object reference." faultCode="WSDLError" faultDetail="null"]
      at mx.rpc.soap::WebService/ http://www.adobe.com/2006/flex/mx/internal::wsdlHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.rpc.wsdl::WSDLLoader/::checkLoadsOutstanding()
      at mx.rpc.wsdl::WSDLLoader/mx.rpc.wsdl:WSDLLoader::resultHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::resultHandler()
      at mx.rpc::Responder/result()
      at mx.rpc::AsyncRequest/acknowledge()
      at ::DirectHTTPMessageResponder/completeHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/flash.net:URLLoader::onComplete()

      ------------------------------------------------------------------------------------------ ---

      ../axis2-1.2/samples/pojoguide>ant rpc.client

      rpc.client.run:
      [java] Temperature : 39.3
      [java] Forecast : Cloudy with showers
      [java] Rain : true
      [java] How much rain (in inches) : 4.5

      BUILD SUCCESSFUL


      SOAP Request:
      <?xml version="1.0" encoding="utf-8"?>
      <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Body>
      <getWeather xmlns=" http://service.pojo.sample/xsd">
      </getWeather>
      </soapenv:Body>
      </soapenv:Envelope>


      SOAP Response:
      <?xml version="1.0" encoding="utf-8"?>
      <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Body>
      <ns:getWeatherResponse xmlns:ns=" http://service.pojo.sample/xsd">
      <ns:return>
      <forecast xmlns=" http://data.pojo.sample/xsd">Cloudy with showers</forecast>
      <howMuchRain>4.5</howMuchRain>
      <rain>true</rain>
      <temperature>39.3</temperature>
      </ns:return>
      </ns:getWeatherResponse>
      </soapenv:Body>
      </soapenv:Envelope>