5 Replies Latest reply on Jun 7, 2006 3:35 AM by dibyadyuti

    remote object problem!!!

    louxinhua
      when i remote the object,it always have a error: service myclassName not found.
      I use Flex1.5,and Tomcat5.0.28.
      In flex-config.xml:
      <remote-objects>
      ...
      <unnamed>
      <source>edu.*</source>
      <source>edu</source>
      <source>*</source>
      .....
      </unnamed>
      Can anyone help me!!!Thanx
        • 1. Re: remote object problem!!!
          Level 7
          Have you taken a look at the documentation for RemoteObject?

          http://download.macromedia.com/pub/documentation/en/flex/15/flex_dev_apps.pdf

          If you still have problems, then please provide us with more detail about
          your java object and your RemoteObject call.

          --
          Jason Szeto
          Adobe Flex SDK Developer

          "louxinhua" <webforumsuser@macromedia.com> wrote in message
          news:e4cq4p$rnc$1@forums.macromedia.com...
          > when i remote the object,it always have a error: service myclassName
          > not
          > found.
          > I use Flex1.5,and Tomcat5.0.28.
          > In flex-config.xml:
          > <remote-objects>
          > ...
          > <unnamed>
          > <source>edu.*</source>
          > <source>edu</source>
          > <source>*</source>
          > .....
          > </unnamed>
          > Can anyone help me!!!Thanx
          >


          • 2. Re: remote object problem!!!
            louxinhua Level 1
            Thanx,Jason Szeto.I find what is the problem.
            Now it works good!!!
            • 4. Re: remote object problem!!!
              TIPLVinay Level 1
              In MXML use

              <mx:RemoteObject id="classused" source="packagename.classname" result="resulthandler here" fault="fault handler here" >
              <mx:method name="methodname">
              </mx:method>
              </mx:RemoteObject>

              <mx:RemoteObject id="classused" source="packagename.classname" >
              <mx:method name="methodname" result="resulthandler here" fault="fault handler here">
              <mx:arguments><! arguments are optional here-->
              </mx:arguments>
              </mx:method>
              </mx:RemoteObject>
              but it is insecured way to call RemoteObject(classes)\

              Use named services

              Example with named services:-
              in mxml file:
              <mx:RemoteObject id="logRO" named="LOGRO" showBusyCursor="true"
              fault="alert(event.fault.faultstring, 'Error')">
              <mx:method name="setLogin" result="user.text=event.result">
              <mx:arguments>
              <userId>userId.text</userId>
              <passwd>passwd.text</passwd>
              </mx:arguments>
              </mx:method>
              </mx:RemoteObject>

              in flex-config.xml:
              <remote-objects>
              <whitelist>

              <unnamed>

              <source>login.*</source>

              </unnamed>

              <!-- whitelist config for named objects -->
              <named>
              <object name="LOGRO">
              <encoding>AMF</encoding>
              <source>login.Logincls</source>
              <type>stateful-class</type>
              <allow-unnamed-access>false</allow-unnamed-access>
              </object>
              </named>
              </whitelist>
              </remote-objects>
              The class "Logincls" should be in WEB-INF/classes/login folder .

              U can call now like this:
              logRO.setLogin(userId.text,passwd.text);

              Hope this helps

              with Kind regards

              Vinay


              • 5. Re: remote object problem!!!
                dibyadyuti
                louxinhua
                please help me to generate a web project on flex.
                i am giving you a link.

                http://livedocs.macromedia.com/flex/15/asdocs_en/mx/servicetags/RemoteObject.html

                my yahoo id is
                dibyachak@yahoo.co.in
                please help me with simple example
                please help me to generate this example with the help of flex.