4 Replies Latest reply on Jul 17, 2007 5:50 AM by mitchgrrt

    problem extending mx:WebService

    mitchgrrt
      This simple program gets a syntax error. If I replace WebService with lots of other class names, for example mx:VBox, it's OK. The error just says "Parse error at '<mx:WebService>'." Is there some rule that you can't extend a web service? Thanks.

      <?xml version="1.0" encoding="utf-8"?>
      <mx:WebService
      xmlns:mx=" http://www.adobe.com/2006/mxml"
      />
        • 1. Re: problem extending mx:WebService
          rotoole Level 1
          is it inside a canvas or some other container?
          • 2. Re: problem extending mx:WebService
            mitchgrrt Level 1
            We put the declaration that I send in the previous message into a separate file. The intention is to create a mxml class that extends mx:WebService.
            • 3. problem extending mx:WebService
              rotoole Level 1
              <?xml version="1.0" encoding="utf-8"?>
              <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="0" height="0">
              <mx:WebService
              id="myService"
              wsdl=" http://www.yourweb.com/yourCFC.cfc?wsdl"
              showBusyCursor="true"
              concurrency="multiple"
              fault="this.parentDocument.handleAddFaults(event)">

              <mx:operation name="AddResult" result="this.parentDocument.handleAddResult(event)" resultFormat="object" fault="this.parentDocument.faultEvent(event)" >
              <mx:request>
              </mx:request>
              </mx:operation>
              <mx:operation name="SearchResults" result="this.parentDocument.handleDailyResults(event)" resultFormat="object" fault="this.parentDocument.faultEvent(event)" >
              <mx:request>
              </mx:request>
              </mx:operation>
              <mx:operation name="UpdateStatus" result="this.parentDocument.handleUpdate(event)" resultFormat="object" fault="this.parentDocument.faultEvent(event)" >
              <mx:request>
              </mx:request>
              </mx:operation>

              </mx:WebService>
              </mx:Canvas>

              this is one way i've done it in the past...its not pretty but at that point i wasn't really strong enough in my flex ways. since then i've actually strayed away from coldfusion and gone on to php/httpservices for speed.

              this way you can add all the webservices to one component. i haven't tried using a class just for the fact that it got a little tricky dynamically calling webservices. but i dont see why it would be a problem for parse errors. is there something that you need to do to that isn't normally in the webservice component?
              • 4. Re: problem extending mx:WebService
                mitchgrrt Level 1
                Thanks, that does seem to work.

                It seems like this is some kind of bug in Flex. Why is it OK to extend Canvas but not OK to extend WebService?