How to return a business fault from a DB Adapter call.

Using a SOA composite with a Mediator, from a BPEL service we call a PL/SQL package, via a DB Adapter, to get some information. Sometimes we will get a NO_DATA_FOUND from the select and we catch that (or as the documentation says - for example when a social security number is not found in the database).
The question is how do we raise that as a business fault that is returned to the caller. Currently we catch the fault in the PL/SQL and return the details in the return message - but the messageis not in itself a fault and so we would need to check the message using an IF to see if it was an error.
The question then also can we easily turn this message into a fault. We have tried using a Choose in a transformation without luck.
Hope I am describing the scenario but clearly it is something that must be regularly handled. Thus how should we handle when a social security number is not found in the database.

Sorry, the service was built without a BPEL. The service in question is used by othere services to access the database. There is a composite that exposes the service and includes a Mediator that has many Routing Rules that transform the various inputs using xsl, makes the appropriate jca call to a PL/SQL procedure and transforms the returned information from the database using xsl. The PL/SQL only has input and output variables and can raise an exception. We want to catch say N0 DATA FOUND and raise a business fault that subsequently gets caught. We tried adding code to the xsl to try and return a fault but it did not work. We can add a BPEL to the service to accomplish what we want but wanted to do without a BPEL.

Similar Messages

  • How to return a Soap Fault from a business process

    I'm trying to re-implement an existing web service in WLI that can return soap
    faults to clients when business errors occur while processing a request. Is this
    possible to do with WLI, and if so can someone please point me in the right direction?
    thanks...

    If your JWS can throw a SOAPFaultException, that should return a SOAP fault to
    the client.
    "Michael Hanes" <[email protected]> wrote:
    >
    I'm trying to re-implement an existing web service in WLI that can return
    soap
    faults to clients when business errors occur while processing a request.
    Is this
    possible to do with WLI, and if so can someone please point me in the
    right direction?
    thanks...

  • How to return a ref cursor from this dbms_sql?

    Hi,
    Can anyone show me how to return a ref cursor from this dbms_sql based procedure? I see 11g has a dbms_sql.to_refcursor(cursor_handle). How can this be done is 10g?
    Thx.
    CREATE OR REPLACE PROCEDURE Sample_Get_t
    p_sample_id sample.sample_id%TYPE,
    p_contract_id sample.contr_id%TYPE
    IS
    cursor_handle INT;
    sql_stmnt varchar2(500);
    rows_processed NUMBER;
    BEGIN
    sql_stmnt :=
    'SELECT
    sample_id,
    contr_id,
    rcpt_id
    FROM
    sample s
    WHERE
    s.contr_id = :1
    and s.sample_id = :2
    ORDER BY
    sample_id';
    cursor_handle := dbms_sql.open_cursor;
    dbms_sql.parse(cursor_handle, sql_stmnt, dbms_sql.native);
    dbms_sql.bind_variable(cursor_handle, ':1', p_contract_id);
    dbms_sql.bind_variable(cursor_handle, ':2', p_sample_id);
    rows_processed := dbms_sql.execute(cursor_handle);
    dbms_sql.close_cursor(cursor_handle);
    END Sample_Get_t;

    In 10 this cannot be done with dbms_sql (to my knowledge). There are a couple of other options.
    1) open the ref cursor for the dynamic statement using bind variables (or SYS_CONTEXT variables, which i prefer since they are much easier to deal with when you are dynamically adding predicates).
    declare
       wRefCursor  SYS_REFCURSOR;
    begin
       open wRefCursor for 'select * from all_objects where owner = :Logged_in_user' using user;
    end;
    /or using the context (the context will bind for you)
    declare
       wRefCursor  SYS_REFCURSOR;
    begin
       open wRefCursor for 'select * from all_objects where owner = SYS_CONTEXT(''CONTEXT_NAME'', ''VARIABLE_NAME'') ';
    end;
    /Be aware that contexts ALWAYS return varchar values, so if you are comparing to a number you should wrap it in TO_NUMBER, a date, TO_DATE and so on....
    2) change the DBMS_SQL to do an insert into a global temporary table and return the ref cursor which select's * from GTT;
    3) upgrade to Oracle 11 :)

  • How to return a single datetime from multiple rows of MAX(value) in DAX

    Hi
    I have a Results table with ResultTime, Balance, Equity which is updated with a new row every 5 minutes. I've used SUMX to find opening and closing balances and it has worked so far.
    Res_OpeningBalance:=SUMX(TOPN(1,Results,Results[ResultTime],1),[Balance])
    Res_ClosingBalance:=SUMX(TOPN(1,Results,Results[ResultTime],0),[Balance])
    But when I tried it with dates, the whole thing fell apart.
    Res_MaxBalance_Date:=SUMX(TOPN(1,Results,Results[Balance],0),[ResultTime])
    Since the highest Balance is likely to be represented through many rows due to it lasting more than 5 minutes, ResultTime (which is unique to each row) is summed up and returns messed up dates well into the future. How to return only one date (first or last
    datetime) from the rows where Balance is at max?
    I tried a TOPN of TOPN, but Excel was not amused.
    =SUMX(TOPN(1,Results,Results[Balance],0),TOPN(1,Results,Results[ResultTime],0))
    TIA!
    Re
    Dennis

    I still don't understand RANKX, but I figured it out anyway. I get the correct data by using:
    Res_MaxBalance:=MAX(Results[Balance])
    Res_MaxBalanceDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Balance]=MAX(Results[Balance])))
    Res_MinBalance:=MIN(Results[Balance])
    Res_MinBalanceDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Balance]=MIN(Results[Balance])))
    Res_MaxEquity:=MAX(Results[Equity])
    Res_MaxEquityDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Equity]=MAX(Results[Equity])))
    Res_MinEquity:=MIN(Results[Equity])
    Res_MinEquityDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Equity]=MIN(Results[Equity])))
    Re
    D

  • How to return the entire row from a table

    Hi guys,
    Tabl A
    FirstName varchar2(10),
    Age Number,
    Add varchar2(100),
    Table B
    Filedname varchar2(200), -- contains all the fields of table A
    Datatype varchar2(100), -- Contains the datatypes of the filedname
    Length Number -- contains the length of the fileds
    Now how can i return the entire row from table A with the datatype and its length.
    Any help would be appreciated ?
    Here is the query I wrote but it how to take the datatype and its length..
    create or replace procedure disp_table_data
    as
    type r_cursor is REF CURSOR;
    c_A r_cursor;
    er A%rowtype;
    begin
    open c_A for select * from A;
    loop
    fetch c_A into er;
    exit when c_A%notfound;
    dbms_output.put_line(er.FirstName||'--'||er.Age);
    end loop;
    close c_A;
    END;
    /

    Guys,
    I want column value from table A and its corresponding data_type and length from table B. I think I cant do it through joins.
    Any idea would be appreciated ?.
    Example ..
    Tabl A
    FirstName varchar2(10),
    Age Number,
    Add varchar2(100)
    insert into A values('John',24,'Boston');
    Table B
    Filedname varchar2(200), -- contains all the fields of table A
    Datatype varchar2(100), -- Contains the datatypes of the filedname
    Length Number -- contains the length of the fileds
    insert into B values('FirstName','varchar2',10); -- this is coming from table A.
    Output should be like this...
    John,Varchar2,10
    Here (John is the FirstName - coming from table A, Varchar2 is a Datatype and 10 is the Length which are coming from table B ). Only column values are coming from table A , corresponding datatype and length are coming from B.
    Any idea would be appreciated ?
    Thanks.

  • How to return a entire table from a Function in Oracle?

    Can anyone pls let me know if there is some way to return an entire table from a function which is called from a stored procedure?
    Thanks

    > Can anyone pls let me know if there is some way to return an entire table from a function which
    is called from a stored procedure?
    For what purpose?
    Do you realise that this means pulling Megabytes (or even many Gugabytes) of data from disk, into the buffer cache, and then copying that data into PL/SQL memory (using a function) in order to give a stored proc that data?
    This is just plain crazy.. resource wise, performance wise, scalability wise.. this is exactly how NOT to use Oracle.
    Why don't you instead tell us what problem you want to solve. Forget for the moment what you think the solution should be. (and asking us how to get a potentially flawed solution, to work)
    Let's get an accurate problem definition so that we can provide you with suggestions and recommendation on what Oracle features can be used to address that problem.

  • How to return a bool value from MyBrokerProcess

    To make MyPlugin work in Adobe Reader X in Protected Mode On, i have created a Broker Process(MyBrokerProcess.exe)
    Plugincode(C++)--->BrokerProcess(C#)---->Helper(C#)
    MyPlugin has 4 button, when i click on each button a Window(System.Window.Form) will open and perform its task.
    1.While i trying to close the ActivePDF document , if any of the Windows(System.Window.Form) is open i will display the message saying("Choose YES to Close this Window first Before Closing the ActiveDoc and Choose NO to continue without closing Window and ActiveDoc"). This is taken care in Helper Class(C#)
    2.If the user choose "Yes", then the Helper functin will return 'true' to MyBrokerProcess.
    3.Inturn  MyBrokerProcess has to return this bool value to the PluginCode(C++) which is the only place to  access Acrobat API function to close the ActiveDocument.
    Now i am clueless as to how i have to return this bool value from MyBrokerProcess to PluginCode. Or is there any other way to accomplish the above task. Please some one help me to solve this issue.
    Thanks in advance.

    Hi Richard,
    This is what i tried to do. But i couldnot make MyPlugin work in Protected Mode On.
    Plugincode(C++)<--->BrokerProcess(C#)<---->Helper(C#)
    I added a simple Process between Plugin(C++)code and Helper(C#)code.
    Previously it was like
    Plugincode(C++) <----> Helper(C#)
    Thanks and Regards,
    Chetan.

  • How to migrate changed Business Scenarios from Template Project to Solution

    SAP Solution Manager - How to migrate changes in Business Scenarios from Template Project to Solution?
    Our Global ASAP strategy is based upon a Template Project, Implementation Project, Maintenance Project and Solution with Business Scenarios.
    Changes in the Template Project for existing and new Business Sceanarios, etc. are correctly executed. Up till now we have successfully implemented our Template Project and secondly extended our Business Scenarios from 4 to 14. Our 3rd upcoming change will be changes on Business Scenarios as well. These planned changes for the Business Scenarios need to be consistent, possibly without manual intervention.
    During a Proof of Concept (PoC) in our Sandbox (SXB) we have identified a possible serious problem when trying to publish these changes in Business Scenarios in the Template Project to the Solution. SAP Solution Manager (SSM) does not seem to support a scenario where Business Scenarios in the Solution can be refreshed or updated with changed Business Scenarios in the Template Project.
    We have identified 2 possibillities:
    1.     Manual project upgrade
    1.1.     Synchronize the changes for the Template Project normally;
    1.2.     Delete the changed Business Scenarios from step 1.1 in the Solution;
    1.3.     Add the changed Business Scenarios from step 1.1 into the Solution.
    For this scenario we foresee a big problem because all Content and Issues connected to the old Solution Business Scenarios loose their coupling with the Solution.
    For the Content this may not be a real problem because the Content is also available in the Template Project.
    However the Issues are loosely coupled to the Solution Scenarios and therefore need to be coupled manually to these processes.
    2.     Manual changes using Maintenance Project
    2.1.     Synchronize the changes for the Template Project normally;
    2.2.     Publish all changes from step 2.1 in the Template Project
    2.3.     Add all new Content from step 2.1 to the structure of the Maintenance Project;
    2.4.     Relocate Content and Issues when the Business Scenario has been relocated.
    Because SSM does not support this activity we need to delete this Business Scenario first and secondly re-create it again on the correct spot.
    Our question: How has SAP done this in other customer projects?
    We need to have a working solution by the end of March, 2009.
    Best regards,
    Peter Hendriksen

    Peter,
    Did you get an anwer to this question from SAP?
    Rgds,
    Eamonn.

  • How to recover my business files from a formatted removable drive?

    I need to recover my business files from my formatted drive accidentally. I know I am stupid. I am using Windows XP. It is a Toshiba 500GB external hard drive.
    Is there anyone that can help me to restore my files back? The inner files are really important to me. Help, please!

    Well! If you really know little about data recovery stuff, I think I could help.
    Actually, after you Google “data recovery tools” on the internet, you could see plenty of data recovery tools available online. Some of them are free, some of them are not. You should put much more attention to this point and make a wise
    decision according to your won needs.
    Here are some freeware for you:
    http://www.piriform.com/recuva
    http://www.formatrecovery.blogspot.com/2013/02/recover-data-after-formatting.html
    Here are some paid tools for you:
    http://www.techsupportalert.com/best-free-data-recovery-file-undelete-utility.htm
    You should read these articles to know more information about data recovery stuff and select a right one:
    http://en.wikipedia.org/wiki/Data_recovery
    http://en.wikipedia.org/wiki/List_of_data_recovery_software
    Thank you for your prompt replies. I will try your recommended tools latter. Thank you very much!!!!!

  • How to retrieve client certificate information from sender mail adapter

    Hi, expert:
    I have a requirement to verify the validation of coming email with digital certification. The mail is with digital certification. If the coming email is valid, I 'll get the attachemt of the mail for further processing. I have a sender mail adapter and receiver file adapter configued.
    I have already my own developed adapter module, which is configued in mail adapter. My question is how to retrieve the detailed certificate information in the adapter module developed by myself. Is it feasible?
    Thanks a lot.

    The WL-Client-Proxy cert should be the cert used on the proxy side if SSL is configured between Apache and WebLogic, so I believe that is the reason why that does not work. Basically, the problem here is that SSL is end-to-end, and the two ends of this transaction are the client and apache.
    That said, when you add the +ExportCertData option, this should record the client's SSL certificate in the vairable SSL_CLIENT_CERT.  So you should be able to use request.getAttribute("SSL_CLIENT_CERT").
    See:
    http://www.modssl.org/docs/2.8/ssl_reference.html
    If this doesn't work for you (which is possible if the WL_Proxy is doing something funny to the request), it is probably best just to dump out the entire contents of the session, and see what you have:
    for (Enumeration e = request.getAttributeNames() ; e.hasMoreElements() ; ) {
    String attr = (String)e.nextElement();
    System.out.println("ATTR = " + attr);
    System.out.println("VAL = " + request.getAttribute(attr));
    If you can't see any SSL certificate there, you will have to work out some way to pass this on manually.
    cheers,
    Trevor

  • How do you prevent your phone from locking during voice calls?  Mute/unmute features?  Are there any?  Please help?

    Here is the problem - I am often on conference calls.  My company, for security reasons requires that I use the lock phone feature.  However, I will be on a call, I have muted myself, then the phone locks.  I then have to key in my password, and unmute my phone.  This prevents me from "jumping in" the conversation appropriately.  I either sound like I'm not paying attention or worse, I'm talking over someone else and seem rude.  I have tried to search for any of the following features on the iphone 5 c.
    Prevent phone from locking during phone calls
    Set a button on the phone as mute/unmute
    Find a headset that has a mute/unmute feature
    I am not the only one at my company struggling with this so I'm thinking others might be too and that there is a solution!
    Please help!
    Thank you.

    Sounds like you need to upgrade to the iPhone 5s
    The 5s has Touch ID
    You can unlock your phone with your finger instead of typing in a key code
    No swiping to unlock either, just touch the home button
    You can enrol multiple fingers as well
    Here is a video of it in action
    http://www.apple.com/iphone-5s/videos/#video-touch
    Or wait and see what iPhone 6 has to offer
    That being said, as desiel vdub posted if the phone is up to your face, the proximity sensor should turn the screen off
    And when you lower the phone turn it back on again
    Not sure about the phone locking when your on a call doesn't sound right

  • How i can receive business cards from others....?

    i don't know how to receive business card on my i phone.....though i know i can the contact through the share option.....can any genious or tech person help me ........................

    Now, do I need to create new communication channel (Sender)?
    Only one sender channel will be required.....the one which gets the message from ECC......other will be the SOAP receiver channel.
    In what format is ECC sending the request....it should be PROXY/ RFC since it is a synchronous call.
    My service interface has request, response, and fault roles. Also its mode is synchronies. But I couldn't get vendor
    response.
    Are both the (outbound and inbound) services interfaces defined as Synchronous?
    Is the proper wsdl imported in ESR from the vendor?
    Are you atleast able to see some response node generated in the processing entry in SXMB_MONI?
    Regards,
    Abhishek.

  • How to copy E-business Parameterization from an environment to another

    Hi to everybody,
    I'm new to the world of Oracle Applications and I'm starting a new project. My concern is related to change management.
    I intend to have :
    - an environment where developpers will parameterize the E-business suite (screen/folder field modification, workflows, LOV,...),
    - another environment where users will validate the application,
    - a third environment dedicated to production,
    Is there any tools, or "tips" that allows to move defined parameters from one environment to other ? Should I need to Key in all parameters every time I need to install a new release of my application?
    Tanks for your help.
    If you have any question I'm reachable at [email protected]

    Another simple alternative, according to AskTom (http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:454220160386)
    ---------------- getcode.sql ----------------------------
    set feedback off
    set heading off
    set termout off
    set linesize 1000
    set trimspool on
    set verify off
    spool &1..sql
    prompt set define off
    select decode( type||'-'||to_char(line,'fm99999'),
    'PACKAGE BODY-1', '/'||chr(10),
    null) ||
    decode(line,1,'create or replace ', '' ) ||
    text text
    from user_source
    where name = upper('&&1')
    order by type, line;
    prompt /
    prompt set define on
    spool off
    set feedback on
    set heading on
    set termout on
    set linesize 100
    ------------------- eof --------------------------------
    it extracts one procedure, function or package to a file. Thats it. If you
    wanted to get all of the procedures in a schema extracted to the current working
    directory, you would run a script:
    --------------- getallcode ---------------------------
    set termout off
    set heading off
    set feedback off
    set linesize 50
    spool xtmpx.sql
    select '@getcode ' || object_name
    from user_objects
    where object_type in ( 'PROCEDURE', 'FUNCTION', 'PACKAGE' )
    spool off
    spool getallcode_INSTALL.sql
    select '@' || object_name
    from user_objects
    where object_type in ( 'PROCEDURE', 'FUNCTION', 'PACKAGE' )
    spool off
    set heading on
    set feedback on
    set linesize 130
    set termout on
    @xtmpx.sql
    ---------------- eof ---------------------------------
    You can see how to filter on that one by adding to the where clause if you want.
    Just run @getallcode_INSTALL to run all of the scripts...

  • How to return List or Array from Web Service without using ADF?

    All,
    I would like to know how to do this before I use ADF. Sounds like a simple thing to do - common even - but I haven't found a solution in existing postings. My attempts have failed though I'm not sure exactly why.
    I have created a declarative WS that takes a single parameter and tries to return a List<Employees> resultset. My Sample Java Client works just fine. When I change the result type from List to String[], for example, it also works fine.
    What am I doing wrong??
    Thanks
    package wizard;
    (imports removed for readability)
    @WebService(name = "MyWebService1", serviceName = "MyWebService1", portName = "MyWebService1SoapHttpPort")
    @Deployment(restSupport = true)
    public class HelloWorld {
    List<Employees> employees = null;
    public HelloWorld() {
    public List<Employees> sayHello (String s) {
    try {
    final Context context = getInitialContext();
    ATOABPFacade aTOABPFacade = (ATOABPFacade)context.lookup("ATOABPFacade");
    employees = aTOABPFacade.queryEmployeesFindByName(s);
    return employees;
    } catch (Exception ex) {
    ex.printStackTrace();
    return employees;
    private static Context getInitialContext() throws NamingException {
    return new InitialContext();
    Trace:
    Ready message received from Oc4jNotifier.
    Embedded OC4J Server startup time: 24063 ms.
    Target URL -- http://localhost:8988/JPA-Wizard-context-root/mywebservice1soaphttpport
    Feb 18, 2008 7:42:49 PM com.evermind.server.ServerBase log
    WARNING: JPA-Wizard-webapp: Error preloading servlet
    javax.servlet.ServletException: java.lang.NullPointerException
         at oracle.j2ee.ws.server.provider.ProviderServlet.init(ProviderServlet.java:186)
         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
         at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2674)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:5162)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:5085)
         at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:5275)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1357)
         at com.evermind.server.http.HttpApplication.init(HttpApplication.java:873)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:699)

    Gi,
    not sure what you are doing there, but you can build the J2EE WebService from your working POJO, and create a Web Service proxy class from the WSDL description (of the deployed or local WSDL file). Then, using the proxy class, you can access the output of the WebService.
    Frank

  • How to return an error message from a zbapi that I have written

    Hello Friends
    I have written a simple ZBAPI that I have created. Here is the simple code that I have written which just inserts some value. How can I send information back using BAPIRETURN if the insertion was not successfull.
    Is it enough just to define BAPIRETURN in the EXPORT TAB or is there any extra coding I have to do?
    Your response or feedback will be greatly appreciated.
    Following is the simple code of insertion that I have written.
    FUNCTION ZBAPI_ADD_CONFIG.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(CONFIG_DATA) TYPE ZCONFIG_STRUCTURE
    *" EXPORTING
    *" VALUE(MESSAGE) TYPE BAPIRETURN
    tables: ZDAMPER_CONFIG.
    ZDAMPER_CONFIG-CONFIG_ID = CONFIG_DATA-CONFIG_ID.
    ZDAMPER_CONFIG-APPL_FILE_NAME = CONFIG_DATA-APPL_FILE_NAME.
    ZDAMPER_CONFIG-APPL_VER = CONFIG_DATA-APPL_VER.
    ZDAMPER_CONFIG-CONFIG_DESC = CONFIG_DATA-CONFIG_DESC.
    ZDAMPER_CONFIG-CONFIG_EXT_QTY = CONFIG_DATA-CONFIG_EXT_QTY.
    ZDAMPER_CONFIG-CONFIG_STATUS = CONFIG_DATA-CONFIG_STATUS.
    ZDAMPER_CONFIG-CONFIG_TYPE = CONFIG_DATA-CONFIG_TYPE.
    ZDAMPER_CONFIG-CONFIG_UFLD_1 = CONFIG_DATA-CONFIG_UFLD_1.
    ZDAMPER_CONFIG-CONFIG_UFLD_2 = CONFIG_DATA-CONFIG_UFLD_2.
    ZDAMPER_CONFIG-CONFIG_UFLD_3 = CONFIG_DATA-CONFIG_UFLD_3.
    ZDAMPER_CONFIG-CONFIG_UFLD_4 = CONFIG_DATA-CONFIG_UFLD_4.
    ZDAMPER_CONFIG-CONFIG_UFLD_5 = CONFIG_DATA-CONFIG_UFLD_5.
    ZDAMPER_CONFIG-CONFIG_VALID = CONFIG_DATA-CONFIG_VALID.
    ZDAMPER_CONFIG-CRT_TS = CONFIG_DATA-CRT_TS.
    ZDAMPER_CONFIG-CRT_USER_ID = CONFIG_DATA-CRT_USER_ID.
    ZDAMPER_CONFIG-PDCT_ID = CONFIG_DATA-PDCT_ID.
    ZDAMPER_CONFIG-PROSPECT_ID = CONFIG_DATA-PROSPECT_ID.
    INSERT ZDAMPER_CONFIG.
    ENDFUNCTION.

    Just declaring the return parameter is not enough. In your example you need to check the return code of the INSERT and populate the message parameter accordingly. Only then you'll get values in there.
    Regards,
    Michael

Maybe you are looking for