0 Replies Latest reply on Mar 14, 2008 10:23 AM by waynezhuca

    Problem of web service when upgrading to Flex 3

      Hi,

      We got a problem when upgrading our application from flex 2 to flex 3. The same webservice call code returns different results. In Flex 2 it works properly but in Flex 3 it only returns partial data. There is no fault or error returned in Flex 3. Here are the major code:

      In IssueDelegat.as:

      public class IssueDelegate
      {
      private var responder : IResponder;
      private var service : Object;
      private var model : IssueTrackerModelLocator;

      public function IssueDelegate( responder : IResponder )
      {
      this.model = IssueTrackerModelLocator.getInstance();
      this.service = ServiceLocator.getInstance().getWebService("jiraWebService");
      if(!model.isWSDLLoaded){
      service.loadWSDL();
      model.isWSDLLoaded = true;
      }
      this.responder = responder;
      }

      public function getProjectsNoSchemes() : void
      {
      var call : Object = service.getProjectsNoSchemes(model.loggedInToken);
      call.addResponder(responder);
      model.lastWSRequestTime = new Date();
      }
      }


      In LoadProjectsCommand.as

      public class LoadProjectsCommand extends SequenceCommand implements ICommand, IResponder
      {
      public function LoadProjectsCommand()
      {
      }

      public override function execute( event : CairngormEvent ): void
      {
      var delegate:IssueDelegate = new IssueDelegate( this );
      delegate.getProjectsNoSchemes();
      }

      public function result(event:Object) : void
      {
      var model : IssueTrackerModelLocator = IssueTrackerModelLocator.getInstance();
      model.projects = event.result;

      for each (var proj:Object in model.projects){
      if (proj.key == JiraClientConstants.PROJECT_KEY){
      model.selectedProject = proj;
      break;
      }
      }
      }
      }

      The following fields are supposed to be returned in "event.result" and it does in Flex 2, but in Flex 3 it only returns <description> field:
      <description xsi:type="xsd:string"/>
      <id xsi:type="xsd:string"></id>
      <issueSecurityScheme xsi:type="ns138:RemoteScheme" xsi:nil="true"/>
      <key xsi:type="xsd:string"></key>
      <lead xsi:type="xsd:string"></lead>
      <name xsi:type="xsd:string"></name>
      <notificationScheme xsi:type="ns138:RemoteScheme" xsi:nil="true"/>
      <permissionScheme xsi:type="ns138:RemotePermissionScheme" xsi:nil="true"/>
      <projectUrl xsi:type="xsd:string"/>
      <url xsi:type="xsd:string"></url>

      Are there any major changes on the web service in Flex 3. Thanks for your help!

      Wayne