Can I force 400 return status after validation of input parameters

Hi
I am writing a web service to a spec which requires 400 bad request status replies under certain conditions. For example if a date that's sent as one of the parameters is incorrectly formatted. Is it possible in a RESTful GET method (ours are source type PL/SQL) to somehow force the listener to return a 400 response via an exception or something similar?
Thanks
Simon

I did find the solution. You can use X-APEX-STATUS-CODE to set this

Similar Messages

  • Validation of input parameters in Oracle BI Publisher reports

    Hi
    I am new to Oracle Bi Publisher.
    In my project i am using oracle BIPfor generating simple reports.
    here i need validation for input parameters (Date field) and i want to make it (Date field) disable, so that user can select the date through the Calendar component only.
    Can anyone please provide me the solution in detail, it is urgent.

    I have the same task to validate input parameters with Oracle BI Publisher 5.6.3 running under Oracle eBS 10.5.10.2. My validation goes beyond of what I can do during parameter registration. I am using Data Templates.
    My first logical place was the before report trigger. So, I built a report trigger which returns 'false' in case the parameters are not proper. Guess what... XMLP just returns a hard-coded message
    !!Error : trigger '" + datatrigger.getName() + "' returns status as 'false'
    First of all, this is a bad style to hardcode messages visible by the user (especially during French implementation). Second of all, it is not informative at all. It would be nice to change oracle.apps.xdo.dataengine.XMLPGEN.executeTrigger() to read, for example, a message from the message stack when the trigger returns 'false' and let the user read it.
    Anyway, what I did was I built a special data group, decalred before any other data group, query like
    select my_package.my_validation fro dual
    If parameters fail the validation my PL/SQL package throws an application exception with a message. At least, in this case the error message gets available as the description of the concurrent request.
    I wish the before report trigger worked!!!

  • How can I check the return status of a request using URLConnection?

    Hi,
    I am using the classes URL and URLConnection to connect to a remote server and make a POST request. The code extract is:
    URL u = new URL("http://.....");
    URLConnection con = u.openConnection();
    con.setDoInput(true);
    con.setDoOutput(true);
    con.setUseCaches(false);
    con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    DataOutputStream out = new DataOutputStream(con.getOutputStream());
    out.writeBytes(........);
    out.flush();
    out.close();
    Next, I would like to check the return status of my request. I need to see if the server returned status 200 (OK) or an error (e.g. 404). Is there a way to check this?
    If you are aware of another way I can achieve this whole thing I would be grateful if you could let me know.
    Thanks very much for your help!

    URLConnection doesn't have a getResponseCode
    method...
    But I found a link
    http://bugs.sun.com/bugdatabase/view_bug.do;:WuuT?bug_
    id=4191207
    that helped me found out that there is another class
    called HttpURLConnection:
    ((HttpURLConnection)conn).getResponseCode( )You should read the API:
    http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html#openConnection()
    "If for the URL's protocol (such as HTTP or JAR), there exists a public, specialized URLConnection subclass belonging to one of the following packages or one of their subpackages: java.lang, java.io, java.util, java.net, the connection returned will be of that subclass. For example, for HTTP an HttpURLConnection will be returned,..."

  • Can not change my bbm status after latest update

    Hi
    Please help
    After the latest update i can not update my bbm status
    The application jammed whrn i click on the status
    Plz help
    Aliaa

    Hello abyqshan and welcome to the BlackBerry Support Community Forums. 
    Sorry to hear you're having issue with your BBM.
    What is the software version to which you updated? 
    If you remove your battery then reinsert it, are you then able to change your status? Do you get any error when you go to change your status or does it just freeze? 
    -HMthePirate
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • DBMS_CUBE.BUILD return status

    Hi,
    using 11gR2, does anyone know how can one determine the return status of a DBMS_CUBE.BUILD() call, i.e., was the update successful and committed or unsuccessful and rolled back? (note that I'm using the atomic_refresh option).
    Thanks,
    Chris

    Hi David,
    Thanks for the answer. In fact what I did finally is, since I know in advance the time interval I'm loading, check that the particular cell for the very last time period is indeed loaded, e.g., using a request like this one:
      SELECT calls
          INTO result
          FROM cll_traffic_view  /* Cube view generated by AWM */
         WHERE datetime = 'HH' || to_char(end_hh, 'FM000000')
           AND vnumber = 'ALL'
           AND account = 'ALL'
           AND callstate = 'ALL';
        IF result > 0 THEN
          ... load successful
        END IF;
      Possibly not the most orthodox way of doing this but it seems to garantee the desired atomicity.
    Regards,
    Chris

  • When I try to log onto Icloud in Windows 7 64-bit using my Apple ID it says my Apple ID is valid but not an Icloud account.  I can't go anywhere with Icloud after that.

    When I try to log onto Icloud in Windows 7 64-bit using my Apple ID it says my Apple ID is valid but not an Icloud account.  I can't go anywhere with Icloud after that.

    Welcome to the Apple community.
    These types of messages often indicate a problem with the devices serial number, have you had your phone repaired at any stage or did you buy it second-hand.

  • Why is that i can not view my warranty status? whenever i tried to put my phone's serial number itunes prompt that my serial number is not a valid one. how can i solve this issue?

    why is that i can not view my warranty status? whenever i tried to put my phone's serial number itunes prompt that my serial number is not a valid one. how can i solve this issue?

    https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • I updated my ipad from IOS 5 to IOS 8. All games and apps that I downloaded was deleted. What can I do to return them back, even after downloading one of the games He deleded all the steps I went through and I need to start all over  again

    I updated my ipad 2from IOS 5 to IOS 8. All games and apps that I downloaded was deleted. What can I do to return them back, even after downloading one of the games He deleded all the steps I went through and I need to start all over  again

    iCloud: Restore or set up your iOS device from iCloud
    Or from iTunes  http://www.iphonefaq.org/archives/971992

  • When is Modbus.ini loaded and can you force to reload after?

    To effectively complete the Modbus disable task with the modbus.ini file entry "SkipImmediatePoll=1" and a high poll-rate time and/or a poll value of false, I need to know when the modbus.ini settings are loaded, and whether I need to restart any process with modbus objects, modify any running modbus object, restart lookout....etc. Also, can I force a reload programmatically? (suggestions welcome)
    Ed

    Review/Clarification for all those interested.
    I need a way to turn modbus device communication on and off within a running process, to avoid wasteful computer resources timing out on communication with disabled Modbus client devices.
    So we can enable "skipimmediatePoll" for [Modbus_X] in the Modbus.ini file and then set a very long poll-rate on tag Modbus_X. This, so far is the best way to minimize the lag at process startup so that working devices get polled much sooner.
    Why I ask if the Modbus.ini file is parsed whenever a Modbus object is modified, is to provide an easy method to turn the devices effectively on/off by just changing the poll-rate back to normal after editing the Modbus.ini file, all while the process remains running.
    Of course it would be
    nice if I could force the Lookout.ini reload without restarting processes, then I could reload the .ini file and dynamically change the poll-rate while the process remains running, effectively switching the client communications on/off when necessary. Even better, I could programmatically edit the .ini file, reload it (somehow) and modify the poll-rate, all within a running process.
    Basically, I need a way to reload modbus.ini settings without reloading a process. Alternatively, I could just load/unload a dummy process programmaticaly. I just need to verify the behavior of the modbus.ini file settings and existing/new modbus objects created/modified, knowing exactly when the settings get loaded for sure. For example, say I load a dummy process with no modbus objects in it. Will the .ini still reload? Will it affect modbus objects in already running processes whether the dummy process has or has no modbus objects within it?
    Thanks All for your interest and particip
    ation.
    Ed

  • Error - You Can only resubmit requisitions of status returned rejected

    HI All ,
    When I am trying to change the requisitions , I am getting this error message .
    You Can only resubmit requisitions of status returned rejected
    For newly created requisitions(which are having staus APPROVED ), and PO (Which are having status APPROVED) . I can able to change the requisitions .
    But when I am tryingto change the old requisitions means which are created an year ago that time I am gettign this error .
    Can u please help me what would be the reason and how to change the requisitiosn.
    Thanks
    sai

    964036 wrote:
    HI All ,
    When I am trying to change the requisitions , I am getting this error message .
    You Can only resubmit requisitions of status returned rejected
    For newly created requisitions(which are having staus APPROVED ), and PO (Which are having status APPROVED) . I can able to change the requisitions .
    But when I am tryingto change the old requisitions means which are created an year ago that time I am gettign this error .
    Can u please help me what would be the reason and how to change the requisitiosn.
    Thanks
    saiPlease see these docs.
    Unable To Change Or Complete Other Users Requisitions In ''My Group's Requisitions'' [ID 308882.1]
    Not Able To Change A Requisition Selected From Search Results [ID 332438.1]
    iProcurement FAQ: IPREQV Requisition Status [ID 135035.1]
    iProcurement FAQ for 11i: iProcurement Approvals and Workflow [ID 135613.1]
    Thanks,
    Hussein

  • I have been hacked and was forced to return to factory restore.  I want to RE-download my Adobe CC and I am not given permission how can I re download?

    my computer was hacked and I spent all day removing these viruses with no success, so I was forced to return to factory restore.  I am up and running again but need to re-download my adobe cc to my computer.  I am not given permission to do this apparently without opening a new account.  has anyone else had this problem?  how did you download your adobe cc without opening another account?

    Lorimarierose for information on how to reinstall the Adobe Creative applications included with your membership please see Creative Cloud Help | Install, update, or uninstall apps.

  • ODS Problem - Could not forcefully set the status of the request

    Hello GURUS!
      We encountered an error while activating an ods object:
    <i>"Request REQU_41H61CY8SUS7IX4787ARFXLOM (activation request ODSR_41I8ZUA35YKRALSBFPBB0GWZQ) is marked as incorrect for data package 000000 (DP 0 is the entry for the entire request, which is the only one to remain in the control table after successful activation)."</i>
    We tried to forcefully set the status to <b>green</b> as what we normally do when this happens but it still stays <b>red</b>.
    Need your help on this!
    Thanks,
    Jeffrey

    Hello JeFFreY,
    how r u ?
    You can delete that failed request, then check the PSA for errors, if errors are there delete the PSA data.
    Carry on a new data load with the option in the Scheduling screen -> PROCESSING tab as ONLY PSA. Now check the data for the errors and change it if error exists. Then give context menu on the request and select Start the Update Immediately. Now see in the ODS. what happens ?
    Best Regards....
    Sankar Kumar

  • JSF keeps displaying old values after Validation Phase fails

    Hi all,
    I would like to ask some help in understanding a particular behaviour that JSF shows when Validation Phase fails.
    I'm using:
    - Tomcat 7.0.2
    - JSF 1.2_12
    - RichFaces 3.3.3
    Problem description.
    I wrote a form with 4 input fields: an inputText and 3 selectOneMenu. The inputText is required while the selectOneMenus don't require any validation.
    Attached to the first selectOneMenu (row 32), is an a4j:support tag so that, whenever the change event is fired, the list of items of the second
    and the third selectOneMenu (row 44 and 58) are correctly filled (note that the mandatory of the inputText is ignored thanks to the ajaxSingle attribute).
    In particular, after loading the two lists of items, the actionListener forces the value of the second and the third selectOneMenu to null.
    This mechanism seems to work fine until I submit the whole form without filling the input text: as expected, JSF validation fails but if I change the value of
    the first selectOneMenu again (causing a new submit), the page keeps displaying the values specified before JSF validation failed for the second and the third
    selectOneMenu (note that the actionListener is still called and the values of the second and the third selectOneMenu are still forced to null).
    Since I'm using a simple PhaseListener, I noticed the following: before JSF validation fails, every time I change the value of the first selectOneMenu, JSF life
    cycle always calls the get method for the second and the third selectOneMenu during the Render Response Phase. In this way, JSF is able to "see" that
    those values have been set to null during the Invoke Application Phase.
    After validation fails, JSF stops calling those getters when I change the value of the first selectOneMenu.
    I hope my explanation was clear enough, thanks a lot for your help.
    Regards,
    Nico
    Web Page
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich">
    <head>
      <title>Prove Rich</title>
    </head>
    <body>
      <h2>Prove Rich</h2>
      <f:view>
      <a4j:outputPanel ajaxRendered="true">
        <h:messages style="color:red" />
      </a4j:outputPanel>
      <h:form>
      <p>
         Input required: <h:inputText value="#{provaProbReplyBean.inputRequired}" required="true" />
      </p>
      <p>
           <h:outputText value="Scegli il canale:" />
           <h:selectOneMenu value="#{provaProbReplyBean.canale}">
            <f:selectItem itemLabel="--" itemValue="" />
            <f:selectItem itemLabel="Profamily" itemValue="Profamily" />
            <f:selectItem itemLabel="Captive" itemValue="Captive" />
            <a4j:support event="onchange" action="#{provaProbReplyBean.caricaProcBanche}"
                                  ajaxSingle="true" reRender="procedure, banche" />
         </h:selectOneMenu>
      </p>
      <p>
           <h:outputText value="Scegli la procedura:" />
           <h:selectOneMenu id="procedure" value="#{provaProbReplyBean.procedura}">
            <f:selectItem itemLabel="--" itemValue="" />
            <f:selectItems value="#{provaProbReplyBean.procedureList}" />
            <!-- immediately save the current value -->
            <a4j:support event="onchange" ajaxSingle="true" />
         </h:selectOneMenu>
      </p>
      <p>
           <h:outputText value="Scegli la banca:" />
           <h:selectOneMenu id="banche" value="#{provaProbReplyBean.banca}">
            <f:selectItem itemLabel="--" itemValue="" />
            <f:selectItems value="#{provaProbReplyBean.bancheList}" />
            <!-- immediately save the current value -->
            <a4j:support event="onchange" ajaxSingle="true" />
         </h:selectOneMenu>
      </p>
      <p><h:commandButton value="Submit" /></p>
      </h:form>
      </f:view>
    </body>
    </html>
    Bean
    public class ProvaProbReply {
         private String inputRequired;
         private String canale;
         private String procedura;
         private String banca;
         private Map<String, List<SelectItem>> canaliProc = new HashMap<String, List<SelectItem>>();
         private Map<String, List<SelectItem>> canaliBanche = new HashMap<String, List<SelectItem>>();
         private List<SelectItem> procedureList = new ArrayList<SelectItem>();
         private List<SelectItem> bancheList = new ArrayList<SelectItem>();
         public ProvaProbReply() {
              List<SelectItem> l = new ArrayList<SelectItem>();
              l.add(new SelectItem("Cessione del quinto"));
              l.add(new SelectItem("Credito al consumo"));
              l.add(new SelectItem("Mutui"));
              canaliProc.put("Profamily", l);
              l = new ArrayList<SelectItem>();
              l.add(new SelectItem("Credito al consumo"));
              canaliProc.put("Captive", l);
              l = new ArrayList<SelectItem>();
              canaliBanche.put("Profamily", l);
              l = new ArrayList<SelectItem>();
              l.add(new SelectItem("BDL"));
              l.add(new SelectItem("BM"));
              l.add(new SelectItem("BPM"));
              l.add(new SelectItem("CRA"));
              canaliBanche.put("Captive", l);
         public String getInputRequired() {
              return inputRequired;
         public void setInputRequired(String ir) {
              inputRequired = ir;
         public String getCanale() {
              return canale;
         public void setCanale(String c) {
              canale = c;
         public String getProcedura() {
              System.out.println("\ngetProcedura called\n");
              return procedura;
         public void setProcedura(String p) {
              procedura = p;
         public String getBanca() {
              System.out.println("\ngetBanca called\n");
              return banca;
         public void setBanca(String b) {
              banca = b;
         public List<SelectItem> getProcedureList() {
              return procedureList;
         public List<SelectItem> getBancheList() {
              return bancheList;
         public String caricaProcBanche() {
              System.out.println("\nListener called\n");
              procedureList.clear();
              bancheList.clear();
              if(canale != null && !canale.equals("")) {
                   procedureList.addAll(canaliProc.get(canale));
                   bancheList.addAll(canaliBanche.get(canale));
              System.out.println("BEFORE setting:\n");
              System.out.println("\nProcedura: "+procedura+"\n");
              System.out.println("Banca: "+banca+"\n");
              procedura = null;
              banca = null;
              System.out.println("\n\n\nAFTER setting:\n");
              System.out.println("\nProcedura: "+procedura+"\n");
              System.out.println("Banca: "+banca+"\n");
              return "";
    }Edited by: 869000 on 28-giu-2011 14.05

    I'm thinking this has to do with the fact that the UIComponents use the localValue after validation fails. This prevents the values from being overwritten when re-rendering the page, i.e. the inputs keep the value set by the user.
    The solution is to manipulate the components directly during the AJAX request when the first pull down is changed. Use the binding attribute to place them into your bean and clear the value directly. That way it will not matter that the expression is not evaluated.

  • Wuauclt commands to force reporting of status?

    It seems that wuauclt /reportnow does not really seem to be doing anything even though it is supposed to make the clients report their status.  Is there anything that can be done to force an immediate status report?
    I also notice that wuauclt does not seem to display errors.  I can type wuauclt /detttecknow or wuauclt /klsdjlkfjds and it won't display an error.

    I have tried the wuauclt
    /reportnow command before and it does not seem to be doing anything that actually speeds up client reporting.
    It looks like they still report whenever they get around to reporting and running the command doesn't make it faster.
    The /reportnow function is a very tricky beast, and it somewhat requires an understanding of the natural behaviors of the WUAgent.
    When the WUAgent performs activities, it queues up all of those completed activities as 'events'. When the WUAgent quits working, an idle timer is engaged, and when the WUAgent has been idle for ~20 minutes, it invokes a call to the ReportingWebService.
    You can see these calls in the WindowsUpdate.log and compare their timestamps with the entries just previous.
    If the /reportnow action is invoked after the WUAgent becomes idle and
    before the regular call to the ReportingWebService, an immediate call to the ReportingWebService will be invoked. You can also see this in the WindowsUpdate.log.
    However, the call to the ReportingWebService is not the end of the line. Those events reported in that call are loaded into a buffer, and the WSUS server then processes those events asynchronously. If the WSUS server is also busy doing other things or other
    clients are also reporting at the same time, there will be an additional delay until the results are visible in the WSUS console.
    The real thing to remember is that, at best, the /reportnow task isn't going to save you much more than 20-30 minutes, so usually just waiting is the more efficient approach to the whole thing.
    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    Product Manager, SolarWinds
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

  • Return Status from RunCommand

    I am creating an operating system print command string on a Sun Unix box
    using enscript. When I submit the print string using RunCommand it works
    fine. However, if I specify a non-existant printer the RunCommand does
    not seem to provide any feedback to the TOOL code. I am using the
    ExitStatus attribute in OperatingSystem object to check. Is this a
    valid method for checking OS status?
    task.Part.OperatingSystem.RunCommand(command = runCommand, isSynchronous
    = TRUE);
    exitStatus = task.Part.OperatingSystem.ExitStatus;
    I have also added an exception handler to try to catch the condition. I
    am currently handling SystemException, FIleResourceException, and
    UsageException. None of these seem to get triggered when specifing an
    invalid printer name to the OS.
    Questions: (1) How can I return a status code from the OS to TOOL or at
    least detect the appropriate exception?
    (2) Is it possible to test for the existance of a network
    printer via tool code? For example could I ping the
    device and return a result?
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Gary
    I believe that the RunCommand does not return the OS Exitstatus to
    Forte. Attached to the RunCommand there are two parameters being
    stdfileout and errfileout. These files will capture the contents of
    stdout and stderr. When I call the OS via RunCommand, I append the
    following onto my command:
    lp fred;echo =$?=
    I then open and read the stdfileout and look for the string EOT =0=. If
    it is not there then my lp command did not terminate properly.
    This is not the cleanest thing in the world to do, but I know that it
    works. If anyone does know if you can trap the existstatus from
    RunCommand then I'd be really happy to find out about it.
    Michael Strauss
    Mazda Australia Pty Limited
    -----Original Message-----
    From: Gary Maxwell [mailto:[email protected]]
    Sent: Friday, 15 May 1998 1:00
    To: Eric Forte; [email protected]
    Subject: Return Status from RunCommand
    I am creating an operating system print command string on a Sun Unix box
    using enscript. When I submit the print string using RunCommand it works
    fine. However, if I specify a non-existant printer the RunCommand does
    not seem to provide any feedback to the TOOL code. I am using the
    ExitStatus attribute in OperatingSystem object to check. Is this a
    valid method for checking OS status?
    task.Part.OperatingSystem.RunCommand(command = runCommand, isSynchronous
    = TRUE);
    exitStatus = task.Part.OperatingSystem.ExitStatus;
    I have also added an exception handler to try to catch the condition. I
    am currently handling SystemException, FIleResourceException, and
    UsageException. None of these seem to get triggered when specifing an
    invalid printer name to the OS.
    Questions: (1) How can I return a status code from the OS to TOOL or at
    least detect the appropriate exception?
    (2) Is it possible to test for the existance of a network
    printer via tool code? For example could I ping the
    device and return a result?
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    This message has successfully passed virus checking.
    Mazda Australia takes every precaution to ensure email messages are virus free. For complete protection, you should virus test this message.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

Maybe you are looking for

  • Overcharged and cannot seem to get it sorted

    Hi, I hope somebody can help me! In July 2010 I was overcharged on my BT Bill so I called to cancel my account and was told that I could have BT Broadband option 1 and BT anytime call package for £19 per month for 12 months if I stay with BT, I was a

  • My itunes library on my ipod touch is different to my laptop, how do i transfer from my ipod to the laptop

    i have just updated the itunes on a laptop that is sharing my itunes. i ahve got an ipod touch and it has got different songs, etc on to the laptop, how do i transfer the library from the ipod to the laptop without loosing the entire library.

  • My sons passcode required on my phone

    I recently backup my sons iphone on my computer, now when I want to update the apps on my phone it is asking me for the passcode of my son app store Id. what can I do to solve this problem.

  • Setting column for filter function

    I've got the following code working for filtering data in a grid, but it's currently hard-coded to only filter on the "Character" column. (see the searchData function) I'm capturing the string for the column that should be searched in the filterColum

  • Windows Desktop Search 4.0 How do I Format the Date Column in the Results?

    Is there a way to modify the date column in the Results pane of Windows Desktop Search 4.0? It's running on a Windows 2003 Enterprise server. I have users that need to modify files that arrived today and yesterday after 5:00 PM.  The date column only