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.

       

      Thanks,
      Nirmal Kumar Bhogadi

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

          Hi,

           

          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 :
            YourremoteObject.YourMethod();
            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

              Hello,

               

              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"
                                        xmlns:cairngorm="com.adobe.cairngorm.business.*">

               

                  <mx:Script>
                      <![CDATA[
                          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;

               

                          [Bindable]
                          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:Script>

               


                  <mx:RemoteObject id="myRemoteObj"
                                   destination="fluorine"
                                   source="AutoIssueGisLibrary.AutoIssueGISLibraryClass"
                                   fault="faultHandler(event)"
                                   result="GetOfficerNames_resultHandler(event)">

               

                      <mx:channelSet>

               

                          <mx:ChannelSet>

               

                              <mx:channels>

               

                                  <mx:AMFChannel id="myAmf"
                                                 uri="{models.endPointURI}"/>

               

                              </mx:channels>

               

                          </mx:ChannelSet>

               

                      </mx:channelSet>

               

                      <mx:method name="GetOfficerNames"
                                 result="GetOfficerNames_resultHandler(event)"/>

               

                  </mx:RemoteObject>

               

              </cairngorm:ServiceLocator>

               

              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"
                      xmlns:panelView="com.emqos.c3.views.panels.*"
                      xmlns:control="com.emqos.c3.control.*"
                      xmlns:business="com.emqos.c3.business.service.*"
                      xmlns:view="com.emqos.c3.widget.superPanel.panel.*"
                      layout="absolute"
                      height="100%"
                      width="100%"
                      preinitialize="checkData()">
                 
                  <mx:Script>
                      <![CDATA[
                          import mx.messaging.events.ChannelEvent;
                          import mx.controls.Alert;
                          import com.emqos.c3.model.Model;
                         
                          [Bindable]       
                          public var modelLocator:Model = Model.getInstance();
                         
                         
                          public function checkData():void {
                             
                              modelLocator.onLoad();
                             
                          }
                         
                         
                         
                      ]]>
                  </mx:Script>   
                  <business:services id="services" />
                  <control:Controller id="controller" />
                     
                      <!-- Main view that contains the complete app -->
                  <view:SuperPanel id="panel02"
                                   title="Master Filter Panel"
                                   showControls="true"
                                   enableResize="true"
                                   horizontalScrollPolicy="off"
                                   width="205" height="400" >
                                  
                      <panelView:MainPanel/>
                     
                  </view:SuperPanel>   
                 
              </mx:Application>

               

              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

                Hi,

                 

                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