Developers  Help me on  return  type

Can we have two returns in a single method. Also can we have any executable statement after return.
Thanks in advance.Clearing the doubt is graetly appreciated

hi,
can you explain your problem clearly ?
If you want to return many things (objects) in a single method, you can put them in a structure like a vector the return the vector. But if your return type is single and depends on a condition your code could be like that :
if(condition == true)
return object_1;
else
return object_2;
hth,

Similar Messages

  • Problem when calling a return type BOOLEAN SQL Function in a package

    Hi All,
    I am having problem when trying to call a SQL function in a package with return type BOOLEAN
    The SQL function signature is as follows
    CREATE OR REPLACE PACKAGE RMSOWNER.ORDER_ATTRIB_SQL ****
    FUNCTION GET_PO_TYPE_DESC(O_error_message IN OUT VARCHAR2,
    I_PO_TYPE       IN     VARCHAR2,
    O_PO_TYPE_DESC  IN OUT VARCHAR2)
    RETURN BOOLEAN;
    Following is my java code
    +CallableStatement cs3 = conn.prepareCall("{?=call ORDER_ATTRIB_SQL.GET_PO_TYPE_DESC(?,?,?)}");+
    +cs3.registerOutParameter(1, java.sql.Types.BOOLEAN);+
    +cs3.registerOutParameter(2, java.sql.Types.VARCHAR);+
    +cs3.registerOutParameter(4, java.sql.Types.VARCHAR);+
    +cs3.setString(2, "");+
    +cs3.setString(3, "ST");+
    +cs3.setString(4, "");+
    +ResultSet rs3 = cs3.executeQuery();+
    I get the following exception, i tried changing the sql type(registerOutParameter) from boolean to bit but i still getting this exception.
    But when i call any other functions with return type other than boolean they work perfectly fine.
    Please can anyone help me fix this issue, i am not sure if its anything to do with vendor JDBC classes?
    +java.sql.SQLException: ORA-06550: line 1, column 13:+
    +PLS-00382: expression is of wrong type+
    +ORA-06550: line 1, column 7:+
    +PL/SQL: Statement ignored+
    +     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)+
    +     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)+
    +     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)+
    +     at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)+
    +     at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215)+
    +     at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:954)+
    +     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)+
    +     at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)+
    +     at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3422)+
    +     at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4394)+
    #####

    Hello People!
    There is another workaround!!
    See the example below:
    private String callBooleanAPi(String tableName,String apikey,String dtInicio,String dtFim,String comando) throws SQLException {
                   CallableStatement cs = null;
                   String call = "";
                   String retorno = null;
                   try {
                        if(comando.equalsIgnoreCase("INSERT")){
                             call = "declare x BOOLEAN; y varchar2(2);begin x :=PKG.INSERT(?,?,?,?,?); if x then y := 'S'; else y :='N'; end if; ? := y;end;";
                        } else if(comando.equalsIgnoreCase("UPDATE")){
                             call = "declare x BOOLEAN; y varchar2(2);begin x := PKG.UPDATE(?,?,?,?,?); if x then y := 'S'; else y :='N'; end if; ? := y;end;";
                        } else if(comando.equalsIgnoreCase("DELETE")){
                             call = "declare x BOOLEAN; y varchar2(2);begin x := PKG.DELETE(?,?,?,?,?); if x then y := 'S'; else y :='N'; end if; ? := y;end;";
                        cs = conn.prepareCall(call);
                        SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
                        SimpleDateFormat sdfToSqlDate = new SimpleDateFormat("yyyy-MM-dd");
                        java.util.Date dataInicialVigencia =null;
                        java.util.Date dataFinalVigencia = null;
                        Date dtInicialFormatada =null;
                        Date dtFinalFormatada = null;
                        if(dtInicio != null && !dtInicio.equals("")){
                             dataInicialVigencia = sdf.parse(dtInicio);
                             dtInicio =sdfToSqlDate.format(dataInicialVigencia);
                             dtInicialFormatada = Date.valueOf(dtInicio);
                        if(dtFim != null && !dtFim.equals("")){
                             dataFinalVigencia = sdf.parse(dtFim);
                             dtFim =sdfToSqlDate.format(dataFinalVigencia);
                             dtFinalFormatada = Date.valueOf(dtFim);
                        cs.setString(1, tableName);
    cs.setString(2, apikey);
    cs.setDate(3, dtInicialFormatada );
    cs.setDate(4, dtFinalFormatada );
    cs.registerOutParameter(5, java.sql.Types.VARCHAR);
    cs.registerOutParameter(6, java.sql.Types.VARCHAR );
    cs.execute();
                        retorno = cs.getString(6);
                        System.out.println( cs.getString(5));
                   } catch(SQLException e){
                   throw new SQLException("An SQL error ocurred while calling the API COR_VIGENCIA: " + e);
                   } catch(Exception e){
                   Debug.logger.error( "Error calculating order: " + id, e );
                   } finally {
                   if (cs != null) {
                   cs.close();
                   cs = null;
                   return retorno;
    As you can see the CallableStatement class acepts PL/SQl blocks.
    Best Regards.

  • Should Collections be used as return types across threads?

    I am wondering when, if ever, it is appropriate to use a Collection as the return type of a method in a multi-threaded environment. Here is our situation:
    We have four classes -- Widget, WidgetManager, ClientA, and ClientB. ClientA and ClientB are running in different Threads from each other and from the WidgetManager.
    The WidgetManager class that uses a Collection of Widgets internally, and passes the Collection (or an Iterator over it) out as a return value of a method to ClientA, which is running in another thread. ClientA would start to go through it using next() and hasNext() of the Iterator. If the WidgetManager were to get a request from ClientB running in another thread to eliminate a Widget, it would attempt to remove it from the Collection. If ClientA were still looping through the Iterator, this would throw an IllegalStateException b/c the system would be in an inconsistent state. The Iterator given to the ClientA is directly linked to the actual Collection in the WidgetManager (am I right so far?).
    In my opinion, in most cases we don't want to synchronize Collections. In the example above, if we had passed out a synchronized Collection, then the WidgetManager couldn't touch the collection while the client was looping through the Iterator. If the client got hung up while looping, then the WidgetManager would be hung up. In this case, I think that it will be better to use the toArray() method of Collection to just dump out the contents to a plain array of Objects. Actually, the WidgetManager could convert this array of Objects to an array of Widgets before passing it out, which would give us the type checking that we don't get with Containers.
    The condition where you would want to use a synchronized Collection would be when you actually want the client to do some writing or removing from the Collection. I would expect this to be pretty rare since you usually dont want to give clients access to an interal member (the Collection) of a class.
    I think that it is also possible to have read-only Collections, but I think (don't know for sure) that you would still have the same IllegalStateException or synchronization probelms.
    Can someone point out the errors in my thinking? Or should you generally only use Collections as internal members in a multi-threaded environment, and use toArray() whenever you want to pass the Collection's data outside of the class?
    Thanks for any help.
    Keith

    I haven't tested what happens when you synchronize the
    Collection, but I think that you are right. But this
    causes the problem that I mentioned in the first post.
    That is, what happens if your client STARTS running
    through the Iterator, and then stops or gets hung up
    for some reason? I assume that you're still blocked.
    And it's pretty important to me in this case to not
    t be blocked -- WidgetManager is the highest level
    class in the system.
    I'd like to know if anyone has tested this.
    The Iterator implementations used in java.util do not use any synchronization by itself, (which is what you would expect since synchronization over multiple method call will involve much more complications and slower performance) . With iterator, you have to provide the necessary synchronization yourself to maintain thread-safety like this
    Iterator itr = get Iterator from collectionInstance ;
    synchronized(collectionInstance) {
    while(itr.hasNext())
    process itr.next() ...
    As long as your client code gracefully exits the synchronized block on a stop( or hangup, given that it is detected and handled fast enough), it will not be a problem.
    Also, I'd like an example of when you WOULD want to
    return a Collection. I'm specifically interested in
    when you would want to return one in a multi-threaded
    environment, but I'm beginning to wonder when you
    would EVER want to return one from a method.
    Collections are great for internal uses, but you lose
    type-checking and you expose the internals of your
    class to modification when you use them as return
    types. And if you're returning a read-only
    Collection, you might as well return an array, right?Using a read-only proxy will be much faster and space-efficient than toArray().

  • The class of the deferred-methods return type "{0}" can not be found.

    I am developing a multilingual portal application.
    I have the method that changes the locale based on user's choice in the bean and the method is being referred to as below.
    <af:selectOneChoice label="Select Language" autoSubmit="true"
    value="#{localeBean.locale}"
    valueChangeListener="localeBean.changeLocale">
    <af:selectItem label="English" value="en" id="si1"/>
    <af:selectItem label="French" value="fr" id="si2"/>
    <af:selectItem label="Dutch" value="nl" id="si3"/>
    </af:selectOneChoice>
    when i try to run the application, i am getting compile time errors as below,
    The class of the deferred-methods return type "{0}" can not be found.
    No property editor found for the bean "javax.el.MethodExpression".
    After going through the discussion forums i learned that the compilation errors can be resolved by setting the <jsp:directive.page deferredSyntaxAllowedAsLiteral="false> at the starting of the page.
    Even after that i am getting the compilation error.
    Any solutions, suggestions or possible approaches would be helpful as i am new to Webcenter Portal development.
    Thanks,

    The error you get points to a problem on the page (somewhere). Switch to source mode and check the right margin if you see orange or red marks. These are pointing to problems (not all are show stoppers, but they give you hints that something is not according to the standard for jsf, jsff, jsp or jspx pages.
    Have you checked that the bean is correctly defined and that it's reachable?
    Start a fresh page and isolate the problem, e.g. build a selectOneChoiuce on the new page (don't copy it as you might copy the error too) and make it work on the new page. Once you have it running you can compare the solution to your not running page.
    Timo

  • Non-void return type for Application Module Clients Interface

    Hello, can anyone guide me on how will I solve my problem.
    first of all, I'm using JDeveloper 10.1.3, I use JSF, ADF Faces, ADF Model, ADF Business Components.
    I made a web page that has a Transactional Capabilities, all is going smoothly, all data's can be saved to oracle database. I created a Custom Method in my Application Module and can be used in Clients Interface, that method is for saving data's to database.
    My problem is I dont know how to create a custom method that returns a value in my Application Module. Which means if I set it to non-void return type, it is not visible to Client Interface. If you're going to ask me why I need it to return a value? Well since that method is for saving data's, if there's an Error Occured, I can return the Error Message and show it to my user interface.
    Please help. thanks

    If you want to return your own type then simply define it as serializable and you will find that it will appear in the Client Interface dialog of your AM.
    eg, you could return this type from your application module to progagate a meaningful message to your UI:
    package com.delexian.model;
    import java.io.Serializable;
    public class MyMessage implements Serializable {
        private String _severity;
        private String _message;
        public MyMessage() {
        public void setSeverity(String severity) {
            this._severity = severity;
        public String getSeverity() {
            return _severity;
        public void setMessage(String message) {
            this._message = message;
        public String getMessage() {
            return _message;
    }regards,
    Brenden

  • A constructor cannot specify a return type.

    I have a shuffleList.as file with this code...
    package {
    import flash.display.MovieClip;
    public class shuffleList extends MovieClip{
    function shuffleList(arr:Array):Array{
    var shuffled:Array = arr.slice();
    for (var i:int=0; i<arr.length; i++) {
    var element:Object = shuffled
    var rnd:int = Math.floor(arr.length * Math.random());
    shuffled = shuffled[rnd];
    shuffled[rnd] = element;
    return shuffled;
    In the first frame i put this code...
    import shuffleList
    var numA:Array = [0,1,2,3,4,5,6,7,8,9,10]
    var numB:Array = shuffleList(numB);
    var myText:String = numB.pop()
    fieldA.text = myText
    With this code I want to put in random order the numbers from
    0 to 10 in the fieldA.
    When run this file the compiler report this error: "A
    constructor cannot specify a return type."
    Where I'm wrong;
    I'm new in actionscript..
    Please help...

    Hey Petros,
    I had a similar problem and the response I got was:
    1) the constructor is used to set up the class but it doesn't
    really exist until it is instantiated and therefore cannot include
    any 'interaction' including a return.
    2) Therefore, you might try replacing
    function.shuffleList ... with
    function.shuffleList() { // to enable instantiation
    public function doit(arr:Array):Array { // to enable
    interaction
    The rest of the code follows this then the call in the first
    frame replaces
    var numB:Array ... with
    new shuffleList(); // instantiate the class
    var numB:Array = shuffleList.doit(numB) // interact with the
    class
    Let me know how it goes...Daniel

  • Function with return type boolean

    I have created a function with return type boolean as:
    CREATE OR REPLACE FUNCTION fn RETURN BOOLEAN
    AS
    exp EXCEPTION;
    BEGIN
    return TRUE;
    EXCEPTION
    when OTHERS then RAISE exp;
    END;
    FUNCTION fn compiledThen I was trying to call this function into dbms_output.put_line procedure, I got this error:
    EXECUTE DBMS_OUTPUT.PUT_LINE(fn);
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'Can someone please help me understand, why this happened?
    Is this because of boolean return type?

    952040 wrote:
    I have created a function with return type boolean as:
    Then I was trying to call this function into dbms_output.put_line procedure, I got this error:
    EXECUTE DBMS_OUTPUT.PUT_LINE(fn);
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
    What is the parameter signature for DBMS_OUTPUT.put_line() ?
    Is is string - as detailed in Oracle® Database PL/SQL Packages and Types Reference guide.
    So how can you pass a boolean data type as parameter value, when the parameter's data type is string?
    PL/SQL supports implicit data conversion. So you can for example pass a number or date value to DBMS_OUTPUT.put_line() - and the PL/SQL engine automatically (and implicitly) converts that (using the TO_CHAR() functions) to a string.
    However, the TO_CHAR() parameter signature supports number and date - not boolean. It cannot convert a boolean value into a string.
    So passing a boolean value means the implicit conversion fails - and results in the above error.
    To make it work, you need to perform an explicit conversion. As as a data type conversion function from boolean to string is not available, you need to write a user defined function. E.g.
    SQL> create or replace function BoolToChar( b boolean ) return varchar2 is
      2  begin
      3    case
      4       when b then return( 'TRUE' );
      5       when not b then return( 'FALSE' );
      6    else
      7      return( null );
      8    end case;
      9  end;
    10  /
    Function created.
    SQL>
    SQL> exec DBMS_OUTPUT.put_line( 'Flag is '||BoolToChar(true) );
    Flag is TRUE
    PL/SQL procedure successfully completed

  • Return type Boolean From Oracle Function

    1. How do I get a return type of Boolean from Oracle function in Java?
    2. I have a function fx overloaded in Oracle (8 variances) and I have trouble getting the right one in Java. Is 8 too high a figure or Java does not support calling overloaded functions or what?
    Thanks for any help.

    I am facing a similar situation, where I have defined an overloaded function in one package (2 variants) which both return a type BOOLAN value.
    I am having trouble to setting up an CallableStatemnt to call one of this functions from Java. Whenever I set the parameter with a BIT or NUMBER data type, I get an exception with java.lang.boolean during my
    callablestatement.setobject( indez, parameter, OracleTypes.BIT );
    or
    callablestatement.setobject( indez, parameter, OracleTypes.NUMBER );
    I have no problem calling the function from SQLPlus, but doing so from Java raises the exception. I have found no exact match in OracleTypes or java.sql.Types for a BOOLEAN data type.
    In your response do you mean to modify the Function to return a NUMBER instead of a BOOLEAN, or do you mean to set the parameter as Types.NUMBER in the calling java code?
    Thanks,
    Fedro

  • How to know return type in Web service

    {color:#0000ff}I am writing a web service client application. After invoking the service it gets the result as SOAP massage. But i need to know the return type also. How can i do that?
    {color}
    here is the response obtained from web service after invoking a subtract method, it is giving correct value but doesn't give tye of value.
    <ns:SubtractResponse xmlns:ns="http://example.ws"><ns:return>81</ns:return></ns:SubtractResponse>

    View WSDL(Web Service Description Language) file of the web service. Normally WSDL file of any web service can be referenced by appending "wsdl" at the end of web service URL. e.g. http://www.abs.com/mywebservice/invokewebservice?wsdl
    Shazzad wrote:
    After invoking the service it gets the result as SOAP massage. But i need to know the return type also. How can i do that?WSDL file for a web service contains all information regarding the web service like types, message, portType, binding, service etc. Types section have schema definitions of all messages which are being used in web service. here you can find everything about all elements, fields for all the messages in the WebService including type of the values.
    You can find more about WSDL on Sun and Google very easily.
    Hope this will help.
    Thanks,
    Tejas

  • OracleDbType for function OBJECT return type

    Hi all,
    I inherited an oracle function that has an object as a return type:
    create or replace TYPE OBJECTPATH IS OBJECT (OBJECTID NUMBER);
    create or replace TYPE OBJECTPATH_TAB AS TABLE OF OBJECTPATH;
    create or replace FUNCTION GETOBJECTINPATH ( pobjectid in NUMBER, role1 varchar2, role2 varchar2 ) RETURN OBJECTPATH_TAB
    IS
    v_tmp_tab OBJECTPATH_TAB:=OBJECTPATH_TAB();
    parentid NUMBER;
    rowno INTEGER;
    BEGIN
    rowno:=0;
    parentid:=pobjectid;
    loop
    select objectid into parentid from dual left join (select ro2.objectid from relationshipobject ro1, relationshipobject ro2
    where ro1.role=role1 and ro2.role=role2 and ro1.relationshipid=ro2.relationshipid and ro1.objectid=parentid)
    on 1=1;
    if parentid is null then
    exit;
    end if;
    v_tmp_tab.extend;
    rowno:=rowno1;+
    v_tmp_tab(rowno) := OBJECTPATH(parentid);
    end loop;
    RETURN v_tmp_tab;
    END;
    On my application side, I am trying to run this function and retrieve the return value with ODP.NET as below. However, I am stumped when I need to supply an OracleDbType for the function return type.
    1. What is the OracleDbType I should use for the return type? I read that there used to be support for OracleDbType.Object, but it seems like it is now not supported. I am using ODP.NET 11g. Am I getting the situation correct?
    2. If retrieving an object return type is not as straightforward as setting the parameters (as what I have done below), what is the workaround to achieve it?
    OracleCommand runGetPObjectInPathCmd = new OracleCommand("GETOBJECTINPATH", conn);
    runGetPObjectInPathCmd.CommandType = CommandType.StoredProcedure;
    runGetPObjectInPathCmd.Parameters.Add(new OracleParameter("pobjectid", OracleDbType.Decimal)).Value = pobjectId;
    runGetPObjectInPathCmd.Parameters["pobjectid"].Direction = ParameterDirection.Input;
    runGetPObjectInPathCmd.Parameters.Add(new OracleParameter("role1", OracleDbType.Varchar2, 255)).Value = role1;
    runGetPObjectInPathCmd.Parameters["role1"].Direction = ParameterDirection.Input;
    runGetPObjectInPathCmd.Parameters.Add(new OracleParameter("role2", OracleDbType.Varchar2, 255)).Value = role2;
    runGetPObjectInPathCmd.Parameters["role2"].Direction = ParameterDirection.Input;
    runGetPObjectInPathCmd.Parameters.Add("OBJECTPATH_TAB", OracleDbType.Decimal); // this is not correct as the return type is not a NUMBER
    runGetPObjectInPathCmd.Parameters["OBJECTPATH_TAB"].Direction = ParameterDirection.ReturnValue;
    runGetPObjectInPathCmd.ExecuteNonQuery();
    Thanks in advance for any help and would greatly appreciate it.

    Hi Greg,
    Thanks for your reply. I am not exactly sure whether I am using 11.1.0.6.21. The Oracle.DataAccess.dll I see under my \ODP.NET\bin\2.x directory is of Assembly/Product Version 2.111.6.0 - is this version 11.1.0.6.21? I also do not have the samples directory. Am I working on a wrong version? Thanks for your patience as I am really new to this and appreciate your guidance.

  • EJB3 Creating Web Services with Complex Return Types

    Hi
    Not sure if this is the right place, but hoping someone can help!
    I have an entity bean that has a collection (list<Address>) of sub-entities. I have then created a session bean to retrieve the Business and populate it's children.
    I then expose this as a web service and although it works and I get appropriate XML out, the WSDL of the deployed service is not as I would like.
    For example:
    The return type is
    <complextype name="Business">
    <sequence>
    <element name="id" type="int"/>
    <element name="addresses" type="ns1:list"/>
    </sequence>
    </complextype>
    <complextype name="Address">
    <sequence>
    <element name="id" type="int"/>
    <element name="addresses1" type="string"/>
    <element name="addresses2" type="string"/>
    <element name="addresses3" type="string"/>
    </sequence>
    </complextype>
    ns1:list is included as a separate schema as a complex extension of the base "collection"
    So, even though the Address type is there it is not referenced from Business.
    So, when I'm calling the Web Service from BPEL or ESB, I have not got the ability to map adequately back from the response.
    I have tried a whole bunch of ways of getting this to work, but so far to no avail...
    Has anyone seen this before, or can I somehow override the mapping from the Entity to the WSDL?
    Any help would be most appreciated.
    Thanks
    Chris

    Thanks. We are using a Java Proxy to consume the web service as we need to use JAX-WS handlers. We created data control from the service stub that was created by the proxy. Our issue is with the response XML which comes as a complex type. Also, the data control is understanding the complex type and is creating the structure right. The problem is when we drag that control on a JSF page. No data is displayed. We think that we are not traversing the complex object properly which is creating the issue.
    I understand that you answer related to the input is applicable to output as well. We can change the structure by flattening it but we thought that in 11G there is some new features where we can use the complex types out of the box without any change. Is that true? Also, any luck in finding the documents (broken links) on your blog page?

  • Copy activity fails while copying/reading sql object return type

    Hi,
    Please help me by providing some information for the following issue
    i am executing a db adapter in BPEL service ,i am calling a stored procedure it returns a object type . i can see the outputparameters retrun values in the audit(BPEL console) but i am unable to copy the object return type using assign copy operation.
    it shows parser error.Please find below mentioned error information.
    fault message:
    ULNAPP_JW_100_02_OutputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    -<db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/DEVJ2EE/ULNAPP_JW_100_02/EDIT/">
    -<IV_EDI_REC_T>
    <EDI_EDIT>CNLNCE_APP_EDIT_00
    </EDI_EDIT>
    <EDI_SUPER_PRODUCT_TYPE_CD>CN
    </EDI_SUPER_PRODUCT_TYPE_CD>
    <EDI_PRODUCT_TYPE_CD>LN
    </EDI_PRODUCT_TYPE_CD>
    <EDI_FUNDING_TYPE_CD>CE
    </EDI_FUNDING_TYPE_CD>
    <EDI_PTC_COMPANY>ALL
    </EDI_PTC_COMPANY>
    <EDI_PCB_BRANCH>ALL
    </EDI_PCB_BRANCH>
    <EDI_STATE_CD>ALL
    </EDI_STATE_CD>
    <EDI_PRD_PRODUCT>ALL
    </EDI_PRD_PRODUCT>
    <EDI_EDIT_TYPE_CD>ORG-ENTRY
    </EDI_EDIT_TYPE_CD>
    <EDI_ENABLED_IND>Y
    </EDI_ENABLED_IND>
    <CREATED_BY>SETUP
    </CREATED_BY>
    <CREATION_DATE>2008-01-30T17:02:35.000+05:30
    </CREATION_DATE>
    <LAST_UPDATED_BY>SETUP
    </LAST_UPDATED_BY>
    <LAST_UPDATE_DATE>2008-01-30T17:02:35.000+05:30
    </LAST_UPDATE_DATE>
    <EDI_RESULT_CD>ERROR
    </EDI_RESULT_CD>
    <EDI_OVR_RESPONSIBILITY_CD>UNDEFINED
    </EDI_OVR_RESPONSIBILITY_CD>
    <EDI_ERE_ID>102688
    </EDI_ERE_ID>
    </IV_EDI_REC_T>
    <IV_RESULT>0
    </IV_RESULT>
    <IV_ERR_DESC xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
    </db:OutputParameters>
    </part>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]
    </part>
    </ULNAPP_JW_100_02_OutputVariable>
    </messages>
    Assign_1
    [2008/04/10 20:01:50] Updated variable "TMP_Output"More...
    -<TMP_Output>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    -<OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/DEVJ2EE/ULNAPP_JW_100_02/EDIT/">
    -<IV_EDI_REC_T xmlns="">
    <EDI_EDIT>CNLNCE_APP_EDIT_00
    </EDI_EDIT>
    <EDI_SUPER_PRODUCT_TYPE_CD>CN
    </EDI_SUPER_PRODUCT_TYPE_CD>
    <EDI_PRODUCT_TYPE_CD>LN
    </EDI_PRODUCT_TYPE_CD>
    <EDI_FUNDING_TYPE_CD>CE
    </EDI_FUNDING_TYPE_CD>
    <EDI_PTC_COMPANY>ALL
    </EDI_PTC_COMPANY>
    <EDI_PCB_BRANCH>ALL
    </EDI_PCB_BRANCH>
    <EDI_STATE_CD>ALL
    </EDI_STATE_CD>
    <EDI_PRD_PRODUCT>ALL
    </EDI_PRD_PRODUCT>
    <EDI_EDIT_TYPE_CD>ORG-ENTRY
    </EDI_EDIT_TYPE_CD>
    <EDI_ENABLED_IND>Y
    </EDI_ENABLED_IND>
    <CREATED_BY>SETUP
    </CREATED_BY>
    <CREATION_DATE>2008-01-30T17:02:35.000+05:30
    </CREATION_DATE>
    <LAST_UPDATED_BY>SETUP
    </LAST_UPDATED_BY>
    <LAST_UPDATE_DATE>2008-01-30T17:02:35.000+05:30
    </LAST_UPDATE_DATE>
    <EDI_RESULT_CD>ERROR
    </EDI_RESULT_CD>
    <EDI_OVR_RESPONSIBILITY_CD>UNDEFINED
    </EDI_OVR_RESPONSIBILITY_CD>
    <EDI_ERE_ID>102688
    </EDI_ERE_ID>
    </IV_EDI_REC_T>
    <IV_RESULT xmlns="">0
    </IV_RESULT>
    <IV_ERR_DESC xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns=""/>
    </OutputParameters>
    </part>
    </TMP_Output>
    </sequence>
    </flow>
    <switch>
    Assign_Output (faulted)
    [2008/04/10 20:01:50] Error in evaluate <from> expression at line "399". The result is empty for the XPath expression : "/ns9:OutputParameters/ns9:IV_RESULT". More...
    oracle.xml.parser.v2.XMLElement@d2838
    [2008/04/10 20:01:50] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
    -<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    -<part name="summary">
    <summary>
    empty variable/expression result.
    xpath variable/expression expression "/ns9:OutputParameters/ns9:IV_RESULT" is empty at line 399, when attempting reading/copying it.
    Please make sure the variable/expression result "/ns9:OutputParameters/ns9:IV_RESULT" is not empty.
    </summary>
    </part>
    </selectionFailure
    Thanks in advance,

    I'm having a similar problem where I'm unable to copy data from a single element from a response from a stored procedure (through an ESB service). If I copy the entire response xml to another variable it works fine however.
    Working code:
    <variable name="VariableOut" messageType="ns10:OutputParameters_reply"/>
    <assign name="assignStatusCode">
    <copy>
    <from variable="VariableOut" part="OutputParameters" query="/ns11:OutputParameters/ns11:EnclosureOutput/ns11:P_STATUS_CODE"/>
    <to variable="statusCodeFromEnclosures"/>
    </copy>
    </assign>
    results in:
    Updated variable "VariableOut"
    <invokeAPPS_DB_Enclosures_Out_execute_OutputVariable>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
    <OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/DOC_INT/DOC_INV_ENCLOSURE_PKG/SEND_ENCLOSURES/">
    <P_ENCLOSURES xsi:nil="true"/>
    <P_STATUS_CODE>1</P_STATUS_CODE>
    <P_STATUS_TEXT>My text</P_STATUS_TEXT>
    </OutputParameters>
    </part>
    </invokeAPPS_DB_Enclosures_Out_execute_OutputVariable>
    Not working code:
    <variable name="statusCodeFromEnclosures" type="xsd:unsignedInt"/>
    <assign name="assignStatusCode">
    <copy>
    <from variable="VariableOut" part="OutputParameters" query="/ns11:OutputParameters/ns11:EnclosureOutput/ns11:P_STATUS_CODE"/>
    <to variable="statusCodeFromEnclosures"/>
    </copy>
    </assign>
    results in:
    Error in evaluate <from> expression at line "195". The result is empty for the XPath expression : "/ns11:OutputParameters/ns11:EnclosureOutput/ns11:P_STATUS_CODE".
    oracle.xml.parser.v2.XMLElement@14d4901

  • Webservice return type

    Dear All,
    I have a web service with return type as array.
    I need to return dynamic array.Is there any alternate way to this.
    Could anyone help me regarding this.
    Thanks & Regards
    sara

    On xMII XML format via the WebService (WSDLGen) mechanism, but you can return any xMII XML format via the Runner mechanism.
    URL is something like: /Lighthammer/Runner?Transaction=YourTransaction&OutputParameter=DesiredXMLOutputParameter
    There are more complex techniques that can be used to have xMII emulate any webservice with any inputs and outputs, but those involve creation of custom WSDL files and are probably a bit lengthy for an SDN post.
    - Rick
    Message was edited by:
            Rick Bullotta

  • Configure return type: There was an error while invoking the operation

    This error only occurs when I pass parameters to Configure return type dialog
    As a follow on from http://forums.adobe.com/message/2663481
    I am getting this in the log.
    !ENTRY com.adobe.flexbuilder.DCDService 4 1 2010-06-15 11:45:29.323
    !MESSAGE Please specify a valid <services/> file path in flex-config.xml.
    !STACK 0
    flex.messaging.config.ConfigurationException: Please specify a valid <services/> file path in flex-config.xml.
        at flex.messaging.config.LocalFileResolver.getConfigurationFile(LocalFileResolver.java:79)
        at flex.messaging.config.AbstractConfigurationParser.parse(AbstractConfigurationParser.java: 67)
        at flex.messaging.config.ServicesDependencies.getClientConfiguration(ServicesDependencies.ja va:150)
        at com.adobe.flexbuilder.dcrad.utils.DCRADUtility.getServiceSettingsOnServer(DCRADUtility.ja va:1398)
        at com.adobe.flexbuilder.dcrad.utils.DCRADUtility.getServerConfiguration(DCRADUtility.java:1 374)
        at com.adobe.flexbuilder.dcrad.views.ServiceExplorerView.refreshService(ServiceExplorerView. java:1703)
        at com.adobe.flexbuilder.dcrad.views.ServiceExplorerView.refreshSelectedServices(ServiceExpl orerView.java:1650)
        at com.adobe.flexbuilder.dcrad.views.internal.actions.ServiceRefreshAction.run(ServiceRefres hAction.java:41)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionI tem.java:584)
        at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
        at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java :452)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at com.adobe.flexbuilder.standalone.FlexBuilderApplication.start(FlexBuilderApplication.java :109)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    One problem I keep getting is that FB keeps setting this setting as J2EE Server even when I tell it is standalone. When I add a server an tell FB that it is Remote, does that mean its J2ee?

    Hi,
    This is definitely a Bug. I would have filed it but it would be better if we have the exact steps to reproduce the issue. I am aware that you might not be able to share all your source. But a scaled down example would really be helpful. Please  do log this bug at
    http://bugs.adobe.com/flex/
    Nishad
    Flash Builder Team

  • Updating MARC not happening eventhough return type 'S'

    Hi Experts,
    i am updating MARA , MARC  through BAPI_MATERIAL_SAVEDATA ,  i am getting RETURN-TYPE = 'S'  and MARA is updating but MARC is not updating
    PLANTDATA -PLANT = 2013
    PLANTDATAX -PLANT = 2013
    PLANTDATAX-COUNTRYORI = 'US'
    PLANTDATAX-COUNTRYORI = 'X'
    but values are not updating ...  is there any mandatory thing i am missing while updating ..
    please help me out
    Thanks,
    Shrikanth

    Hello SHRIKANTH R  ,
                            Here is the model code for populating the MARC entry tabel fields:
    Check this link too:
    http://blog.esnai.com/arrow/archive/2007/08/30/208744.aspx
    CLEAR bapi_marc.
    bapi_marc-plant       = i_tvkwz-werks.
    bapi_marc-pur_group   = c_ekgrp.
    bapi_marc-mrp_type    = u2018NDu2019.
    bapi_marc-period_ind  = u2018Mu2019.
    bapi_marc-lotsizekey  = u2018EXu2019.
    bapi_marc-proc_type   = u2018Fu2019.
    bapi_marc-spproctype  = c_sobsl.
    bapi_marc-availcheck  = u201802u2032.
    bapi_marc-profit_ctr  = c_prctr.
    bapi_marc-sloc_exprc  = c_lgort.
    IF i_tvkwz-werks = u20188300u2032.
       bapi_marc-mrp_ctrler  = u201813u2032.
       bapi_marc-mrp_group   = u201813u2032.
    ELSEIF i_tvkwz-werks = u20188400u2032.
       bapi_marc-mrp_ctrler  = u201814u2032.
       bapi_marc-mrp_group   = u201814u2032.
    ELSEIF i_tvkwz-werks = u20188500u2032.
       bapi_marc-mrp_ctrler  = u201815u2032.
       bapi_marc-mrp_group   = u201815u2032.
    ELSEIF i_tvkwz-werks = u20188600u2032.
       bapi_marc-mrp_ctrler  = u201816u2032.
       bapi_marc-mrp_group   = u201816u2032.
    ELSE.
       bapi_marc-mrp_ctrler  = u2018001u2032.
       bapi_marc-mrp_group   = u20180001u2032.
    ENDIF.
    CLEAR bapi_marcx.
    bapi_marcx-plant      = i_tvkwz-werks.
    bapi_marcx-pur_group  = u2018Xu2019.
    bapi_marcx-mrp_type   = u2018Xu2019.
    bapi_marcx-period_ind = u2018Xu2019.
    bapi_marcx-lotsizekey = u2018Xu2019.
    bapi_marcx-proc_type  = u2018Xu2019.
    bapi_marcx-availcheck = u2018Xu2019.
    bapi_marcx-profit_ctr = u2018Xu2019.
    bapi_marcx-sloc_exprc = u2018Xu2019.
    bapi_marcx-mrp_ctrler = u2018Xu2019.
    bapi_marcx-mrp_group  = u2018Xu2019.
    bapi_marcx-spproctype = u2018Xu2019.
    Thanks,
    Greetson

Maybe you are looking for

  • Printer Not Showing Up In Add List again.

    I made a mistake and accidently deleted my printer from the Printer List (I was removing other printers). It doesn't show up when I try to add it again. Here is what I have done: 1) Removed the com.apple.print.PrintingPrefs.plist and com.apple.print.

  • Captivate 6 Copy and Paste issue

    After copying a Text Entry Box, Captivate 6 persist in pasting the same Text Entry Box object after several other objects (i.e. screenshots) have been copied to the clipboard. OS is Windows 7.

  • Running a web page keeps taking my browser sessions!!

    Hi, I am using JDev OAE and every time i run a page it finds a random existing browser session and uses it. I have tried putting another browser executable in JDev the preferences but it ignores it! I have documentation in some sessions and 11i in ot

  • To modify or not to modify standard business content

    There is a debate going on in my company about whether or not to modify the SBC cubes.  One suggestion is if it is necessary to modify them, copy them to create a custom cube and modify that, keeping the SBC in tact for future reference or use (recom

  • Videora - The Audio & Video Loose Synch throughout movie -

    Hello! Videora seems to work great! However, I have converted several movies and halfway throughout the film, it becomes VERY obvious that the audio and video are not synched up correctly. Does anyone know what the problem is? The audio and video are