Router not seeing the return value from a webservice

Hello. I have two input fields and a button that calls a web service, is an action that is passed to a router.
So it looks like this form-->execute web service-->router-->decision
I'm passing back a string of success or failure as follows:
@WebMethod
public String doLogin(String userName, String password)
if(userName.equals("1"))
return "failure";
return "success";
It executes the method fine, but the router doesn't see the return value correctly. It always evaluates to false (which is the default)
My text boxes and button is defined as follows:
<af:inputText value="#{bindings.arg0.inputValue}"
label="Username:"
required="#{bindings.arg0.hints.mandatory}"
columns="#{bindings.arg0.hints.displayWidth}"
maximumLength="#{bindings.arg0.hints.precision}"
shortDesc="#{bindings.arg0.hints.tooltip}">
<f:validator binding="#{bindings.arg0.validator}"/>
</af:inputText>
<af:inputText value="#{bindings.arg1.inputValue}"
label="Password:"
required="#{bindings.arg1.hints.mandatory}"
columns="#{bindings.arg1.hints.displayWidth}"
maximumLength="#{bindings.arg1.hints.precision}"
shortDesc="#{bindings.arg1.hints.tooltip}">
<f:validator binding="#{bindings.arg1.validator}"/>
</af:inputText>
<af:commandButton actionListener="#{bindings.doLogin.execute}"
text="doLogin"
disabled="#{!bindings.doLogin.enabled}"
action="doLogin"/>
</af:panelFormLayout>
My loginpagedef.xml is as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
version="11.1.1.51.88" id="loginPageDef"
Package="customerportal.pageDefs">
<parameters/>
<executables>
<variableIterator id="variables">
<variable Type="java.lang.String" Name="doLogin_Return"
IsQueriable="false" IsUpdateable="0"
DefaultValue="${bindings.doLogin.result}"/>
<variable Type="java.lang.String" Name="doLogin_arg0"
IsQueriable="false"/>
<variable Type="java.lang.String" Name="doLogin_arg1"
IsQueriable="false"/>
</variableIterator>
</executables>
<bindings>
<methodAction id="doLogin" RequiresUpdateModel="true" Action="invokeMethod"
MethodName="doLogin" IsViewObjectMethod="false"
DataControl="OracleWebServices"
InstanceName="OracleWebServices"
ReturnName="OracleWebServices.methodResults.doLogin_OracleWebServices_doLogin_result">
<NamedData NDName="arg0" NDValue="${bindings.doLogin_arg0}" NDType="java.lang.String"/>
<NamedData NDName="arg1" NDType="java.lang.String"
NDValue="${bindings.doLogin_arg1}"/>
</methodAction>
<attributeValues IterBinding="variables" id="arg0">
<AttrNames>
<Item Value="doLogin_arg0"/>
</AttrNames>
</attributeValues>
<attributeValues IterBinding="variables" id="arg1">
<AttrNames>
<Item Value="doLogin_arg1"/>
</AttrNames>
</attributeValues>
</bindings>
</pageDefinition>
What am I doing wrong? I can never seem to get the router to view the result coming back from the web service. Thanks in advance!

Hi,
Can you try this
<method-call id="DepartmentCheck">
<method>#{bindings.DepartmentCheck.execute}</method>
<return-value>#{pageFlowScope.checkResult}</return-value>
<outcome>
<fixed-outcome>result</fixed-outcome>
</outcome>
</method-call>
<router id="routerReturnCheck">
<case>
<expression>#{pageFlowScope.checkResult==true}</expression>
<outcome>succes</outcome>
</case>
<default-outcome>return</default-outcome>
</router>
just put the result of a method in pageFlowScope variable then the flow case go the router where you evaluate the variable
hope this helps

Similar Messages

  • 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.

  • How to Sort by the length of the returned value from a query.

    Hi,
    I was wondering if it is possible to sort by the length of the returned value from a query?
    For example if I want to get a list of people with the name 'Samuel', I would like to short by how short the length of the whole name is.
    Sort by length of the name in SQL
    Samuel Syda
    Samuel Indranaka
    Samuel Johnsons
    Samuel Longhenderson
    Thank you.

    Hi,
    Sorting is done by an ORDER BY clause at the end of the main query.
    In most cases, you can ORDER BY any expression, even f it is not in the SELECT clause.  In this case, it sounds like you just need:
    ORDER BY  LENGTH (name_column)
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Post your query, using an ORDER BY clause like the one above, and point out where that query is producing the wrong results, and explain, using specific examples, how you get the right results from the given data in those places.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • 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

  • I do not see the verification code from apple

    i do not see the verification code from apple when i go to my email.

    Check Junk and Spam mail folder.

  • Not getting the return value of a program though it has no  errors

    public static String giroReturnFileDate(String strType)throws IOException{
              try{
                   SimpleDateFormat getFormatDate = new SimpleDateFormat("yyMM");
                   Date date = new Date();
                   String str = getFormatDate.format(date);
                   System.out.println("Current Date is : "+ str);
                   System.out.println("Fetching the Giro file now");
                   if(strType.equalsIgnoreCase("WPD") || strType.equalsIgnoreCase("ISTD")) {
                   FileReader inputFileReader = new FileReader("giro2itcs_"+strType+".txt");
                   ArrayList list = new ArrayList();
                   ArrayList list1 = new ArrayList();
                   System.out.println("Reading the file");
                   BufferedReader inputStream = new BufferedReader(inputFileReader);
                   String inLine = null;
                   String str1 = null;
                   while((inLine = inputStream.readLine()) != null && inLine.length() < 2)
                        list.add(inLine);
                   System.out.println("Control Record for giro2itcs_"+strType+"is:"+ inLine);
                   inputFileReader.close();
                   inputStream.close();
                   for (int i=0; i<inLine.length(); i++ )
                        str1 = inLine.substring(19,23);
                   System.out.println("date of the transaction is:"+str1);
                   if (str .equals(str1)){
                        System.out.println("giro2itcs_"+strType+".txt file is created today");
                        return "true";
                   else{
                        System.out.println("giro2itcs_"+strType+".txt file is not created today");
                        return "false";
                   }// end of if
                   return "test";
              }// end of try
              catch(Exception e) {
              System.out.println("The Exception is ::::::::::::::"+e);
    return "one";
    }//end of giroReturnFileDate(...) method
    }//end of of the class
    main method is seperate. this program compiles fine but am not getting the return value for this. none of the return values. plzzz help me.

    can you send me the code complete one ...
    i will debug and solve the problem
    [email protected]
    By publishing your email address you are likely to get loads of spam.

  • Sales order should not copy the net value from contract

    Hi,
    When we are creating the sales order,Where we can maintain that sales order should not copy the net value from contract.
    Regards
    Prabudh

    Hi,
    When I am creating the sales order with reference to contract,it's copying the net value and quantity from the contract.
    But I want  that sales order should not copy the net value and quantity from the contract and user can take new required quantity at the time creating the sales order.
    Regards
    Prabudh

  • How to store the return value from a select list in page item ?

    I'm sorry, I'm sure you will all flame me for this (and its long too :-(. I'm still trying to pick this up and havn't had time to read manual and this forum and up against the clock (as usual), but this must be something thats simple to do, otherwise why have 2 cols on LOV (display text and return value.
    normal kind of thing - master /detail, a master table and a detail table, master.id is PK in master, master.name is the name of the master item. detail.id is pk in detail, detail.mid is foreign key to master.id. I have a tabular report that displays a join of cols from master and detail, with 2 cols being links, one is a link on master.name, that passes master.id to page P1 and it displays a row from master. The other col displays detail.name and passes detail.id to page P3, P3 displays a row of the detail table.
    I want to populate a LOV with possible master.name values, but display the name of the current P3_MID value (from detail.mid). Then a user can pick a different master and it needs to update P3_MID so on submit it updates the row.
    I just can't seem to see in the manual how you can specify where the return value on a LOV goes?
    As I said, sorry for long post and not having had time to read docs correctly - someone just point me at the subject matter somewhere, please.

    Sorry, I was trying to be to complex and obviously APEX is just too damn cleaver - I figured out how this works - basically APEX pulls the LOV and then matchs the mid to it to display the correct name - simple and easy - just me making it difficult

  • Problem with the return value from a tablemodel after filtering

    I have a form (consult that return a value) with a jtextfield and a jtable. when the user types in the textfield, the textfield call a method to filter the tablemodel.
    everything works fine, but after filtering the model, the references are lost and the return value does not match with the selected row.
    I read that convertColumnIndexToView, convertRowIndexToView, vertColumnIndexToModel and convertRowIndexToModel, solve the problem, but I used all and nothing.
    **** This is the code to fill the jtable
    DefaultTableModel modelo=(DefaultTableModel)this.jTable1.getModel();
    while(rs.next()){
    Object[] fila= new Object[2];
    fila[0]=rs.getObject("id_categoria");
    fila[1]=rs.getObject("nombre");
    modelo.addRow(fila);
    this.jTable1.getColumnModel().removeColumn(this.jTable1.getColumnModel().getColumn(0));
    // I delete the first column because is a ID, I dont want that the user see it. the value is only for me**** this is the method to filter from the jtextfield
    private void FiltrarJtable1() {
    TableRowSorter sorter = new TableRowSorter(this.jTable1.getModel());
    sorter.setRowFilter(RowFilter.regexFilter("^"+this.jTextField1.getText().toUpperCase(), 1));
    this.jTable1.setRowSorter(sorter);
    this.jTable1.convertRowIndexToModel(0);
    }*** this is the method that return the ID (id_categoria) from the tablemodel
    private void SeleccionarRegistro(){
    if(this.jTable1.getSelectedRow()>-1){
    String str_id =this.jTable1.getModel().getValueAt(this.jTable1.getSelectedRow(),0).toString();
    int_idtoreturn=Integer.parseInt(str_id);
    this.dispose();
    }else{
    JOptionPane.showMessageDialog(this,"there are no records selected","Warning!",1);
    }Who I can solve this problem?

    m_ilio wrote:
    I have a form (consult that return a value) with a jtextfield and a jtable. when the user types in the textfield, the textfield call a method to filter the tablemodel.
    everything works fine, but after filtering the model, the references are lost and the return value does not match with the selected row.
    I read that convertColumnIndexToView, convertRowIndexToView, vertColumnIndexToModel and convertRowIndexToModel, solve the problem, but I used all and nothing.
    You're right in that you have to use convertRowIndexToModel(), but you are using it wrong. That method takes as input the index of a row in the view, i.e. the table, and returns the corresponding row in the underlying TableModel. No data is changed by the call, so this:
    this.jTable1.convertRowIndexToModel(0);is meaningless by itself.
    What you need to do is the following:
    int selectedRow = this.jTable1.getSelectedRow(); // This is the selected row in the view
    if (selectedRow >= 0) {
        int modelRow = this.jTable1.convertRowIndexToModel(selectedRow); // This is the corresponding row in the model
        String str_id =this.jTable1.getModel().getValueAt(modelRow, 0).toString();
    }Hope this helps.

  • JTree ignores the return value from shouldYieldFocus

    I have a JTree component with my own custom DefaultTreeCellEditor which in turn uses my custom JTextField as an editor.
    I have attached the InputVerifier to the JFieldText and when user is editing node my code inside shouldYieldFocus method of InputVerifier that returns false if the node text does not match my criteria.
    I have noticed that when I click on any other JTree node (different then what I am editing now) the JTree removes my JTextField editor despite of the �false� value that I return from shouldYieldFocus.
    How can I force JTree to stay in editor until the text entered passes my validation criteria?
    Thanks in advance.
    JD

    store return value in tag class property and then use bean:setProperty, bean:getProperty.

  • 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.

  • Parsing the return value from a http request into a xml document?

    suppose a url "http;//abc.com/index.asp" that return a string like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <bbsend>
    <title>xml testing</title>
    - <record>
    <sender>111111</sender>
    <date>2004-01-05 04:11:44</date>
    <message>yes!</message>
    </record>
    - <record>
    <sender>22222222</sender>
    <date>2004-01-14 01:06:31</date>
    <message>A</message>
    </record>
    </bbsend>
    how can i parsing this return value into a xml document???
    i try something like this:
    URL url = new URL("http://abc.com/index.asp");
    HttpURLConnection http = (HttpURLConnection)url.openConnection();
    DataInputStream in = new DataInputStream(http.getInputStream());               
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse(in);
    System.out.println(document.getNodeValue());
    But fail , can anyone help

    do u mean get the xml content??
    i am doing a project with BBSend
    [email protected]

  • 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

  • Is there are a size limit for the returned value from substr?

    It is seems to be limited to 4000.
    But working with clob it is not enough.
    Does someone have a quick workarround?
    Thanks!

    It is seems to be limited to 4000.use plsql:
    michaels>  DECLARE
       c   CLOB := RPAD ('x', 32767, 'x') || RPAD ('x', 32767, 'x');
    BEGIN
       DBMS_OUTPUT.put_line ('Length clob: ' || LENGTH (c));
       DBMS_OUTPUT.put_line ('Length substring clob: ' || LENGTH (SUBSTR (c, 1, 50000)));
    END;
    Length clob: 65534
    Length substring clob: 50000

Maybe you are looking for

  • ExtendScript: Get all text from a document

    Hi all. I have the following task: I need to translate a document into another language using ExtendScript. So, as "input" I have a document with a text/graphics/tables/etc. in Language_1 and a "somehow-separated file", which will contain data about

  • Message IDs in BPM

    Hi, Following are the steps in BPM 1. XI receives the Delivery IDOC from SAP ( converts to XML ) - Creates XI MSG ID 1 2. XI Sends the XML to other system using Web Service - Creates XI MSG ID 2 I'm writing a FM which will have IDOC# as the input and

  • Adobe Photoshop Elements 12 will not open.  Mac

    It bounces on Dock for a bit.  It was working.  Mac 10.9

  • Health Care Adapter Installation Error - SQLException: ORA-00439

    Hello, While attempting to install the SOA Health Care in Windows development environment against an XE database the below error was seen. Any thoughts? Oracle_SOA1\bin>ant -f ant-soahc-postinstall.xml replaceSqlScript:       [sql] Executing resource

  • If GR based IV checked for items without excise duty, MIRO posting hanging.

    Iam working in a client location, one of client business scenario is MIRO posting without excise (Only VAT or CST). for this case i have not maintained vendor excise details in J1ID. When a MIRO with reference to PO for an item ticked for "GR based I