How to catch the user defined  exception in application service

Hi All,
How to catch the user defined  exception in application service  when it is throwed by the external service..
Regards,
Thirumurugan.

Hi,
    Thanks for your reply,
        Actually I  am calling validate Login method of External service from the application service. When the login fails, my external service will throw user defined Exception.I want to catch the user defined Exception.
    But in the application service , validate Login method can catch  only Invocation Exception and Engine Exception.
   These two exception are present in the Application service remote interface.
  public com.sap.comptest.extsrv.accrjavawsvi__document.output.
Ns1_validateLoginResponse validateLogin(com.sap.comptest.extsrv.accrjavawsvi__document.input.Ns1_validateLogin input) throws com.sap.caf.mp.base.exception.InvocationException, com.sap.caf.mp.base.exception.EngineException;
User defined exception is not present there. When i include the webservice as external service in CAF, it suppossed to generate the java file for the custom exception of validate Login method and this generated file should be included in the application service remote interface..
public com.sap.comptest.extsrv.accrjavawsvi__document.output.
Ns1_validateLoginResponse validateLogin(com.sap.comptest.extsrv.accrjavawsvi__document.input.Ns1_validateLogin input) throws com.sap.caf.mp.base.exception.InvocationException, com.sap.caf.mp.base.exception.EngineException,
(generated file name of user defined Excpetion.
  Then only  validate login method  of application service can catch  the user defined Exception which is thrown by the  external service.
regards,
Thirumurugan.p

Similar Messages

  • How to raise the user defined Exceptions in XI ?

    Hi All
        I am learning XI ...i want know how to set up the user defined Exceptions
        in XI?
        Where and What are the settings need to be done ?
        Same time where can check the LOG file ? to see all the server information ?
    Welcome to your answers
    Regards
    Rakesh

    Rakesh,
    Check this weblogs which will guide you:
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    /people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio
    Also check this thread:
    Mapping test throughs exception for UDF that does'nt exist anymore
    ---Satish

  • How to let the user define the colors for each plots in the graph (I use LabVIEW 7)?

    How to let the user define the colors for each plots in the graph (I
    use LabVIEW 7)?

    Hi,
    Take a look at this example, it uses property nodes to select tha
    active plot and then changes the color of that plot.
    If you want to make the number of plots dynamic you could use a for
    loop and an array of color boxes.
    I hope this helps.
    Regards,
    Juan Carlos
    N.I.
    Attachments:
    Changing_plot_color.vi ‏38 KB

  • User Defined Exceptions in Web Service

    I am trying to create complex user defined exceptions in Web services I am creating. Is there a way in JDeveloper to assist in modifying the WSDL to include all required parameters for fault handling that I can use to do this? Or do I have to write the XML manually in the WSDL file. Any recommended ways to accomplish this?

    Hello,
    raise duplicate_loan; won't avoid the trigger to insert and commit. If you really want to avoid the insertion, use the raise_applicatrion_error() instead.
    For instance : Raise_Application_Error( -20001, 'Insertion cannot be validated' );Then in your Forms module, you can catch it like this:
       Begin
       Insert Into ...
       when others then
          LC$Erreur := Substr( SQLERRM,1 , 500 );
          LN$err_code := ABS(SQLCODE);
          If LN$err_code = 20001 Then ...
       End;
    ...Francois

  • How to bind the user-defined watch to a specific server so that server's Health would show green ball and is linked to Monitoring watch?

    Hi,
    I create a user defined watch for BI4.1 ExplorerExplorationServer server in CMC -> Monitoring.
    Caution:
    node.ExplorerExplorationServer$'Server Running State'==1 ||
    node.ExplorerExplorationServer$'Server Running State'==2 ||
    node.ExplorerExplorationServer$'Server Running State'==4 ||
    node.ExplorerExplorationServer$'Server Running State'==6 ||
    node.ExplorerExplorationServer$'Server Running State'==7 ||
    node.ExplorerExplorationServer$'Health State'==1
    Danger:
    node.ExplorerExplorationServer$'Server Running State'==0 ||
    node.ExplorerExplorationServer$'Server Running State'==5 ||
    node.ExplorerExplorationServer$'Health State'==0
    However, in CMC -> Servers -> Explorer Services, the ExplorerExplorationServer shows "Information is not available" blue ball in Health.
    How do I bind the user-defined watch to a specific server so that server's Health would show green ball and is linked to Monitoring watch?
    Regards,
    Jin-Chong

    Hello JinChong,
    We had created User-defined Explorer watches on our environments and have run into issues.
    Have received many false alerts even though Explorer servers are running fine.
    After creating an AGS case it was informed to us that Explorer does not have monitoring capabilities.
    AGS is checking with solution architect of Explorer application about when the monitoring watches for explorer would be included.
    Regards,
    Rohit

  • How can we handle user defined exceptions in ejbStore() of entity bean

    Accroding to my knowledge in ejbStore we can not handle user defined exceptions. Can anybody help on this????

    In my case I am calling a method from ejbsotre() . In that method i wanted to put some checks according to that i wanted to throw exceptions.
    In this case how would I handle exceptions.
    Can you suggest in this case,please !!!

  • How to distinguish the User-Defined-Function from Oracle Build-In function

    Hi Friends,
    I could get the function list form all_objects table by the SQL:
    select * from all_objects where object_type = 'FUNCTION'
    but there is no column in all_objects specify the function is build-in or user-defined.
    But I found in SQL Server there is a column "is_ms_shipped" in the sys.all_objects table. This column will specify the object is build-in or user-defined. I want to get the equivalent column in Oracle but failed.
    Could anyone tell me how to solve this problem?
    Thanks,
    Ricky

    Thanks Pavan.
    But if an user connects to database using "conn /as sysdba" syntax and creates a function. This user-defined funtion goes into the "SYS" schema also. I know it is not the best practise to create objects using sys user so I think your solution is right.
    Regards,
    Ricky

  • How to provide the user in an APEX application with low-vision apex option

    Hi I've a small problem I'm trying to solve but can't seem to find anything on this.
    The issue is this I've developed an application and the user can log on and use it successfully. For those users that are visually impared I need a link on my main application to a High Contrast version of the same application.
    Is this even possible.
    I don't want to have to create a new application using a high contrast theme, as I would need to maintain 2 applications in the end.
    Is there a way of changing the colors at run time to a higher contrast version.
    Many thanks.

    Hi,
    I just wanted to add to this discussion with some functionality introduced in APEX 4.1 that may help here. In APEX 4.1, we introduced a new 'High Contrast Mode' which basically identifies sessions as optimized for high contrast in the APEX development environment and websheet runtime. This allowed us to get around some issues we were having when a user was running in 'Windows High Contrast Mode' (where CSS background images are ignored) and also some issues with insufficent contrast. To read more about this mode, please see the 'About Constrast Mode' section in the 'Accessibility in Oracle Application Express' appendix here:
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21674/accessibility002.htm#BABBCIJD
    Now, although this mode is available for use within your own database applications, it really only provides the framework for you to provision the mode and importantly, will not make any changes to your application (that's still up to you). But I think the framework is still useful and provides some nice API's to help you turn the mode on or off and also determine the status of the mode.
    I have setup a simple example to show you how this works:
    http://apex.oracle.com/pls/apex/f?p=11005:1
    It's rudimentary, just showing 1 region if High Contrast Mode is on, and another if it's off. This page has the following:
    1) Select list to select whether the mode is on or off.
    2) Page process to set the mode, depending on the select list value. This performs the following PL/SQL (showing the APIs you can use to switch the mode on or off):
    if :P1_HIGH_CONTRAST = 'Y' then
      apex_util.set_session_high_contrast_on;
    elsif :P1_HIGH_CONTRAST = 'N' then
      apex_util.set_session_high_contrast_off;
    end if;3) The region's have 'PL/SQL Expression' conditions that call another API that you can use to check if the current session is running in HC Mode. For example:
    apex_util.is_high_contrast_sessionOnce the mode is enabled, it will remain enabled for the length of the current session (or until it is switched off). To understand more about how you can use HC Mode, please see here:
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21674/advnc001.htm#CIJCDGII
    So as I said, the example I gave as kinda simple. But you could easily extend this to say include an additional CSS file when running in HC Mode (containing the CSS styles and properties that would give you the increased contrast). You could do this by adding a page zero page process to run before header, that calls the apex_util.is_high_contrast_session API to determine if the current session is in HC mode, then include the CSS file if so. To see an example of this, please see here:
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21676/apex_util.htm#autoId71
    I hope this helps, at least with the framework side of things, if you can upgrade to 4.1 at all.
    Regards,
    Anthony.

  • In java ,how to access the  user-defined type of pl/sql?

    in my application,i using the following code to access the pl/sql type self-defined,but it throws run-time exception,how can i resolve it?String sqlStr="{call BossStat.dunStat(?,?,?,?,?,?)}";
    OracleCallableStatement ocstmt=(OracleCallableStatement)conn.prepareCall(sqlStr);
    int paramIndexInt=1;
    ocstmt.setInt(paramIndexInt++,100);
    ocstmt.setInt(paramIndexInt++,1);
    ocstmt.setInt(paramIndexInt++,1);
    ocstmt.setTimestamp(paramIndexInt++,new java.sql.Timestamp(System.currentTimeMillis()));
    ocstmt.setTimestamp(paramIndexInt++,new java.sql.Timestamp(System.currentTimeMillis()));
    ocstmt.registerOutParameter(paramIndexInt++,OracleTypes.ARRAY,"BossStat.TP_STATLABELVAR");
    ocstmt.execute();

    You can have a look at this how to document
    http://otn.oracle.com/sample_code/tech/java/codesnippet/jdbc/objects/ObjectTypes.html
    You can apply similar concept if you want to use stored procedure.
    If you still get problems, post the type that you have created and the error you are getting.
    Chandar

  • How can give the user defined parameter in alv report

    Hi experts
      I have created one alv report for Sale Order statement.In this alv report have different input parameters
      My problem is in this alv i have two input field Sales Orgaization and Plant.When I set this parameter value in user details it snot affected in my alv report.But it is affected in the standard alv report.How can
    i rectify this
    Regards
    Manoj

    hi
    i think don't use set parameter value,  use there SUBMIT & RETURN statement and write in USER_COMMAND function.
    FORM USER_COMMAND  USING P_UCOMM    LIKE SY-UCOMM
                             P_SELFIELD TYPE SLIS_SELFIELD.
      SUBMIT program name AND RETURN
      WITH <selection-screen field> IN <selection-screen field>
      WITH WERKS IN WERKS .
    ENDFORM .
    Regards,
    Abhi

  • How to save the user-defined Java source code

    Would you please tell me how to download all of the java source code in one software component.

    UDFs can be exported one by one as a .mte file...not at one go...

  • How to restrict the Users to access other application URL on same machine?

    We have one Oracle 10g AS server, hostname "abc", this server having two services named "DSS" and "RBL".
    Our requriement is how we can restrict the URL "http://abc.xyz.com:7777/forms/frmservlet?config=rbl" from user access, because both DSS and RBL having same URL.
    Can we change port 7777 for RBL service?
    http://abc.xyz.com:7777/forms/frmservlet?config=dss
    [DSS]
    userid=schema_1/abc123@orcl
    form=DSS_MAIN_MENU.fmx
    width=200%
    height=200%
    separateFrame=true
    lookAndFeel=oracle
    colorScheme=teal
    splashScreen=no
    background=grey
    http://abc.xyz.com:7777/forms/frmservlet?config=rbl
    [RBL]
    userid=schema_1/abc123@orcl
    form=MAIN_MENU.fmx
    width=200%
    height=200%
    separateFrame=true
    lookAndFeel=oracle
    colorScheme=teal
    splashScreen=no
    background=grey
    --------------------------------------------------------------------------

    Anyone can answer.

  • How to pass the user & pass  dynamically for  web services in composite.xml

    My project calling external secure web services.now i hardcode the username and password in composite.xml. i need to pass dynamically.Anyone can help me?

    OK, got it. Need to set the variable in the correct component in opmn.xml file.

  • How to handle user defined exception from C#?

    Hi:
    I have some PL/SQL code that will throw a user defined exception if certain conditions are met. How do I handle user defined exceptions if this procedure/function is being called from C#? C# can handle a normal Oracle SQL error (e.g. ORA-XXXX) because they are defined in the proper class, but how do I get it to know about my user defined exception? Does anyone have any links to examples of doing this?
    Thanks.

    Hi Gaff,
    Is there a particular problem you're having doing this? It works as normal for me...
    Cheers
    Greg
    PLSQL
    =========
    create or replace procedure throwsomething as
    begin
    raise_application_error(-20001,'kaboom');
    end;
    ODP
    =====
        class Program
            static void Main(string[] args)
                using (OracleConnection con = new OracleConnection())
                    con.ConnectionString = "user id=scott;password=tiger;data source=orcl";
                    con.Open();
                    using (OracleCommand cmd = new OracleCommand())
                        cmd.CommandText = "begin throwsomething;end;";
                        cmd.Connection = con;
                        try
                            cmd.ExecuteNonQuery();
                        catch (OracleException oe)
                            Console.WriteLine("caught " + oe.Message);
    OUTPUT
    ========
    caught ORA-20001: kaboom
    ORA-06512: at "SCOTT.THROWSOMETHING", line 3
    ORA-06512: at line 1

  • Propagating user defined exceptions

    A question on marshalling user defined exception in RMI/IIOP. Consider the following simple Java interface and user defined exception:
    public interface OrderProcess extends Remote {
    String placeOrder(PO order) throws OrderException, RemoteException;
    public final class OrderException extends java.lang.Exception implements java.io.Serializable {
    public OrderException() { }
    public String msg;
    public OrderException(String _msg) {
    msg = _msg;
    If the client uses RMI/IIOP to access a CORBA server( client uses the rmi stubs generated by rmic -iiop, the server uses Dynamic Skeleton Invocation by implementing org.omg.CORBA.DynamicImplementation), how does the server send back the user defined exception OrderException so that it can be unmarshalled properly by the client stub? Here is a section of the rmi stub generated by JDK1.3.0, note it looks for an exception OrderEx and OrderException:
    public String placeOrder(PO arg0) throws OrderException, RemoteException {
    if (!Util.isLocal(this)) {
    try {
    org.omg.CORBA_2_3.portable.InputStream in = null;
    try {
    org.omg.CORBA_2_3.portable.OutputStream out =
    (org.omg.CORBA_2_3.portable.OutputStream)
    _request("placeOrder", true);
    out.write_value(arg0,PO.class);
    in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out);
    return (String) in.read_value(String.class);
    } catch (ApplicationException ex) {
    in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
    String id = in.read_string();
    if (id.equals("IDL:RFQSample/initial/rfqTypes/OrderEx:1.0")) {
    throw (OrderException) in.read_value(OrderException.class);
    throw new UnexpectedException(id);
    } catch (RemarshalException ex) {
    return placeOrder(arg0);
    } finally {
    _releaseReply(in);
    } catch (SystemException ex) {
    throw Util.mapSystemException(ex);
    } else {
    ServantObject so = servantpreinvoke("placeOrder",OrderProcess.class);
    if (so == null) {
    return placeOrder(arg0);
    try {
    PO arg0Copy = (PO) Util.copyObject(arg0,_orb());
    return ((OrderProcess)so.servant).placeOrder(arg0Copy);
    } catch (Throwable ex) {
    Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
    if (exCopy instanceof OrderException) {
    throw (OrderException)exCopy;
    throw Util.wrapException(exCopy);
    } finally {
    servantpostinvoke(so);

    Not sure exactly if that's what you are asking but the unmarshalling of your OrderException happens in this catch block:
    catch (ApplicationException ex)
                        in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream ();
                        String id = in.read_string ();
                        if (id.equals ("IDL:RFQSample/initial/rfqTypes/OrderEx:1.0"))
                            throw (OrderException) in.read_value (OrderException.class);
                        throw new UnexpectedException (id);
                    }the ApplicationException class is the vehicle that transports your exception instance across the wire. You can dig further into the implementation to see how it is done.
    Vlad.

Maybe you are looking for

  • Color differences between high and low res images in Illustrator pdfs

    OK, I'm creating a tradeshow graphic for a client. I designed the whole thing in Illlustrator CS6. But for the proof, I used a low res image of the sky (before we purchased it). Everyone was happy. It was a low-res RGB image imported into Illustrator

  • My phone is just showing a usb cord pointing to itunes

    when i turn the phone on, All it shows is a screen of an USB cord and an arrow pointing up to the Itunes symbol.. I tried restoring the phone and it keeps saying it failed.

  • Automating XMP Metadata in Illustrator CS4

    How do I use actions or scripting within Illustrator CS4 on the Mac to automatically copy all of the text within an Illustrator pasteboard and paste it into the Keyword XMP Metadata field under File Info. I've tried Select/Text objects, then Copy (Cm

  • DBLookup? Urgent

    Hi Guys, My scenario is RFC - SOAP synchronus. In the response mapping, i have a field from the 3rd party WSDL which basically returns the status codes like 100, 200 etc. If 100 i need to map the message as "success" to a particular field in RFC. I h

  • Characters appearing after Import when no character is listed on the Original Document

    Good Afternoon ~ I'm hoping someone can assist with my issue. In the context of the document there is a (c1) appearing after a sentence even though there is no characters or anything on the original document. HELP