Remote Object - not able to get the returned value from java method

     Hi ,
I am developing one sample flex aplication that connects to the java code and displays the returned value from the
java method in flex client. Here I am able to invoke the java method but not able to collect the returned value.
lastResult is giving null .  I am able to see the sysout messages in server console.
I am using flex 3.2 and blazeds server  and java 1.5
Here is the code what I have written.
<?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication  xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FFFFFF" initialize="initApp()">
 <mx:Script><![CDATA[
import mx.controls.Alert; 
import mx.binding.utils.ChangeWatcher; 
import mx.rpc.events.ResultEvent; 
import mx.messaging.*; 
import mx.messaging.channels.* 
public function initApp():void { 
     var cs:ChannelSet = new ChannelSet(); 
     var customChannel:Channel = new AMFChannel("my-amf", "http://localhost:8400/blazeds/messagebroker/amf");     cs.addChannel(customChannel);
     remoteObj.channelSet = cs;
public function writeToConsole():void {      remoteObj.writeToConsole(
"hello from Flash client");
      var returnedVal:String = remoteObj.setName().lastResult;     Alert.show(returnedVal);
//[Bindable] 
// private var returnedVal:String; 
]]>
</mx:Script>
<mx:RemoteObject id="remoteObj" destination="sro" /> 
<mx:Form width="437" height="281">
 <mx:FormItem>  
</mx:FormItem>  
<mx:Button label="Write To Server Console" click="writeToConsole()"/>
 </mx:Form>
 </mx:WindowedApplication>
Java code
public  
     public SimpleRemoteObject(){  
          super();     }
  class SimpleRemoteObject { 
     public void writeToConsole(String msg) {          System.out.println("SimpleRemoteObject.write: " + msg);     }
     public String setName(){          System.
out.println("Name changed in Java"); 
          return "Name changed in Java";
And I have configured destination in  remote-config.xml
<destination id="sro">
   <properties>    
    <source>SimpleRemoteObject</source>
    <scope>application</scope>
   </properties>
  </destination>
Please help me .

You are not able to get the returned value because if you see the Remote object help you will realise you have to use result="resultfn()" and fault = "faultfn()"
In this you define what you wish to do.
More importantly in the remote object you need to define which method you wish to call using the method class like this
<mx:RemoteObject id="remoteObj" destination="sro" result="r1" fault="f1"  >
     <Method name="javaMethodName" result="r2" fault="f2"/>
<mx:RemoteObject>
r2 is the function where you get the result back from java and can use it to send the alert.

Similar Messages

  • Not able to get the full value from request.getParameter()

    hi all,
    Iam giving a text input value as" Analysis and tracking" in one jsp form.
    while fetching and assigning the value to another variable using request.getparameter , iam getting only the text "Analysis" , the space after it were ignored andnt displaying it.
    Help me in solving this.
    thanx
    Balaji

    I think you are code is something like this
    <input name="xyz" type="text" value=<%=variable%>>
    HTML ignores spaces. Therefore you are only getting Analysis, the first word, when your browser encounters the first space it ignores whatever is present after that.
    One way of overcoming this is putting double quotes around the text value
    <input name="xyz" type="text" value=<% out.println("\"" + variable + "\""); %>
    Thanks.

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

  • Not able to get the Qualification data from BAPI

    Hi all,
    I am using a BAPI (BAPI_JOBREQUIRE_GETLIST) to get the qualifiaction data for requirement profile. It's working fine earlier but I did not get the qualification data from this BAPI, although the data is there in DB against this requirement profile.
    Can someone suggest me why I am getting this issue. I have looked into SDN and in BAPI documentation and found as below:
    "You require authorization (structural authorization) to read the Requirements subprofile."
    I am having the same User ID as I had before (when I getting back the correct data), so I don't think it should be authorization issue.
    Can someone help me out in this issue please.
    Thanks,
    Sanket Sethi

    Hi Shiva,
    It does not going to these includes at all. Message comes out with successfully done. The BApi is calling RHPP_COMMON_QUALI_READ inside, but this will not return any data. But if will call any qualification object ID, this BAPI will come up with data.
    So the QP type LO profile will not come up with any kind of data, but if we pass the OTYPE as Q and pass any Qualification object ID then the data will be returned.
    Is there any relationship or some other thing is missing? Any idea.
    Thanks,
    Sanket Sethi

  • Not able to get the profile value set at Responsibility level

    Hi,
    I had set the value of a custom profile at Responsibility level and in CO i used the
    following code,
    String rLocation = pageContext.getProfile("XXTMG_PR_SCP_LOCATION");
    The above call returns NULL. But if i set the value of the profile at Site Level then the above code returns the correct value of the profile. I bounced the apache after the profile option was changed but no avail.
    I even tried using getOADBTransaction().getSpecificProfile() in the AM (which was
    called from CO) as below but could not get the value of the profile,
    Number lRespID = new Number(getOADBTransaction().getResponsibilityId());
    String retLoc1 = getOADBTransaction().getSpecificProfile("XXTMG_PR_SCP_LOCATION","","",
    lRespID.toString());
    Could any of you please let me know whether i have missed something in the code which results in not getting the correct value for the profile at the Responsibility level.
    Thanks, Suresh.

    Instead of passing null for the other parameters in call to getSpecificProfile, can you please set these params and try ?
    Also, please note that if a value is defined at site level, then even if a value is present at the resp level, the value at site will be returned when you use getProfile method.
    Thanks
    Tapash

  • How do I get the return value from an executable?

    I'm running an external executable from dbms_scheduler but how do I get the exit code from the program run or any screen output?

    Hi,
    In the additional_info column of schedulerjob_run_details there should be something like
    job of type EXECUTABLE failed with exit code: Operation not permitted
    "Operation not permitted" is the error code (as translated by the errors header file for that platform).
    In releases 10.2 and up there may also be a line in the additional_info
    STANDARD_ERROR="Error text here"
    This gives the standard error messages output by the application. There is no way to get the standard output of the application.
    Hope this helps,
    Ravi.

  • How to get the return value of a method

    hi there
    here is the code i write a method
    public void time(int x,int y){
    int xx;
    int yy;
    xx++;
    yy++;
    x=xx;
    y=yy;
    i want to use the return value of x and y at another place,who can tell if it is possible. thank u very much

    You declare the return type of the method, and then use the return keyword to return a value which you can assign to a variable.
    As the other respondent said, you cannot return more than one value from a function. If you need to return two related values, you may want to enclose them in a class and return an instance of that class. For instance:
    class TimeValue {
       final int x;
       final int y;
    public TimeValue(int x, int y) {
       this.x = x;
       this.y = y;
    }Then your method could create a new TimeValues and return it:
    public TimeValue time(int x,int y){
       int xx = x;
       int yy = y;
       ++xx;
       ++yy;
       return new TimeValue(xx, yy);
    }

  • Not able to get the current data from the screen

    Hello All,
    I have created a table view on a value node.  I edit a field which has a date F4 help or a field DDLB and click SAVE.
    In the save event handler I am using get first statement in the loop and when I see the contents of the entity it is the old data not the new values.
    Could you please help me on this ?
    Regards
    Sohit

    Hi Sohit,
    Use GET_CURRENT method of CL_CRM_BOL_ENTITY and try.....
    (make sure the Setter method is updating the values)
    Regards,
    Masood Imrani S.

  • Laptop not able to get the wireless signal from the lightweightAP

    Brief idea of the installation.
    One WLC 5500 active -> second not yet installed
    36 AP active, at the end they will be 45 (9 not installed)
    Everything on the configuration look active and the light AP are registred to th
    e WLC. 
    RF Channel definition done by WLC on all AP
    Power definition done by WLC on all AP
    Detection of rouge AP
    But the laptops can't even detect the RF signal.
    I try to detect the signal with 2 laptop which they where working in other sites with wireless in place.
    We ara using 3 different application or client: Ippass, Odyssey, wiresquark Any of this application detect the signal.
    However, on the WLC and on the light AP are up and running. Status up, channel and power automatic definition.
    On the log I can see the detection of some Rouge AP around.

    Did you enable "Broadcast SSID"?

  • How to get the returned value from Functions with Callable statement?

    I was glad to find that stored procedures can be invoke with Java class code by the object of Callable statement like :
    String stmt = "BEGIN departments_pkg.do_select(?,?,?); END;";
    and getting the output variables by
    populateAttribute(DEPARTMENTNAME,st.getString(2),true,false);
    But i would like to get values returned from FUNCTION other than stored procedure, how can i achieve it? Thanks a lot!

    Here is  my code
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1202.
      MODULE subscreen_find.
      CALL SUBSCREEN SUBSEARCH INCLUDING sy-cprog dynnr.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_1202.
      CALL SUBSCREEN SUBSEARCH.
    MODULE subscreen_find.
      case sy-ucomm.
        when 'SELECTED'.             "fcode
          case 'ZSKILL_SEARCH'.     "data element
            when '01'.                       " value range
              dynnr = 0110.
            when '02'.
              dynnr = 0111.
          endcase.
      endcase.
    ENDMODULE.
    kindly tell me what is wrong
    Edited by: Raji Thomas on Feb 8, 2010 10:20 AM

  • !!! I need to get the return value from a PL/SQL in Java.. How??? !!!

    Hi
    -- I have a PL/SQL in which it return an array value and I need to get the value using Java.... any idea how?
    thanks

    Check out CallableStatement:
    http://java.sun.com/j2se/1.5.0/docs/api/java/sql/CallableStatement.html

  • Not able to get the actual plan from trace file

    Hi all
    I have a Db package and want to get actual execution plan of all the statements in that pakcage it does provides the plan for System's statements but does not displays the plan for Sql statements
    DB version 9.2.0 using the following sequence of insructions
    set timing on
    set serveroutput on
    alter session set events '10046 trace name context forever ,level 12';
    begin
    run_service.collect_data(sysdate);
    end;
    alter session set sql_trace=false;
    exit; ---exit from Sql
    now look at the output
    select distinct obj#,containerobj#,pflags,xpflags,mflags
    from
    sum$, suminline$ where sumobj#=obj# and inline#=:1
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.00 0.00 0 0 0 0
    Fetch 1 0.00 0.00 1 1 0 0
    total 3 0.00 0.00 1 1 0 0
    Misses in library cache during parse: 0
    Optimizer goal: CHOOSE
    Parsing user id: SYS (recursive depth: 2)
    Rows Row Source Operation
    0 SORT UNIQUE
    0 NESTED LOOPS
    0 TABLE ACCESS BY INDEX ROWID SUMINLINE$
    0 INDEX RANGE SCAN I_SUMINLINE$_2 (object id 1614116)
    0 TABLE ACCESS BY INDEX ROWID SUM$
    0 INDEX UNIQUE SCAN I_SUM$_1 (object id 319)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file sequential read 1 0.00 0.00
    SELECT SEQ_NUM, S_DATE, S_TIME, CSTATUS, G_SERVICE,
    B_REFERENCE, V_REFERENCE, M_PRIORITY
    FROM GL_HIST
    ORDER BY S_DATE DESC, S_TIME DESC
    call count cpu elapsed disk query current rows
    Parse 1 0.01 0.01 0 0 0 0
    Execute 2819 0.37 0.32 0 0 0 0
    Fetch 2819 2.50 20.47 2786 20164 0 2819
    total 5639 2.88 20.81 2786 20164 0 2819
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 15550 (recursive depth: 1)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file sequential read 2786 0.05 18.19
    latch free 4 0.04 0.06
    UPDATE G_ORIG SET G_SERVICE = :B1
    WHERE
    SEQ_NUM = :B5 AND S_DATE = :B4 AND S_TIME = :B3 AND
    C_STATUS = :B2 AND NVL(G_SERVICE, '+') <> NVL(:B1, '+')
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.03 0 0 0 0
    Execute 3731 0.74 0.99 261 18712 119 54
    Fetch 0 0.00 0.00 0 0 0 0
    total 3732 0.74 1.02 261 18712 119 54
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 15550 (recursive depth: 1)
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    db file sequential read 261 0.01 0.19
    latch free 9 0.01 0.04
    COMMIT

    Remove the line alter session set sql_trace=false and just exit/disconnect. The explain plain is contained in the STAT lines in the trace file and are only written when the cursor closes. If you turn off tracing before the cursor closes the STAT lines will not get written.

  • Not able to get the whole output from BBP_PROCDOC_GETLIST FM

    Hi
    I am using the BBP_POCDOC_GETLIST FM to display the Shopping Cart details in the ALV report.
    But when Date range is large (suppose 1 month)  in the FM then it is not displaying the every SC details in the Report. For small range it is working fine.
    CALL FUNCTION 'BBP_PROCDOC_GETLIST'
         EXPORTING
           i_object_type      = /infype/cl_common=>gc_object_type_sc
           i_create_date      = date-low
           i_create_date_to   = date-high
           i_status_select_or = /infype/cl_common=>gc_x
           i_item_not_deleted = /infype/cl_common=>gc_x
         TABLES
           i_range_object_id  = lt_sc_no
           e_pdlist           = lt_sclist
           e_messages         = lt_messages.
    Please help me on this.
    Thanks in advance
    Pratham

    Hi Shiva,
    It does not going to these includes at all. Message comes out with successfully done. The BApi is calling RHPP_COMMON_QUALI_READ inside, but this will not return any data. But if will call any qualification object ID, this BAPI will come up with data.
    So the QP type LO profile will not come up with any kind of data, but if we pass the OTYPE as Q and pass any Qualification object ID then the data will be returned.
    Is there any relationship or some other thing is missing? Any idea.
    Thanks,
    Sanket Sethi

  • How to get the Node Value from XmlValue result?

    Hi ,
    I am not able to get the Node Value from the result. In my XQuery im selecting till a Node, if i change my query as
    collection('PhoneBook')/phone_book/contact_person/address/string()", qc);
    im getting the node value, but here the problem is its not a Node so i cannot get the Node name.
    So how can i get the Node Name and Node value together?
    any help please ????
    XML :
    <?xml version="1.0" encoding="UTF-8"?>
    <phone_book>
    <contact_person>
    <name>
    <first_name>Michael</first_name>
    <second_name>Harrison</second_name>
    </name>
    <address city="yyyyy" pincode="600017" state="xxxxx">
    176 Ganesan street, Janakinagar, alwarthirunagar
    </address>
    </contact_person>
    <phone_number type="mobile">9881952233</phone_number>
    <phone_number type="home">044-24861311</phone_number>
    <phone_number type="office">080-12651174</phone_number>
    </phone_book>
    Code:
    XmlQueryContext qc = manager.createQueryContext();
    XmlResults rs = manager.query
    ("collection('PhoneBook')/phone_book/contact_person/address", qc);
    while(rs.hasNext()){
    XmlValue val = rs.next();
    System.out.println(val.getNodeName() + " = [ " + val.getNodeValue() + " ] ");
    Output
    address = [  ]

    You are right, this seemed un-intuitive to me too, but I finally understood how it's done.
    The "value" of a node is actually the total amount of text that is not contained in any of the node's child nodes (if any). So a node with child nodes can still have text value.
    To get the 'value' of an element node, you must therefore concatenate the values of all children of type "XmlValue::TEXT_NODE", of that node. Try it.
    In your example, the <address> node has no child elements, my guess is that BDB XML stores the address string "176 Ganesan street, Janakinagar, alwarthirunagar" inside a child node of <address> node (of type XmlValue::TEXT_NODE) because you wrote the string on a separate line.

  • Not able to get the pagebutton bar bean object in the extended controller

    Hi All,
    I am not able to get the button bean object in my page. But, am not able to get the handle of buttonbar itself. any idea?
    Page Structure is:
    PageLayout - not having controller
    ----buttonbar
    ---button1
    ---submitbutton2
    ----regiion1(stack layout)-controller assigned(seededCO)
    I am extending the seededCO and I am trying to get the handle of button1 bean with the following code.
    OAPageButtonBarBean pbb=(OAPageButtonBarBean)webBean.findIndexedChildRecursive("buttonBar");
    if(pbb!=null)
    System.out.println("pbb"+pbb);
    bb= (OAButtonBean)pbb.findIndexedChildRecursive("button1");
    }

    Hi,
    Try like this,
    import oracle.apps.fnd.framework.webui.beans.nav.OAPageButtonBarBean;
    import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
    OAPageButtonBarBean pBar =
    (OAPageButtonBarBean)pageContext.getPageLayoutBean().getPageButtons();
    OAButtonBean ctButton =
    (OAButtonBean)pBar.findIndexedChildRecursive("YourRequiredButtonName");
    Thanks,
    With regards,
    Kali.
    OSSi.

Maybe you are looking for

  • DSL installati​on

    I received my DSL installation kit and followed the quick start guide....no internet.  I had a wireless system set up in my home that worked great (internet provided by local cable company); all I wanted to do was switch internet providers to save a

  • Best workflow for splitting up a long video into series of short videos

    I've got an hour worth of footage, a series of speakers, each who speak about 3 min. I want each speaker to be a separate video on youtube. What's the fastest workflow for doing this? Also, why does youtube export take so long in Final Cut Pro? It's

  • Flex 2 Charting Multidimensional ArrayCollection

    I am trying to bind an array collection in a line chart. Since I can have any number of series for a given situation, I actuallly have an array collection with a category variable and an imbedded array collection. What is the syntax in the yfield att

  • PalmPDF for Palm OS 4.x

    Is there something like this around? This is only for Palm OS 5.0 or greater... I know there is Adobe Reader for Palm, but the current version 3.05 that can be found when searching the web seems to be damaged (more info). 

  • Exception 1 When calling IWB_HTML_HELP_URL_GET occured

    Hi, Could any body help me to overcome from the below problem. While executing the queries with an end user id (ofcourse we have only one Enduser id presently) in Analyzer we are getting the error Exception 1 When calling IWB_HTML_HELP_URL_GET occure