2 Replies Latest reply on May 4, 2007 5:27 AM by cosmacol

    WSDLParser error calling a web service

    cosmacol Level 1
      Hello,
      I have a flex application that loads data using several web services. With only one of those services I'm experiencing the following error:

      TypeError: Error #1009: Impossibile accedere a una proprietà o a un metodo di un riferimento oggetto 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 Main/::onPreventivoConfirm()
      at Main/__sectionAreaPersonale_confermaPreventivo()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()
      at AreaPersonale/::doConfermaPreventivo()
      at AreaPersonale/__buttonConferma_click()

      The service is declared as:

      <mx:WebService
      id="richiestaNoleggioService"
      service="CarRentalProcessExport1_CarRentalProcessHttpService"
      port="CarRentalProcessExport1_CarRentalProcessHttpPort"
      wsdl="[...]/wsdl/CarRentalProcessExport1_CarRentalProcessHttp_Service.wsdl"
      useProxy="false"
      showBusyCursor="true"
      concurrency="multiple">
      <mx:operation
      name="richiestaNoleggio"
      result="richiestaNoleggioResult()"
      fault="richiestaNoleggioFault()">
      <mx:request>
      <idNoleggio></idNoleggio>
      </mx:request>
      </mx:operation>
      </mx:WebService>

      This is the WSDL for the service:

      <wsdl:definitions
      name="CarRentalProcessExport1_CarRentalProcessHttp_Service"
      targetNamespace=" http://CarRental/CarRentalProcessInterface/Binding">
      <wsdl:import location="CarRentalProcess.wsdl"
      namespace=" http://CarRental/CarRentalProcessInterface"/>
      <wsdl:binding name="CarRentalProcessExport1_CarRentalProcessHttpBinding"
      type="Port_0:CarRentalProcess">
      <soap:binding style="document"
      transport=" http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="richiestaNoleggio">
      <soap:operation/>
      <wsdl:input name="richiestaNoleggioRequest">
      <soap:body use="literal"/>
      </wsdl:input>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="CarRentalProcessExport1_CarRentalProcessHttpService">
      <wsdl:port
      binding="this:CarRentalProcessExport1_CarRentalProcessHttpBinding"
      name="CarRentalProcessExport1_CarRentalProcessHttpPort">
      <soap:address
      location=" http://wxp002:9080/CarRentalWeb/sca/CarRentalProcessExport1"/>
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

      Call is done like this:

      richiestaNoleggioService.richiestaNoleggio.send(event.idNoleggio);

      Note that I'm able to correctly call this service with other clients, for example using soapUI.

      Thank you for the attention
      Cosma Colanicchia
        • 1. Re: WSDLParser error calling a web service
          batmitra Level 1
          Hi
          I had the same problem until i found , after hours of looking at docs, searching the net, etc., that my problem was not on my webservice, the problem was on the data it returns, if i had a blank field flex would throw me that error , so i fixed it making sure that if one of my field is null i fill it with "". I hope you have this simple problem too.
          • 2. Re: WSDLParser error calling a web service
            cosmacol Level 1
            Thank you batmitra.. anyway, I just resolved this issue. There was to things to fix, in order for it to work:

            1) The call syntax, for this style of web service, must be
            var params:Object = new Object;
            params.idNoleggio = (value);
            richiestaNoleggioService.richiestaNoleggio.send(params);

            2) The WSDL for the web service must declare the service output.. this should be not strictly required (in fact, this service does not return anything) but flex needs to have it explicitly set.

            Cosma