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

Similar Messages

  • Access an Application Module Client Interface in a JSF Web Application

    How to Access an Application Module Client Interface in a JSF Web Application
    I use this code but class ValueBinding is deprecated in JDeveloper11g
    FacesContext fc=FacesContext.getCurrentInstance();
    ValueBinding vb=fc.getApplication().createValueBinding("#{data}");
    BindingContext bc=(BindingContext)vb.getValue(fc);
    DCDataControl dc=bc.findDataControl("SRServiceDataControl");
    ApplicationModule am=(ApplicationModule)dc.getDataProvider();

    user581394,
    JDeveloper 11 and the introduction of ADF Faces RC introduces a new dependency, which is JSF 1.2. The createValueBinding on the FacesContext object is deprecated in JSF 1.2. To resolve an expression in JSF 1.2 use the following method or something similar.
        public static Object resolveExpression(String expression) {
            FacesContext facesContext = getFacesContext();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp =
                elFactory.createValueExpression(elContext, expression,
                                                Object.class);
            return valueExp.getValue(elContext);
        }--RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Complex return type for operations in Application Services

    Hi all,
    I am trying to create a complex return type for one of operation in CAF Application service.I have created a complex dataStructure  named productList and added product bussiness object as its attribute with cardinality 0--n. And used product dataType as my return type.
    But I am not getting any output but its work fine with cardinality 0--1.
    I am using CE 7.1 SP5 trial version.......
    Can anyone

    Hi,
    And used product dataType as my return type.
    Are you sure you did not forgot to change you operations return type to "productList"?
    Best regards
    Philipp

  • Message Types for respective Modules

    Hello All,
    Could you please let me know how we can determine the message type and idoc types for respective Modules based ont the description. Example FICO i.e. Invoice or etc.
    Thank you.
    Regards,
    Dinesh

    Hi,
    Thanks for ur reply. But i have descriptions stating "SAP Inbound Inventory Transfer" and required specification to be implemented is "Plan to Fulfill.Inventory transfer with in the plant". In this case, which idoc must be used. I have checked in the tables earlier different message types.
    Regards,
    dinesh

  • How to find the message type for application

    Hi Guys,
    while postnig the data through idocs,we use message types
    the issue is how can we find the massage type for application?
    plzz help

    You can find these in transaction WE82.
    You can find in WE57, this basis type, which fm is attached (BAPI_IDOC_INPUT1).
    Then check out transactions WE41 and WE42.
    You can use the table EDIMSG, in SE16 to list all the msg types making use of the same IDoc.
    or
    If you want to get all the message types, you can use WE81.
    If you want to see which message types are attched to a particular Idoc type, use WE82
    check it in BD60 and WE57..

  • Creating Complex Datatypes in Application Module Service Interface

    HI All,
    I need to create the complex datatype as response in Application module service interface(Custom method).
    Is there any way to create it.
    I am able to create when i have simple datatype as response, Whereas the complex type is not able to create.
    Please give me some suggestion.
    Thanks
    Prabhat

    Hi
    I followed the below discussion and got the solution
    Create Web Services and return a complex type with ADF
    Thanks
    Prabhat

  • Best practice for application module  for scalability

    if i compare application module with forms 6i runtime session.(correct me if i wrong)
    In forms 6i, we create for single form for purchase entry. in which we select table like po , po_item, item_master, customer master
    also single form for sales entry. in which we select table like sales , sales_item, item_master, customer master, po , po_item
    So my question is. in jdeveloper , we planning to make separate jsp page and applicaiton module for purchase entry,
    separare jsp page and application module for sales.
    is it ok.
    or
    what is the best practice in this senario.?? ( or in scalability senario)
    if i made one single application module for whole application (let say 300 entity's(tables)) will performance of my app server degrade.

    You might want to read the chapter about AM Granularity in the ADF Developer Guide:
    http://download.oracle.com/docs/html/B25947_01/bcservices009.htm#sm0229

  • SD Output Type for Application V4 (Shipping Spec. Cond.)

    Hi
    Pl help me to know ehat is transaction code to maintained transational data for Output type - Picking List (Application V4)
    For example :
    Application V1 data can be maintained via T-code : VV11
    Application V2 data can be maintained via T-code : VV21
    Application V3 data can be maintained via T-code : VV31
    But unable to get T-code for application V4 (Any output type )
    Pl advice
    Regards
    Vicky

    Hi
    V4 is not like all the other output type set-ups.  Transactions that you can have a look at includes:
    VP01SHP
    NACW
    V/23
    V/38
    I am having a problem in that not all my deliveries pick this output up.  So if you set-up yours and have the answer to my mystery it would be appreciated.
    Good luck!
    Callie

  • Return type for count queries

    Hello,
    My entity manager executes a native query for a count(*) operation to get the row count from a table. But I am confused to see that while executing I get different datatypes such BigInteger, BigDecimal etc on different runs of the same query. Why is this so?
    What is the deciding factor for count queries data type??
    Please help....

    The whole point of a constructor is to create an object on the heap and return a reference to that memory block. In fact the call to the constructor will return a reference to the instantiated object. Thus there is no point in specifying a return type to a constructor.
    If you think about the way we call the constructor then it's obvious that it's not a regular method which goes inside an object.
    Hope this will do what you want :)

  • Return type for a PL?SQL function

    Hi,
    I am trying to register a PL/SQL function with discoverer which returns more than one numerical values. What return type should i use for this function....cant see an array or something like it from the Diccover end, when I try to register it.
    Please help.
    -S

    S.
    If you create a function, then you can pass in parameters but only return one value for the function.
    That return datatype cannot be an array, but just one value (ie: varchar, number, etc.).
    Russ

  • What is the default return type for a constructor

    I tried and found out that it should not be void, what is it? I am confused. Any clue? thanks

    constructors do not have return types. it is implicit that it is initializing a newly created object of the class of which it is a member.
    --p                                                                                                                                                                                                                                                                                               

  • Can't see imported app module client interface methods

    I needed to re-use the data model from another workspace in my current project, so I imported it.
    When I import a model into another application, the application module's client interface method(s) will show up in the data control palette (and thus become useable as the action of a data action) only if I click on the originating application in the application navigator (and it is certainly useable that way). But if I click anywhere in the application I've imported the model into, the data control palette doesn't display the method(s).
    Is this a bug? Is there a way to see the method(s) without having to click on the originating application?
    Thanks,
    David

    I needed to re-use the data model from another workspace in my current project, so I imported it.
    When I import a model into another application, the application module's client interface method(s) will show up in the data control palette (and thus become useable as the action of a data action) only if I click on the originating application in the application navigator (and it is certainly useable that way). But if I click anywhere in the application I've imported the model into, the data control palette doesn't display the method(s).
    Is this a bug? Is there a way to see the method(s) without having to click on the originating application?
    Thanks,
    David

  • Best way to handle Interface Return Type for Web Service Method

    Hi All,
    i have the followinig situation. I would like to create a method as a web service:
    Customer getCustomer(someType){....}
    ie: getCustomer method, with a parameter that indicates some backend data source. The method returns a Customer object. However, depending on the datasource this method uses (which is dependent on the type passed in, ie FooDB, BarDB etc) then i return either a:
    FooCustomer extends AbstractCustomer implements Customer
    BarCustomer extends AbstractCustomer implements Customer
    Now this fails because JAXB cant handle interfaces because when sending XML over the wire it needs a concrete representation (as far as i understand).
    So how should i deal with this?
    Do I need to create a differnet method for each datasource (foo DB, bar DB), ie:
    FooCustomer getFooCustomer()
    BarCustomer getBarCustomer()
    or do i continue calling getCustomer but somehow indicate in the WSDL that I have an AbstractCustomer object and some other bits from FooCusotmer or BarCustomer or ....
    kinda stumpeed here? I wouldve thought itd be handy to be able to do this (ie: call one getCustomer() method and get back Customer objects representing nay type of customer ... in some way...but cant see how to achieve this.
    Any pointers would be greatly appreciated
    cheers
    Marty

    Try to explore abstract schema type.

  • About application module client class

    I wonder what a class such as appModuleClient.java is used for?

    Hi,
    this is used to expose interfaces of the methods exposed by the ApplicationModule to the application client. So this class basically contains signatures of all methods that you select as client methods in teh AM
    Frank

  • Error: No return type for constructor?

    import java.swing.*;
    public class firstWindow extends JFrame
         public static final int WIDTH = 300;
         public static final int HEIGHT = 200;
         public FirstWindow()
              super();
              setSize(WIDTH,HEIGHT);
              JLabel newLabel = new JLabel("My Medical Record.");
              getContentPane().add(newLabel);
              WindowDestroyer listener = new WindowDestroyer();
              addWindowListener(listener);
    }I figure this is a syntax error but can't see it. WindowsDestroyer class below
    import java.awt.*;
    import java.awt.event.*;
         comments for window destroyer class
    public class WindowDestroyer extends WindowAdapter
         public void windowClosing(WindowEvent e)
              System.exit(0);
    }

    Hi,
    I just got back into town and saw all the heartfelt response. Thanks.
    I have no idea why I reposted this. It's not my norm and in no way was I trying to scrape out an answer. But I did it and I take the hit for it. I really apologize for that.
    The error was basic, but it's where I'm freaking AT. Basic. Go back to your initial steps into your FIRST programming language and review all the clumsy errors you made. I'm sure I'm going to make a few more thousand before I'm through.
    Java's error messages and syntax may seem very familiar to you but it's brand new to me. Many of the error messages and syntax aren't always clear, at least initially.
    From the ignorant knob butthole
    Edited by: Zarnon on Mar 13, 2008 7:13 AM
    Edited by: Zarnon on Mar 13, 2008 7:21 AM
    Edited by: Zarnon on Mar 13, 2008 7:23 AM

Maybe you are looking for

  • IPod keeps reseting and is not recognized by my computer

    I plug in my ipod and the copmuter tells me that the disk is not recognized and gives the options of initializing, ignoring, or reseting. And then when I unplug it, the iPod just turns on and off showing the apple logo. Any help would be appreciated.

  • Encript/Decrypt key issue

    Hai to all..... For a banking project we are using oracle9i database to store the customer's information and the information will be stored in the form of encrypted/decrypted format through a key. Key will be generated by using DBMS_CRYPTO and DBMS_O

  • Tool Report Design

    Hi all, Could you tell me any tools for design report layout or other way to design? Beside Quick Viewer, SAP Query, Report Painter/Writer, they can't group data and very complex. Thank you!

  • How To Watch Videos On My Computer?

    I have a nokia n95 8gb and cant seem to watch my video recordings on my computer can anyone help?

  • Emails sent post test are blank

    I've set up a test for my project and tested yesterday.  The post test email that is supposed to send results to an admin (me) is only blank.  There are no results if I pass or fail.  Is there a setting I'm missing or is it something else?