Using mx:RemoteObject

Hi There,
I was trying "Daniel Harfleet's" sample example , where he
is showing how to integrate Java and Flex using a simple RPC
example. I followed the steps, but I am getting an error on the
Server console.
My Flex application is deployed on JBoss server 4.0.5.
I've made sure that the java class is compiled and is in
placed in the WEB-INF/classes directory of my Flex application.
This is how the remoteobject tag looks in my sample.mxml
file
<mx:RemoteObject
id="echoRO"
destination="echoService"
fault="handleFault(event)"
result="handleResult(event)" />
============
This is how the entry in the remote-config.xml looks
<default-channels>
<channel ref="my-amf"/>
</default-channels>
<destination id="echoService">
<properties>
<source>fdsweb.EchoService</source>
<scope>application</scope>
</properties>
</destination>
==========
So, when I try to access the application deployed in the JBoss,
it throws the following error on the console.
22:59:59,484 INFO [STDOUT] [Flex] [ERROR] Exception when
invoking service: remo
ting-service
with message: Flex Message
(flex.messaging.messages.RemotingMessage)
operation = echo
clientId = 4A82830C-BC09-C972-DEFB-361367B86F0E
destination = echoService
messageId = C4DFD400-5B97-AB88-DFD7-80D2BD155FFC
timestamp = 1170392399484
timeToLive = 1170392399484
body = null
hdr(DSEndpoint) = my-amf
exception: flex.messaging.MessageException: No destination
'echoService' exist
s in service flex.messaging.services.RemotingService
22:59:59,500 INFO [STDOUT] [Flex] [ERROR] Error handling
message: flex.messagin
g.MessageException: No destination 'echoService' exists in
service flex.messagin
g.services.RemotingService
incomingMessage: Flex Message
(flex.messaging.messages.RemotingMessage)
operation = echo
clientId = 4A82830C-BC09-C972-DEFB-361367B86F0E
destination = echoService
messageId = C4DFD400-5B97-AB88-DFD7-80D2BD155FFC
timestamp = 1170392399484
timeToLive = 1170392399484
body = null
hdr(DSEndpoint) = my-amf
errorReply: Flex Message
(flex.messaging.messages.ErrorMessage)
clientId = null
correlationId = C4DFD400-5B97-AB88-DFD7-80D2BD155FFC
destination = echoService
messageId = 4A828333-CC08-81C5-E391-08512AA44718
timestamp = 1170392399500
timeToLive = 0
body = null
code = Server.Processing
message = No destination 'echoService' exists in service
flex.messaging.ser
vices.RemotingService
details = null
rootCause = null
body = null
extendedData = null
Could someone , please let me know as to what I am missing.
-Regards

As it seems, your destination is configured so it's likely to
be a configuration problem.
1) Are you sure your JBoss has been properly configured? This
document shows how:
http://www.adobe.com/support/documentation/en/flex/2/install.html#jboss
2) An FDS application is composed by several XML files, JAR
files and so son... To ensure your application will have all
packages needed, it's recommended to start it from samples.war
provided in FDS instalation. Are you doing it? I mean, don't start
your application from scratch, append your destination
configuration to an existing remoting-config and ad your classes to
the classes directory
3) If it doesn't work let me know

Similar Messages

  • Update DataGrid using RemoteObject

    I am using a RemoteObject method call to populate an ArrayCollection used as a dataProvider in my DataGrid. I use the render() method on the datagrid to make sure the datagrid displays the updated data the RemoteObject method is returning everytime it is displayed. My problem is the datagrid displays the updated information but gets into an infinite call.
    What might be the appropriate way to get the updated data from the backend?
    -Thanks,
    Fauzia

    Hi Michael,
    Thanks for your reply. The AC I use is bindable, but it doesn't get update with an initialize() method, thats why I had to use render(). This is an outline of my code...
      <mx:RemoteObject id="historyService" result="onResultGetList(event)" showBusyCursor="true" fault="onFault(event)" destination="historyService">
         <mx:method name="getLrcFindDetailCltn" result="onResultGetList(event)" makeObjectsBindable="true" fault="onFault(event)"/>
       </mx:RemoteObject>
           [Bindable]
            private var ldsDetails:ArrayCollection;
              public function getList():void
                historyService.getLrcFindDetailCltn();
              public function onResultGetList(event:ResultEvent):void
                 ldsDetails = event.result as ArrayCollection;
    <mx:DataGrid id="usersDataGrid" dataProvider="{ldsDetails}" render="getList();">
    <mx:columns>......
    Thanks,
    Fauzia

  • Use RemoteObject method defined in MXML from AS

    I need to use a RemoteObject from a custom component written
    as an ActionScript class. I can easily define the RemoteObject
    service and it's methods in MXML, but I don't know how to acces
    that definition from a class insite an ActionScript package. For
    example imagine
    this
    example on Adobe's site on component creation using a RemoteObject
    to do the calculations. I don't know how to define methods of a
    remote service in AcionScript, only in MXML. Thanks.

    It seems I don't have to defint the methods, just create a
    RemoteObject, set it's dource and destination, and call the methods
    on it. (services-config.xml is already set up.)
    Still, any comments are welcome. Or tutorials on the web.
    Like how to set per-method event handlers. Now I can only set it
    globally on the RemoteObject.

  • Update remoteObject using wizard-generated cfcs?

    I have a ColdFusion destination remoteObject that I can read
    a database into a datagrid. I'd like to be able to use the edit
    property of the grid to update records. I believe I have to use the
    datagrid's itemEditEnd property to call the update procedure, but I
    am lost after this.
    How can I easily update my database using the
    remoteObject?

    Sorry, can you repost this question to the FlexBuilder 2
    List? (if you haven't already) The experts on this subject would be
    available on that list.
    Thanks,
    Joan Lafferty
    Flex SDK QA

  • Not able to call Java from flex using RemoteObject

    hi,
    I am badly stuck in compiling my flex app to connect to Java code on the server side using LCDS remoteObject component.
    My swf file wouldn't trigger a method on the Java class, below is the snippet of all relevant codes, i just don't know what to do.
    Please help on what am i missing or what i am doing wrong in this.
    ------> 1. here is the ant target that uses mxmlc compiler option
    <target name="flex-compile" depends="copy-all">
        <mxmlc
          file="${uisrc}/OnlineServicesPortal.mxml"
          output="${prjdeploydir}/OnlineServicesPortal.swf"
          actionscript-file-encoding="UTF-8"
          keep-generated-actionscript="true"
          incremental="true"
          as3="true">
    <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
    <source-path path-element="${FLEX_HOME}/frameworks"/>
    <library-path dir="${FLEX_HOME}/frameworks" append="true">
         <include name="libs" />
    </library-path>
    <compiler.source-path path-element="${FLEX_HOME}/frameworks"/>  
    <compiler.include-libraries dir="${FLEX_HOME}/frameworks" append="true">   
         <include name="libs/datavisualization.swc" />   
         <include name="libs/fds.swc" />  
         <include name="libs/player/10/playerfds.swc" />   
         <include name="locale/en_US/datavisualization_rb.swc" />
         <include name="locale/en_US/fds_rb.swc" />
    </compiler.include-libraries>
    <!--compiler.services filename="${src}/flex/services-config.xml"/-->
    <!--context-root context-path="portal"/-->
    <default-size width="500" height="600" />
        </mxmlc>
      </target> 
    ---------2. services-config.xml file
    <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
        <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
        <properties>
    <polling-enabled>false</polling-enabled>
        </properties>
    </channel-definition>
    <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
        <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
    </channel-definition>
    ----------3. remoting-config.xml file
    <service id="remoting-service"
        class="flex.messaging.services.RemotingService">
        <adapters>
            <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
        </adapters>
        <default-channels>
            <channel ref="my-amf"/>
            <channel ref="my-http"/>
        </default-channels>
        <destination id="portal">
            <properties>
                <source>com.mssb.portal.impl.PortalService</source>       <!---this class file is valid & exists-->
            </properties>
        </destination>
    </service>
    -----------4. mxml file
    <mx:RemoteObject  id="myRO"  destination="portal"  result="createFieldsResultHandler();"  fault="createFieldsFaultHandler();">
    </mx:RemoteObject>
    myRO.persistServiceDefinition(serviceDef)                           //called from action script function invoked upon a click of a button.

    actually , I have laready given print stataement for the data in the context property file that you can see in the output. Today I am also able to call the bpel process using the same java program from my DOS command promt(cmd). Don't understand why the problem is occuring in unix.
    please help.

  • How to use ZendAMF with multiple services?

    I followed Mihai Corlan's tutorial (http://corlan.org/2008/11/13/flex-and-php-remoting-with-zend-amf/) to create a remote service with Zend AMF, and it works great.
    But, I can't figure out how to use multiple RemoteObjects. I keep getting the infamous:
               faultCode:Client.Error.DeliveryInDoubt faultString:'Channel disconnected' faultDetail:'Channel disconnected
               before an acknowledgement was received'
    I set up my second RemoteObject the same way that I set up my first one.  But, I can't get it to work.
    Any suggestions? Has anyone seen examples of multiple services being used?
    Thank you!
    -Laxmidi

    I made a stupid php error.
    If you can do a single remote, you can do multiple ones. It's straightforward.
    -Laxmidi

  • Using session variables in Flex 2

    I'm not sure if this is the correct place for this
    topic...but the Flex 2 upgrade/migration forum didn't seem too
    lively. So let me set up my situation and then pose the question.
    In Flex 1.5, I accessed the session servlet using:
    <mx:RemoteObject source="servlet" id="servlet"/>
    This allowed me to store session variables such as a user
    object:
    var u:User = new User();
    servlet.session("set", "user", u);
    This allowed me to access these variables from another Flex
    app:
    var user:User;
    servlet.session("get", "user");
    How would I go about doing this in Flex 2.0? Thanks to those
    who can help.

    That almost works. I had to adjust the syntax to the following...and then there are other issues doing this.
    select cust_no, name,'@{session.currentUser}' from customersMy write-back SQL is this:
    UPDATE customers SET NAME='@{c1}',LAST_EDITED_BY='@{c2}' WHERE CUST_NO=@{c0}But I don't want to display the cust_no column to the user. So I hide it in the UI. But if I do that I get the below error during write-back. Apparently sometimes when you hide a column on a direct query (numeric maybe?) the value doesn't transfer over to the write-back. If that's the case, this won't work for me. Hmm...
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43093] An error occurred while processing the EXECUTE PHYSICAL statement. [nQSError: 17001] Oracle Error code: 936, message: ORA-00936: missing expression at OCI call OCIStmtExecute: UPDATE customers SET NAME='Wyatt Donnely',LAST_EDITED_BY='Administrator' WHERE CUST_NO= . [nQSError: 17011] SQL statement execution failed. (HY000)
    SQL Issued: EXECUTE PHYSICAL CONNECTION POOL dev1 UPDATE customers SET NAME='Wyatt Donnely',LAST_EDITED_BY='Administrator' WHERE CUST_NO=

  • Flex RemoteObject

    Hello All
    Who know How to use Flex Remoteobject element in Web Dynpro Java with Flash-Islands.thanks

    Hi,
    Have a look at the following thread:
    [Flash Islands] Flex communication, AMF (Action Message Format) ?
    Regards.
    Rajat

  • Trying to create an abstract service that supports both DataService(LCDS) and RemoteObject

    I am trying to create a generic service processor in ActionScript that would be able to use a DataService(from LCDS) or a RemoteObject, depending on a property setting. The intent is to be able to change a setting during installation to control whether DataServices would be used, or RemoteObjects. I understand that the server side logic would need to be written differently for each of the implementations.
    The challenge is that accessing a DataService is synchronous, but a RemoteObject access is asynchronous.
    For the synchronous access, I can just call a service and return the result directly to an object which can be passed back to the client.
    For the asynchronous support, extra code must be written on the client side to listen for the return of a requested result (for example, the results of a database quesy). This code must be placed outside of the service itself, thus making the generic service non-generic.
    Are there any examples available that accomplish what I am trying to do?

    Hi. As far as I know both DataService and RemoteObject are asynchronous APIs. If you call a DataService method such as fill() or call a method on your RemoteObject, code in your Flex application will continue to execute and the result from the RemoteObject or DataService request will be received asynchrounously. I don't believe there is any way currently to make synchronous or blocking calls in Flex because of the Flash Player's execution model.
    How are you planning on using the DataService and RemoteObject in your application? Is it to do something like populate a DataGrid? Do you plan on updating the data retrieved from the DataService or RemoteObject such as adding, updating or deleting records?
    The DataService API is much more powerful than the RemoteObject API, in that if you bind an ArrayCollection that is populated from a DataService to your DataGrid, when you update data in the DataGrid, the data on the server is updated and all other clients that have the same view of the data will also get the updates. You don't currently get this functionality with RemoteObjects.
    My point here is that if you wanted to write an abstract service that supports both DataService and RemoteObject and you need to be able to add, update or delete records you are going to need to write a lot of custom code to listen for collection change events when data on the client is modified and translate these change events into RemoteObject requests. Even if you did do that, other clients would not get these updates.
    If all you want to do is something simple like populate a DataGrid with data from the DataService or RemoteObject, then sure, writing an abstraction layer on the client that supports both of these wouldn't be hard.  
    -Alex

  • Timming Problem with RemoteObject

    Hi,
    I am Sagar S. De, I have faced a problem with Flex
    DataService described below…
    I am using flex RemoteObject to get data from Database and
    then I am trying to set the data in ArrayCollection. But the data
    is not assigned to ArrayCollection. When I am debugging I have
    found that the ArrayCollection is assigned before data came from
    Database. How do I solve the problem?
    Here is a code snippet where I have faced the problem exactly
    (In alert box Result2 comes before Result1).
    package visualsqlbuilder.logic {
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.remoting.mxml.RemoteObject;
    public class Table {
    public var tableNames : ArrayCollection = new
    ArrayCollection();
    /* RETURNS ALL TABLE NAMES FORM THE DATABASE OF THE
    SPECIFIED SCHEMA */
    public function getTables(connectionTypetring,
    schemaNametring) : ArrayCollection {
    var remoteGetTables : RemoteObject = new RemoteObject();
    remoteGetTables.destination = "DBDetails";
    remoteGetTables.addEventListener(ResultEvent.RESULT,
    resultGetTables);
    remoteGetTables.addEventListener(FaultEvent.FAULT,
    faultGetTables);
    remoteGetTables.showBusyCursor = true;
    remoteGetTables.getDBTables(connectionType, schemaName);
    //Executes Before data came from Database and show tableNames
    as blank ie. null
    Alert.show("Result 2: " + tableNames.toString());
    return tableNames;
    public function resultGetTables(event:ResultEvent) : void {
    var result : ArrayCollection = event.result as
    ArrayCollection;
    tableNames.removeAll();
    for(var i : int = 0; i<result.length; i++) {
    var string = result.getItemAt.toString();
    tableNames.addItem;
    //Executes later; ie. After getting data from Databse and
    show tableNames correctly
    Alert.show("Result 1: " + tableNames.toString());
    public function faultGetTables(event:FaultEvent) : void {
    mx.controls.Alert.show(event.fault.toString());

    You need to realize that Flex does most of the asynchronous,
    that means that the function
    remoteGetTables.getDBTables(connectionType, schemaName); will
    returns immediately.
    So if you want to place an Alert somewhere, do it in your
    response function where you currently show your Result 1.
    It's currently hard to understand what you really want to do
    with your dataset. But further processing of real data needs to be
    done in the function resultGetTables or other functions executed
    when the result comes back.
    Ries

  • Running a Flex App using Coldfusion Flash Remoting Services gives me a blank SWF file but no errors

    I cannot get flex to compile to display anything. even if its
    just a single panel and some text. If I use the wizard and choose
    "Basic" or whatever, I get a flex app. But i am using cfcs so I
    selected "Coldfusion Flash Remoting Services" and when I select
    run, the browser pops up with a nice big blank screen. No loading
    progress bar, no errors, nothing.
    I am running cf8 as a standalone (developers edition)
    under project properites --> server
    root folder: C:\ColdFusion8\wwwroot
    root url
    http://localhost:8500/
    context: (blank)
    I have messed with context and webroot.
    I doesn't matter if I use a remoteObject or not. Nothing
    happens
    i through in a crossdomain.xml into the root to open it up,
    just to be sure.
    I am really stumped. I had this working fine on a previous pc
    (running cf7)
    any ideas anyone???

    I tried with some of the AS3 files from Adobe samples (http://www.adobe.com/devnet/actionscript/samples.html), for eg., the Drawing API. There are slider components in the flash app that don't show up either. Does that give anyone a clue as to what might be wrong? Thanks, Ramesh

  • Offline synchronization using AIR and Blazeds

    hi freinds how we do offline synchronizaton in AIR application using Blazeds ...
    can u please guide me..
    thanks in advance
    Prajnith.

    Basically, is you use straight PHP, then you do everything yourself, unless you are using a framework written in PHP like AMFPHP.
    So with PHP you typically use Flex HTTPService controls to call your PHP scripts, and the communication is one-way, you call the script and handle the returned data.
    With BlazeDS and AMFPHP, you can use Flex RemoteObject controls for two-way "server push" functionality, like a stock ticker updating automatically without the user doing anything if the price of a stock goes up.
    Backend distributed data just means you have the data elsewhere (not on the user's machine), and it could be distributed (on serveral servers).
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.chikaradev.com
    Adobe Flex Development and Support Services

  • ChannelSet vs Endpoint - RemoteObject (+ColdFusion!) - Just Questions

    hello,
    I've been working with Flex for a few years now, and recently came across a discussion about channelsets versus the endpoint property in a remoteObject call. My questions are general, but I hope someone can shed some light on this issue:
    1. I have an application that is configured with ColdFusion as it's destination, and I'm using a remoteObject. When I specify a dynamic endpoint, I can simply deploy the application across all of my environments, without having to change services-config.xml or remoting-config.xml files. The opposite is true of a channelset; in a channelset it appears as if I have to change the services-config and remoting-config.xml files in order to get my application to work on my environments. With that in mind, why would I use a channelset here versus an endpoint?
    2. In the Adobe documentation for channelset, it states that Channelset is used in BlazeDS only (http://livedocs.adobe.com/flex/3/langref/mx/messaging/ChannelSet.html). What does this mean? Is this only accessible because BlazeDS is built into ColdFusion? If I do not have BlazeDS available, what happens to the channel set?
    3. What types of applications would you use Channelset for? If you know the endpoint (e.g. www.yourwebsite.com/flex2gateway/secureamf), why would you use channelset over the endpoint property?
    Thank you for your help.

    If you have access to your deployment server you can use the Flex compiler
    settings if you don't then the best option will be to use the endPoint,
    there is no significant downside or upside on this. You can write a single
    bindable var and in this one set the value for endPoint

  • EJBHome vs EJBObject what is the difference and which one is better

    Hi
    1) What is the advantage of LocalHome & LocalObject over EJBHome and EJBObject interfaces??
    2) In which situation we need to use LocalHome & LocalObject interface??
    3) In which situation we need to use RemoteHome & RemoteObject interface??
    Thanks in advance
    Dhinesh Kumar R

    There is not much difference between Z77A-GD55 and -GD65. GD65 is a bit better than GD55 for oc and offers easy voltage check points. The slot layout is also a bit different. Looking at the price point the GD55 is m ost likely the better deal. You can compare mainboards using the following link:
    http://www.msi.com/service/product-comparison/mb.html

  • Problem in Blazeds with Jboss Clustering ( Mod_JK with SSL )

    Hi,
         We are running our flex application in jboss clustering environment with the help of Apache mod_jk(Apache Web server as front end with mod_ssl enabled). We are using the SecureAMFChannel as we deploy the application in SSL. We use the RemoteObject for communicating with Java.
    The Application is running fine when we have only one node of JBoss. But once we add one more node to the cluster the application throws the following exception .
    Duplicate HTTP-based FlexSession error: A request for FlexClient 'FDCA49A7-9317-4D8A-881F-9248B1136E7A' arrived over a new FlexSession 'C9C563B8266A03C2207C00796CD7DFF1', but FlexClient is already associated with  FlexSession '8A328320F5C530D55E94568996A1B552', therefore it cannot be associated with the new session.
    As I am maintaing the session in the server, I need to use the JBoss cluster for session replication. I heard that flex clustering is not needed as we have mod_jk and it will do all the stuff for us.
    I checked with simple application without any session data also then too I faced the same problem.
    After the very first login, I can see 2 session created simultaneously and destroyed. I checked the application whether it calls twice before the session is created, but it is calling only once.
    Also when application connects with server2 and if I down the server2 my flex application throws the error that the server is not found, It is not detecting the other server.But it works once I refresh the browser.
    Application Environment Details
    JBoss 6
    Blaze Ds 4.5
    Apache Web server 2.2.21
    Mod_JK   1.2.32
    Mod_SSL 2.8.31
    Thanks,
    Suresh T
    I enabled the sticky session in Mod_jk .
    It is working when the connection is not secure(http) in both apache web server and jboss web server ). But when the connection is https the above problem is happening .
    Message was edited by: suresh.thirumurugan

    Hi,
     Thanks for your info.
      It worked for me as well.
    Thanks,
    Prasad
    On 6/26/08,
    Matthieu Labour <
    [email protected]> wrote:
    A new message was posted by Matthieu Labour in
    Configuration and Getting Started Discussion --
      Problem with configuring BlazeDS with JBOSS
    You might want to download the following tutorial
    http://sebastien-arbogast.com/2008/04/10/flex-spring-and-blazeds-the-full-stack/
    it works on jboss
    Best
    Matt
    View/reply at
    Problem with configuring BlazeDS with JBOSS
    Replies by email are OK.
    Use the
    unsubscribe form to cancel your email subscription.

Maybe you are looking for

  • SOA 10g JMS adapter does not pick up large messages in Oracle AQ

    I am using SOA 10g 10.1.3.4 MLR #9. When I enqueue a large JMS message ( of type SYS.AQ$_JMS_TEXT_MESSAGE ) into the AQ from SOA 11g it goes into the TEXT_LOB portion of the USER_DATA column in AQ. In addition to this GROUPID and GROUPSEQ do not seem

  • Depressed Solaris LWP priorities in J2SE 1.4.2, but not in 1.4.1

    I have noticed that with J2SE 1.4.2 on Solaris 8 many of the Solaris LWPs are fixed to run at a lower priority than other LWPs, TS priority level 28. This was not true in J2SE 1.4.1, that all LWP prorities float on their own. I see that when I add ad

  • Error in BusinessRootBjectCore.login in MSA during writing in Outboundqueue

    Hello CRM Gurus, i need your help.  We use CRM5 clients in the field. And we use the save-method for an specific user to create entries in the outboundqueue. It works all fine. But now I have a client, which get the error "BusinnesRootObjectCore.Logi

  • Adobe Acrobat Pro application is not giving correct scale to drawings

    When using Adobe Acrobat 8 Standard I have issues when trying to scale off PDF's that I receive from Architects. When using the distance, area, or perimeter tool it will not scale correctly even after I change the scale in the tool box. I've tried to

  • Wacom Tablets & 3rd Party inking apps

    If this is not the correct forum for this question, please redirect me. I have a Wacom Graphire 4. I just found the inkBook software by magesw.com . It keeps locking up in the edit mode. I've tried it on both my new iMac intel and a G4 iBook. Any hin