4 Replies Latest reply on Aug 10, 2010 10:05 PM by fleRavix

    Very Urgent: Error while connecting to the Backend.

    Nirmal Kumar Bhogadi

      Hello All,


      I am building an Application with Flex 3, Flourine and .NET on Cairngorm framework. However when I run my application, I am getting a runtime error saying "One of the parameters is invalid.  url: 'http:'". I tried to trace the reason but found no luck. Can someone help me in this regard.


      Nirmal Kumar Bhogadi

        • 1. Re: Very Urgent: Error while connecting to the Backend.
          fleRavix Level 2



          I workes on a Flex app that uses FlourineFX and .Net WS. Pleae post your code where u tried to connect to backend WS

          I will help you..Dont Worry

          • 2. Re: Very Urgent: Error while connecting to the Backend.
            fleRavix Level 2

            Making a remote call using a RemoteObject that returns back a strongly typed object. The call is made and the Error is triggered before you can capture it in the debugger.

            For example :
            YourMethod() returns a strongly typed class object.


            Solution and reason:
            Make sure you have an instance of the object referenced in your project. The object is not linked into your .swf upon compiling the project, because there is not a reference to the object anywhere in the project, so the RemoteObject call cannot find the class.



            if it helps mark this as useful answer

            1 person found this helpful
            • 3. Re: Very Urgent: Error while connecting to the Backend.
              Nirmal Kumar Bhogadi Level 1



              Thanks for your answer. I found the reason and fixed it. However, I am facing a different problem now.

              Below is the code I have written for my ServiceLocator:


              <?xml version="1.0" encoding="utf-8"?>
              <cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml"


                          import com.emqos.c3.model.Model;
                          import com.emqos.c3.business.command.OfficerLayer.Officers_OfficersLayerCommand;


                          import mx.rpc.events.ResultEvent;
                          import mx.controls.Alert;
                          import mx.rpc.events.FaultEvent;
                          import com.emqos.c3.model.AIWebStatusModel;


                          public var endPointURI:String=new String();


                          private static var instance:Model;


                          private var server:String=new String;
                          private var mapKey:String=new String();


                          public var checkOfficers:Officers_OfficersLayerCommand;


                          public var models:Model=Model.getInstance();


                          public function faultHandler(event:FaultEvent):void


                              Alert.show("fault: " + models.endPointURI);


                          private function methodfaultHandler(event:FaultEvent):void


                              Alert.show("method fault " + models.endPointURI);


                          private function GetOfficerNames_resultHandler(event:ResultEvent):void


                              Alert.show("res " + event.result)


                  <mx:RemoteObject id="myRemoteObj"








                                  <mx:AMFChannel id="myAmf"








                      <mx:method name="GetOfficerNames"






              When I run my application, I am not getting the result because the {models.endPointURI} is null. I am fetching endPointURI from ModelLocator. Below is the code for my main application:


              <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                          import mx.messaging.events.ChannelEvent;
                          import mx.controls.Alert;
                          import com.emqos.c3.model.Model;
                          public var modelLocator:Model = Model.getInstance();
                          public function checkData():void {
                  <business:services id="services" />
                  <control:Controller id="controller" />
                      <!-- Main view that contains the complete app -->
                  <view:SuperPanel id="panel02"
                                   title="Master Filter Panel"
                                   width="205" height="400" >


              The ServiceLocator is executing prior to ModelLocator. So the endPointURI remains null. I tried hard coding the endPointURI value. I got the result but the fault function of command is also getting executed. Can you please help me in this respect.


              Thanks in advance,

              Nirmal Kumar Bhogadi.

              • 4. Re: Very Urgent: Error while connecting to the Backend.
                fleRavix Level 2



                Do u have endPointURI in ur ModelLocator? if not, first declare endPintURI  in ModelLocator. make sure that the endpintURI is a static constant variable in modellocator. This allows the endPointURI to e used everywhere in ur app