HTTP 414 Status code for POST messages greater than 4096 bytes.

Hello,
I am using Sun One 6.0 sp2 and Weblogic 6.1 sp3 for my application. All the requests
are being sent to the Weblogic server using the NSAPI plug-in.
For all POST messages with size greater than 4096 bytes, I am getting a HTTP Status
Code 414.
I have set the MaxPOSTSize to 10240 both on the Weblogic server side, but it still
gives same error.
Can someone please guide me as to how to enable processing of POST messages greater
than 4096 bytes ?
Thank You.
Sanjay.

Hi, I am trying to PUT to update contact info and I get following error:
2015-01-16 11:00:17,970 INFO [main] oracle.eloqua.connector.eloqua.EloquaConnector.putWithBasicAuth(97) | accessHttpsPut.url=https://secure.eloqua.com/API/REST/2.0//data/contact/7606838, text={"id":"7606838","accountName":"openIdStr001","emailAddress":"[email protected]","type":"Contact"}
2015-01-16 11:00:18,931 ERROR [main] oracle.eloqua.connector.eloqua.EloquaConnector.putWithBasicAuth(140) | ClientProtocolException
org.apache.http.client.HttpResponseException: Request is malformed.
Is there any idea?
Thanks so much.
Sincerely.

Similar Messages

  • HT1539 Why Do I keep getting an error message telling me "Code redemption is temporarily unavailable. Please try again later." whenever I try to redeem my digital copy code for "Oz The Great and Powerful"?

    Why Do I keep getting an error message telling me "Code redemption is temporarily unavailable. Please try again later." whenever I try to redeem my digital copy code for "Oz The Great and Powerful"?

    I had the same problem so I decided to try going to website on the back. (DisneyOzMovieandOffers.com). It will take you to a page that says to redeem code, enter the code that is given to you and click enter. It will give you options of where you would like to download it from. Click iTunes and it will give you the correct code to download the movie from iTunes.

  • AdControl error: HTTP error status code: NotFound (404)

    For over a week now, a Silverlight WP 8 app with an AdControl configured for "test_client" continues to report this error and thus no bing ad visible either while running from an emulator (8.1 512) or from a WP 8 device. If I change the AdUnit
    to use a PubCenter ID it works fine on the device and ads are displayed. The emulator connects to the Internet just fine via IE.
    Could the ad server not be responding to the "test_client"?
    Could someone let me know if it has worked recently for them? I tried contacting MS and no one seems to have an app configured with the test ad... I could give MS so many helpful suggestions. But looking at the hundreds of un-answered posts here - I
    suppose they're busy with Windows 10...and have they asked developers if they're willing to put up everything on the cloud? all the while people still waiting to see the 'start' button on Windows 9?
    here's the trace
    Ad Err: NetworkConnectionFailure,Microsoft.Advertising.Shared.AdException: HTTP error status code: NotFound (404) ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned
    an error: NotFound.
       at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
       at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClasse.<EndGetResponse>b__d(Object sendState)
       at System.Net.Browser.AsyncHelper.<>c__DisplayClass1.<BeginOnUI>b__0(Object sendState)
       --- End of inner exception stack trace ---
       at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
       at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at Microsoft.Advertising.Shared.HttpRequest.EndGetResponse(IAsyncResult asyncResult)
       at Microsoft.Advertising.Shared.WebRequestWrapper.WebRespCallback(IAsyncResult result)
       --- End of inner exception stack trace ---
    I do love Windows - don't get me wrong - I'll check my 2nd dev system soon.

    Hi Ravi,
    Reward points if this helps
    The J2EE server might be overburdened and cannot accept the call. The 'Receive'servlet is not called. You will find further details on the HTTP status code definitions under "http://www.w3.org". Check the accessibility of the server by calling: http://<hostname>:<port>/MessagingSystem/receive/AFW/XI.
    The Listener Beans of the affected connection (AFW, Marketplace, BC,see above) were not registered or the log-specific Event Handler was not found.
    Check out this trouble shooting guide for SAP XI...Section 7.4.4.4 talks about exactly the same problem:-
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bd5950ff-0701-0010-a5bc-86d45fd52283
    Reward points if this helps
    Regards
    Pragathi.

  • How do I set the response status code for a request in ADF?

    For example:
    I have a page accessible like page.jspx?id=$ID, in which $ID identifies an object stored in a database. The user navigates to page.jspx?id=abc. abc does not exist or has been deleted. I wish to set the response status code to 404 for the page request, like, for instance, https://docs.google.com/spreadsheet/ccc?key=abc does. How do I do this?
    PS: Changing the status code for subsequent partial submits on the page if the object is deleted while the user is on the page (e.g. if the user attempts to delete an already deleted object through a "Delete" button on the page) may also be desirable, but would probably not fit in as well with the ADF lifecycle or be as useful.

    Maybe I should be more specific about the current state of the code. It's something functionally similar in relevant portions to the following. For the purposes of this code, assume the ID maps only to a name, rather than a more complicated object:
    page.jspx looks like:
    <?xml version='1.0' encoding='utf-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
         xmlns:trh="http://myfaces.apache.org/trinidad/html" version="1.2">
         <jsp:directive.page contentType="text/html;charset=utf-8" />
         <f:view>
              <af:document binding="#{pageInitializer.dummyComponent}" title="#{pageData.name != null ? pageData.name : 'Object Not Found'}">
                   <af:outputText rendered="#{pageData.name != null}" value="#{pageData.name}" />
                   <af:outputText rendered="#{pageData.name == null}" value="No object was found at this URL." />
              </af:document>
         </f:view>
    </jsp:root>pageInitializer and pageData are pageFlow-scoped beans with the following code:
    class PageInitializer {
         @Inject private PageData pageData;
         @Inject private NameDao nameDao;
         @PostConstruct
         void initialize() {
              String name = nameDao.getNameById(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("id"));
              if (name != null)
                   pageData.setName(name);
              else
                   // TODO: Set status code 404
         public void setDummyComponent(UIComponent dummyComponent) {
         public UIComponent getDummyComponent() {
              return null;
    public class PageData {
         private String name;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
    }The code initializes the data from the database through the initilaizer of a pageFlow-scoped bean with a dummy setter for the document because I read somewhere that that would work, and it seems to work, even though it seems hacky.
    Ideally, the code would render the 404 where it currently says (// TODO: Set status code 404). I realize this may not even be possible given the current architecture, because part of the response body has already been rendered, and I believe, but cannot find a source to cite, that the status code and headers cannot be set after the body has started being rendered. Is there any architecture that would get me this page's functionality (even if it's two JSPXs on the backend (which might be ideal)) and be able to render a 404 for an inexistent object?
    Edited by: 907794 on Feb 1, 2012 3:55 PM
    Edited by: 907794 on Feb 1, 2012 3:58 PM

  • Firefox 3.6.3, windows 7 HP,flash player 10.1.53.64---unexpected http response-status code 13030--

    windows 7 HP, Firefox 3.6.3,flash player 10.1.53.64--unexpected HTTP response-status code 13030- any idea on what to do?
    == URL of affected sites ==
    yahoo mail

    Same problem here! Actually took me quite awhile to figure out what the hell was causing the slight screen flicker when going on Youtube, but I'm confirming this. With Hardware Acceleration enabled, Flash changes GPU Memory (VRAM) frequency and locks it so that it can't be changed until the video page is closed. Mine downshifts from 950 down to 500, which is quite of an achievment as for some reason this card with it's fancy schmancy GDDR5 memory isn't too keen on underclocking the VRAM..
    Hardware:
    CPU: Intel Core 2 Quad Q6600 2,4Ghz @ 3 Ghz
    RAM: 4GB A-Data 800mhz
    GPU: ATI Redeon HD 4870
    GPU  clock settings:
    - GPU: 790 MHZ/ default 750 MHZ
    - VRAM 950  MHZ/ default 900 MHZ
    MB: MSI P35 Neo Combo
    Software:
    OS: Windows  7 Ultimate x64
    Browser:    Firefox 3.6.3 and it's speedy variant Pale Moon (http://www.palemoon.org)

  • ESW: Status Codes for ECC_QUALITYISSUENOTPEQR  needed

    Hi,
    I am trying to find the status codes for "ECC_QUALITYISSUENOTPEQR" (QualityIssueNotificationProductByElementsQueryResponse_In). There are two fields that are mandatory - "ReleaseStatusCode" and "ClosureStatusCode" where I have no idea what the values are. I know they have a max length of 2 but I can't find any indication of what they are. I've looked in the ESWorkpace (Transaction QM3 and QM11)  but I am not any better off.
    Unfortunately, the <a href="http://erp.esworkplace.sap.com/socoview(bD1kZSZjPTgwMCZkPW1pbg==)/smdisplay.asp?id=665EFEC3172948B0A6246B92B7DA3227&fragID=&packageid=DBBB6D8AA3B382F191E0000F20F64781&iv=">documentation</a> and the <a href="https://wiki.sdn.sap.com/wiki/display/ESpackages/FindQualityIssueNotificationProductbyElements">wiki</a> have no additional information.
    Can anyone help me?
    Thanks.
    Dick

    good idea to blog about, I somehow became tired of raising the issue over and over again here and elswhere.
    in this context you could also, ask why SAP doesn't support enumerations. in case you don't know what that is, have a short look at <a href="http://de.wikipedia.org/wiki/XML_Schema">wikipedia</a> and search for enumaration. you might quickly see that his could automatically solve your (and others) problems. finally one could ask why they don't support annotations. an example can be found <a href="http://www.xmlschemareference.com/annotationElement.html">here</a>.
    given the possibilities of enumerations and annotations one would never face the issue you stumbled upon, one could avoid wrong inputs already on the consumer side and so on...I think I do not have to elaborate it further, it is no rocket science.
    regards,
    anton

  • Error in java code for removing messages from a Topic

    Trying to write a code using oracle.jms package to remove messages from Topic. I have a similar code with javax.jms package for removing messages from Queue and it is working well. Whereas i have written this new code for removing messages from topic using oracle.jms package as methods like CreateBrowser and CreateTopicReceiver for topic are provided in oracle package only and can't be used from javax.jms package.
    Error i am getting is JMS-126: Invalid Topic specified at
             receiverTopic   = (Topic) ctx.lookup(((String)receiverProps.get( "Q_NAME")).trim()  );
             System.out.println ("receiverTopic is[" + receiverTopic + "]");
             MBeanHome home = (MBeanHome) Helper.getAdminMBeanHome("username","pwd","url:port");
             ((AQjmsSession)topicSession).grantSystemPrivilege("MANAGE_ANY", "SA", true);
             for(Iterator i = home.getMBeansByType("JMSTopic").iterator();i.hasNext(); )
              WebLogicMBean wmb = (WebLogicMBean)i.next();
              System.out.println("topic name found: " + wmb.getName());
                topicBrowser   = ((AQjmsSession) topicSession).createBrowser(receiverTopic, "Edin");topic handle which i am receiving in receiverTopic is same as what i am expecting but still it says Invalid topic specified on createBrowser method. Anyone who can help me to write this type of code, please reply. If anyone has ready code for this situation, please reply with the same as i am working on a prodcution system and we are in serious situation to resolve this problem.

    Hi,
    I am afraid this is impossible. You need to find another solution like a filtering queue. Your messages can be sent to a queue that is monitored by let say a MDB. This MDB will maintain a map of title and only forward once a given title/message to your topic.
    Hope it helps.
    Arnaud
    www.arjuna.com

  • The code segment cannot be greater than or equal to 64K. - Windows 8

    Hello,
    I am having an issue on some windows 8 systems, a crash occurs in NtSetEvent, the exception thrown is "0x000000C8: The code segment cannot be greater than or equal to 64K.".
    This crash only occurs on Windows 8.
    The callstack doesn't help much
        KERNELBASE.dll!_RaiseException@16()    Unknown
        ntdll.dll!_NtSetEvent@8()    Unknown
        kernel32.dll!@BaseThreadInitThunk@12()    Unknown
        ntdll.dll!__RtlUserThreadStart()    Unknown
        ntdll.dll!__RtlUserThreadStart@8()    Unknown
    Could it be a bug within windows 8 ? If not what steps should I take to find the cause of this crash ?
    Thank you,
    Max

    I have a feeling like you have corrupted something.  Likely by stomping on memory due to a bug in your program such as a buffer overrun or use of a deleted object in C++.
    Although you may have incurred corruption to your registry through a variety of means, not limited to bad disk drives, or the unintentional write of bad data due to a bug in your program, if you are experiencing this on multiple systems, then registry corruption
    is less likely.  Which brings me back to the idea that you have a bug in your code that has trashed memory somehow.
    The stack traces and error codes do not indicate the cause of the problem.
    What does your program do??
    Without seeing at least some of the code, or knowing how big the scope of the code is, it's not useful for me to start guessing specifics of what may have happened.  But since you're not disclosing anything at all about your code apart from your exception,
    I'm forced to do some guesswork and just give general advice.
    Here are some easy classical strategies for locating the cause of the problem:
    Build your code in debug mode and run your code in the debugger.  (Yes, some people need to be told this.)
    Bisect the problem through revision control.  Back up to when the problem didn't happen and find the last revision that causes the problem.  (If you're not using a revision control system, start now.)
    Bisect the problem by eliminating chunks of code.  Trim out functionality until the problem goes away.
    Write unit tests.  Test the various pieces of your program to eliminate bugs.  At the very least, make use of assertions.
    Have a look at what your program is DOING when the crash happens.  Certainly there must be a cause.  Try to isolate the problem by associating it with a certain activity in your program.  Gate off functionality by introducing places where
    your program waits before proceeding.  At some point, you'll pass a point where the error can now occur.
    Run code analysis on your project and see if it comes up with any possible culprits.
    Don't ignore compiler warnings, they often indicate something that can turn into a bigger problem.  Compile at the highest warning level.
    Look at your usage of various API functions for logical mistakes.  Here are some examples:
    When using third party libraries or SDKs, have you initialized libraries appropriately?  Have you called all the appropriate initialization functions and used the APIs as intended?  Read documentation and make sure you are using calls appropriately.
    For functions that take a HANDLE, such as SetEvent, are you passing a valid handle?  Have you closed the handle but kept the old handle value around?
    When storing pointers to objects, have you accidentally deleted an object but kept its pointer around, only to make use of the pointer at a later time in your program?  This is particularly harmful when performing a write operation as you can corrupt
    just about anything.
    Are you using variables without giving them an initial value?  You may get unexpected values for variables if you do not initialize them.  This is particularly important for stack variables.
    When using arrays or string buffers, have you allocated enough storage for the bytes you are writing?  C++ doesn't detect reading or writing with an invalid array index as a problem.  It happily reads or writes past the end of your intended
    storage.  Such offences are called "buffer overruns".
    When multi-threading, are you taking steps to ensure data integrity?  Unsynchronized access to data from multiple threads is a notorious cause of strange and difficult to reproduce bugs.  Your data passes through states that you may not expect
    that can be observed by unsynchronized threads.  Use locking mechanisms appropriately and marshal your data diligently.
    Are you relying on valid input from an external source beyond your control such as a network client, database, or file?  Diligently validate all input that comes from an external source.  Be prepared for any situation that you can't control at
    compile time.
    Are you ignoring error codes?  Some functions may fail, but you may be assuming they have succeeded and then gone on to use invalid data.
    Look for mathematical errors.  Calculation of indices of arrays are a notorious culprit.  Beware of off by one errors.  Indices start at zero and go up to N-1, where N is the number of elements in the array.
    Beware of sentinel values.  Some functions such as "IndexOf" will return an index of -1 when not found and can result in a miscalculation of an actual index.
    Are you making use of
    RAII techniques in your code?  Failing to correctly allocate and deallocate resources can cause problems.
    Are you making use of unsafe casts?  C-Style casts say "I know what I'm doing", and you can get into dangerous situations.  Prefer static_cast<> over a C-Style cast wherever possible.
    Also look at your project settings for problems
    Have you accidentally mixed incompatible compiler settings between components?
    Approach debugging with an open mind.  Mark Twain said, "It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so."

  • Recieve a value and search for a value greater than item

    is this code correct if i wanted to recieve a single argument item and search the list for a value greater than item
    public boolean greaterFound(Comparable item)
         int index = 0;
      while (index < numItems && listItems[index].compareTo(item) != 0)
          index++;
      return ((index-1) < (index));
    }

    Okay here are all the errors piece by piece.
    public boolean greaterFound(Comparable item)
         int index = 0;Well to start with this is not an error per se. But I would just return true if I found a match and false otherwise. There may be some who think that is terrible... I disagree.
      while (index < numItems && listItems[index].compareTo(item) != 0)What is numItems?
    That if is shady.
    What you are checking for is flat out wrong.
          index++;I'd be returning true here
    return ((index-1) < (index));This is just nonsense. As it stands will always return true and invalidates the rest of your code.

  • Code of a method longer than 65535 bytes...

    I am working with Tomcat32. I made a taglibrary(that includes just one tag, for testing) and implemented the tag in java (a simple one, it's just writing a text). I put that tag into a JSP page and when I go to that page, the tag displays a text on the screen. Everything works just fine, but if I have a greater number of tags inside the JSP(about 170), then I get an error message. Tomcat makes the .java -file, compiles it to the .class file, and then just before displaying the text, I get the following err.msg: "Code of a method longer than 65535 bytes..." Thanks for any help I get ! Bye, Nico

    The code of a method cannot longer than 65535 bytes, but note that in
    http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html
    the attribute length field is specified as four bytes:
    u4 attribute_length;
    You can demonstrate this for yourself with a program I recently posted here
    http://forum.java.sun.com/thread.jspa?threadID=603213
    by changing the num_calls from 5000 to 50000 .
    The error will look like:
    Exception in thread "main" java.lang.ClassFormatError: a1000000000 (Code of a me
    thod longer than 65535 bytes)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
    at maxperm_cltest$MyLoader.doClass(maxperm_cltest.java:303)
    at maxperm_cltest.main(maxperm_cltest.java:282)
    I note that repeatedly calling a no-arg void method is only four bytes per call. Your example, compiled by Sun's javac, would only consume about 50 bytes for the code and 100 bytes in the class file overall.

  • Code of a method longer than 65536 bytes

    I just moved my web application (jsp/servlets, no EJB) from apache tomcat to Oracle 9iAs Container for J2EE (OC4J). Everything is working fine except one jsp file, called "EditTmpForm.jsp". Basically, this jsp file is used to update existing records, so it needs to first retrieve the data from the database by using the primary keys. I used a java bean to handle the JDBC/SQL code and plugged that bean into the jsp file. The jsp works fine on tomcat, but when I run it on OC4J, I got the following error:
    500 Internal Server Error
    Error parsing JSP page /pirs/jsp/EditTmpForm.jsp
    Error creating jsp-page instance: java.lang.ClassFormatError: jspPage19jsp_EditTmpForm.jsp (code of a method longer than 65536 bytes)
    Why does it give me this error? 65536 bytes is only 64k, which can be stored in a floppy disk.
    Thank you very much if you can give me some idea why this occurs.
    James

    I looked at the code after a jsp compiled to a servlet. The
    jspService method of "EditTmpForm.jsp" is about 801 KB. But for another jsp "EditOperation.jsp", the  jspService method is about 236 KB.
    Both are much greater than 64 K, but why it runs okay for "EditOperation.jsp" but gives me error for "EditTmpForm.jsp"?
    Furthermore, since the HTML form is long, so the HTML code itself is bigger than 64 K, how can you prevent your _jspService method so that is is shorter than 64K?
    Thanks for your help!
    James

  • HTTP Response Status Codes: GET (retrieve), POST (create), PUT (modify), and DELETE (REST, Bulk, Any API)

    Many of us, who are starters, starting to wonder when reading any API documentations or starting out with your first program built to make any of the API calls, what do all error codes means, when I get many different types of response from running the program/script. The only reason I thought about sharing this is because I know how motivation plays a key role when dealing with Eloqua platform and building components on top. This extends the functionality beyond what is already out of the box.
    I put together a table that explains these in details. I hope you can benefit in resolving issues as you venture in your journeys. This is a very common chart that can be seen across many platform REST APIs. Idea was to have it here because the audience are not always the same.
    Response Code
    HTTP Operation
    Response Body Contents
    Description
    200
    GET, PUT, DELETE
    Resource
    No error, operation successful.
    201 Created
    POST
    Resource that was created
    Successful creation of a resource.
    202 Accepted
    POST, PUT, DELETE
    N/A
    The request was received.
    204 No Content
    GET, PUT, DELETE
    N/A
    The request was processed successfully, but no response body is needed.
    301 Moved Permanently
    GET
    XHTML with link
    Resource has moved.
    303 See Other
    GET
    XHTML with link
    Redirection.
    304 Not Modified
    conditional GET
    N/A
    Resource has not been modified.
    400 Bad Request
    GET, POST, PUT, DELETE
    Error Message
    Malformed syntax or a bad query.
    401 Unauthorized
    GET, POST, PUT, DELETE
    Error Message
    Action requires user authentication.
    403 Forbidden
    GET, POST, PUT, DELETE
    Error Message
    Authentication failure or invalid Application ID.
    404 Not Found
    GET, POST, PUT, DELETE
    Error Message
    Resource not found.
    405 Not Allowed
    GET, POST, PUT, DELETE
    Error Message
    Method not allowed on resource.
    406 Not Acceptable
    GET
    Error Message
    Requested representation not available for the resource.
    408 Request Timeout
    GET, POST
    Error Message
    Request has timed out.
    409 Resource Conflict
    PUT, PUT, DELETE
    Error Message
    State of the resource doesn't permit request.
    410 Gone
    GET, PUT
    Error Message
    The URI used to refer to a resource.
    411 Length Required
    POST, PUT
    Error Message
    The server needs to know the size of the entity body and it should be specified in the Content Length header.
    412 Precondition failed
    GET
    Error Message
    Operation not completed because preconditions were not met.
    413 Request Entity Too Large
    POST, PUT
    Error Message
    The representation was too large for the server to handle.
    414 Request URI too long
    POST, PUT
    Error Message
    The URI has more than 2k characters.
    415 Unsupported Type
    POST, PUT
    Error Message
    Representation not supported for the resource.
    416 Requested Range Not Satisfiable
    GET
    Error Message
    Requested range not satisfiable.
    500 Server Error
    GET, POST, PUT
    Error Message
    Internal server error.
    501 Not Implemented
    POST, PUT, DELETE
    Error Message
    Requested HTTP operation not supported.
    502 Bad Gateway
    GET, POST, PUT, DELETE
    Error Message
    Backend service failure (data store failure).
    505
    GET
    Error Message
    HTTP version not supported.
    Hope this helps. Original post: REST API Status Codes and Complete REST API Tutorial with Status Codes.
    Thank
    Amit

    Hi, I am trying to PUT to update contact info and I get following error:
    2015-01-16 11:00:17,970 INFO [main] oracle.eloqua.connector.eloqua.EloquaConnector.putWithBasicAuth(97) | accessHttpsPut.url=https://secure.eloqua.com/API/REST/2.0//data/contact/7606838, text={"id":"7606838","accountName":"openIdStr001","emailAddress":"[email protected]","type":"Contact"}
    2015-01-16 11:00:18,931 ERROR [main] oracle.eloqua.connector.eloqua.EloquaConnector.putWithBasicAuth(140) | ClientProtocolException
    org.apache.http.client.HttpResponseException: Request is malformed.
    Is there any idea?
    Thanks so much.
    Sincerely.

  • How to Implement HTTP Request Status Code Processing

    I actually have two questions. First, I wondering how to add multiple status code processing to an http request. Secondly, I was wondering how to go about using alternate http requests to different servers in case the primary server is down. What kind of parameter would the program use to determine that the server is unavailable and switch to another server??
    Currently, the program I've written calls an rdf server (http://www.rdfabout.com/sparql) using a sparql query,
    the server returns an xml string, the program parses it, and calculates numbers
    from the string. The program works, but the problem is that the server is down occasionally.
    When the server is down, we need to add calls to another server to
    increase reliability. So, the next task is to call this server:
    http://www.melissadata.com/lookups/ZipDemo2000.asp
    I need to do exactly the same things I did with the rdf server. The
    difference will be constructing a request and a bit different parsing of
    the response.
    current SPARQL query is defined as follows:
    PREFIX dc:  <http://purl.org/dc/elements/1.1/>
    PREFIX census: <http://www.rdfabout.com/rdf/schema/census/>
    PREFIX census1: <tag:govshare.info,2005:rdf/census/details/100pct/>
    DESCRIBE ?table WHERE {
    <http://www.rdfabout.com/rdf/usgov/geo/census/zcta/90292> census:details
    ?details .
    ?details census1:totalPopulation ?table .
    ?table dc:title "SEX BY AGE (P012001)" .
    }current HTTP Request is defined as follows:
    import java.net.*;
    import java.net.URL;
    import java.net.URLConnection;
    import java.io.*;
    import java.io.DataOutputStream;
    import java.io.BufferedReader;
    import java.io.StringReader;
    import java.io.InputStreamReader;
    import java.io.PrintStream;
    import java.util.Scanner;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    import java.util.Arrays; 
    public class MyConnection
         static Scanner sc = new Scanner(System.in);//allows user to input zipcode
        public static void main(String[] args) throws Exception
             int zip;//zipcode is declared as integer format
            //User defines zip through input
            //proceed to put SPARQL query into string, which is then used to call the server
            String requestPart1 =
            "query=PREFIX+dc%3A++%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E+%0D%0APREFIX+census%3A+%3Chttp%3A%2F%2Fwww.rdfabout.com%2Frdf%2Fschema%2Fcensus%2F%3E+%0D%0APREFIX+census1%3A+%3Ctag%3Agovshare.info%2C2005%3Ardf%2Fcensus%2Fdetails%2F100pct%2F%3E+%0D%0A%0D%0ADESCRIBE+%3Ftable+WHERE+%7B+%0D%0A+%3Chttp%3A%2F%2Fwww.rdfabout.com%2Frdf%2Fusgov%2Fgeo%2Fcensus%2Fzcta%2F";
            String requestPart2 = "" + zip; // zipcode is transformed from int to string format and plugged into SPARQL query here
            String requestPart3 =
            "%3E+census%3Adetails+%3Fdetails+.+%0D%0A+%3Fdetails+census1%3AtotalPopulation+%3Ftable+.+%0D%0A+%3Ftable+dc%3Atitle+%22SEX+BY+AGE+%28P012001%29%22+.+%0D%0A%7D%0D%0A&outputMimeType=text%2Fxml";
            String response = "";
            URL url = new URL("http://www.rdfabout.com/sparql");//designates server to connect to
            URLConnection conn = url.openConnection();//opens connection to server
            // Set connection parameters.
            conn.setDoInput (true);
            conn.setDoOutput (true);
            conn.setUseCaches (false);
            // Make server believe we are form data…
            conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
            DataOutputStream out = new DataOutputStream (conn.getOutputStream ());
            // Write out the bytes of the content string to the stream.
            out.writeBytes(requestPart1 + requestPart2 + requestPart3);
            out.flush ();
            out.close ();
            // Read response from the input stream.
            BufferedReader in = new BufferedReader (new InputStreamReader(conn.getInputStream ()));
            String temp;
            while ((temp = in.readLine()) != null)
                 response += temp + "\n";
            temp = null;
            in.close ();
            //parsing stuff is taken care of after here
    }What remains now is to:
    1) add status code processing: notify if the server is not available, ect.
    2) add ability to connect to additional server if primary server is down.
    I'm thinking an if/else statement, which I've tried a few different ways,
    but I don't quite know how to implement that...Also trying to add the
    status code processing/error handling, but I'm not sure how to do that
    for multiple/different errors, such as 404, 503, 504, ect.. try/catch statements?
    So yeah, just been scratching my head on this trying to figure out how to work it..
    If you can help me out on this, I've been going nuts trying to figure this out...

    I think your issue comes form the fact that you are not casting URLConnection to HttpURLConnection.
    Doing the cast would allow you to use getResponseCode() - among other methods - and test for a response different than 200.
    Read: [http://mindprod.com/jgloss/urlconnection.html|http://mindprod.com/jgloss/urlconnection.html]

  • How to update Business place & Section Code for posted Documents

    Hi,
    I want to update business place and section code in existing documents, How to update business place and section code in the posted Documents. Is there any validation to check business place and section code while posting Document.
    Thanks in advance
    Best Regards
    Raj

    Hi Raynaju,
    Business place is an organizational unit and  it below company code level that is primarily used for reporting taxes on sales/purchases.
    For that no need to go for validation.Go to the field status and give the Business place & Section Code as required fields.
    There is a option in SAP as Document change rules.There give the company code,field name and account type
    Now you can change the fileds in posted document itself.
    May be this information is useful to you
    If you have any doubt feel free to ask
    Regards
    Aneesh
    Edited by: Aneesh kumarA on Jul 22, 2009 12:45 PM

  • Transcation code for error messages

    hi all,
    what is the transaction code for getting the system error messages?And how can I create my own error messages?
    for eg: in a program, i want to show an error message to the user when the data is not showing up properly.
    thnx,

    Hi Sey Ni,
    <i>what is the transaction code for getting the system error messages?</i>
    Transaction code :- St22 
    For Short dumps and system errors
    <i>And how can I create my own error messages?</i>
    Transaction code :- Se91
    To check ny Existing 1 :-
    Message class - XS 
    Message Number - 001
    To create ur Own
    Create a Message Class ex:- Zmsg , click on Message tab
    here u can give message in front of number assigned say 001.
    check the following link:-
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/801b3e454211d189710000e8322d00/frameset.htm
    U can call this message in ur ABAP program as under:-
    if sy-subrc = 0.
    MESSAGE <b>E</b>001(<b>zmsg</b>)."
    endif.
    E - Error message.  I - Information message.   S - Sucess message...
    001 - Msg. Number.
    Zmsg - Message Class.
    Press F1 for more help on message.
    Regards
    Sachin Dhingra

Maybe you are looking for

  • Sliding panel

    I'm trying to modify the horizontally sliding panel to be side by side instead of top and bottom, I was able to make it work on firefox and safari, but it doesn't on internet explore, can somebody help me please.Thanks

  • Can't Edit Text in Card

    I did a search but couldn't find any info. I'm trying to create a card in iPhoto, which I've done before but its not letting me edit the text in the card. I can highlight the standard text thats already there but when I type, it doesn't do anything.

  • Override databse connection in CR Server 11

    Post Author: NickT CA Forum: Data Connectivity and SQL We have a report which calls a stored procedure with parmaters using SLQ Server 2000. One of the parameters is an indicator for an update. The stored procedure is structured as follows UpdateYN a

  • PSE 4.0 Compatibility with CS3?

    Simple question from a newbie. . . Are .psd files from CS3 downward comaptible with PSE 4.0?

  • All accordion panels closed on page load?

    The default behaviour for a set of accordion panels is for the first one to open automatically when the page firsts loads. Is there a way to stop this happening and have them all closed by default? regards, Adrian