HTTP Response Header code and message

Hi all, i have a web service that return a JSON file, the scenario is syncronous like this: HT(CALL,SYNC) - Handover - dynamic
Hi have the need to change the defaul behavior of the response headers, for example i whant to return:
404 Not Found - ID not found.
in my last atom i have this payload:
xsl:attribute name="pltype">json</xsl:attribute>
<io xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="json" xsi:schemaLocation="urn:com.sap.b1i.bizprocessor:bizatoms json_pltype.xsd">
Where i can force the response to have a custom response code and message ?
Thank you all

I'm not sure if I got you right. Do you want to have another signature for printinfo()?
The solution then is:
public static void printinfo(String urlString) throws IOException, MalformedURLException {
  URL url = new URL(urlString);
}

Similar Messages

  • Error in Webservice Call HTTP error (return code 404, message conn failed)

    Hi
    We wish to call  a standard EP7 webservice through ABAP.
    When we try to create consumer proxy , we get the following error.
    HTTP error (return code 404, message "conn failed")
    Message no. SPRX090
    ==> Display Error Document
    If you want to generate a proxy for an external WSDL document by specifying a URL, check that the proxy settings of the system are correct (transaction SICF - Client - Proxy Settings). If you want to generate a proxy for an XI Repository object, check the connection to the Enterprise Services Builder as follows:
    Check List for Setting Up a Connection to the Service Repository
    1. The address of the Enterprise Services Repository must be known in the SAP system
    Check with report SPROX_CHECK_IFR_ADDRESS
    The address is taken from the following parameters in the exchange profile ('Connections' section):
    com.sap.aii.connect.repository.name: Server (for example,pwdf0436)
    com.sap.aii.connect.repository.httpport: Port (for example, 1080)
    com.sap.aii.connect.repository.contextroot: Root (for example,rep)
    The logon data is also read from the exchange profile ('ApplicationSystem' section):
    com.sap.aii.applicationsystem.serviceuser.name: User
    com.sap.aii.applicationsystem.serviceuser.pwd: Password
    As an alternative to using the exchange profile, you can maintain the RFC destination SAP_PROXY_ESR. If this RFC destination is maintained it will be used by the proxy generation in place of data from the exchange profile to access the Service Repository. In this case, the Exchange Profile will even not be read.
    The RFC destination has to be set up using transaction SM59 and should look like this:
    RFC Destination: SAP_PROXY_ESR
    Connection Type: G (HTTP Connection to External Serv)
    Description1: ESR for Proxy Generation
    Target Host: esr_host
    Service No: 1080
    Path Prefix: rep
    Logon and Security:
    Basic Authentication: active
    User: esr_user
    Password: esr_password
    2. The HTTP Framework of the Web Application Server must function
    Check with report SPROX_CHECK_HTTP_COMMUNICATION
    If necessary, contact your system administrator. Please be aware of the fact, that the HTTP framework is depending on the application server. Thus the result of the report may differ for different application servers.
    3. Proxy generation must interpret the data of the Enterprise Services Repository correctly
    Check with report SPROX_CHECK_IFR_RESPONSE
    you can also login in dev and go to Xn se91
    enter msg id SPRX and msg no 090
    select the message and click on long text..
    you get the same message in a formatted manner..
    How to get rid of this ?
    Regards
    Rajendra

    Hi
    we have given the correct path as we have tested the webserive from
    other technology (.net) by providing the same path.
    regards
    Rajendra

  • Where can find Oracle error code and message?

    Where can find Oracle error code and message?

    http://otn.oracle.com/pls/db92/db92.to_toc?pathname=server.920%2Fa96525%2Ftoc.htm&remark=docindex
    That would be the "Error Messages" manual.

  • 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)

  • Oracle List of Error codes and messages

    Hi,
    In our application we are planning to use sqlloader to load a huge amount of data into the database. However, to parse the log file we need a list of Oracle error codes and messages that are commonly encountered while loading data using sqlloader. Does anyone know where to get such a list?
    Thanks

    In our application we are planning to use sqlloader to load a huge amount of data into the database. However, to parse the log file we need a list of Oracle error codes and messages that are commonly encountered while loading data using sqlloader. Does anyone know where to get such a list?I don't know where to get such a list, but for a start you could search the log for the words "Error" and "ORA-"

  • Oracle Error Code and Message for Query Timeout

    Hi,
    I need to catch the oracle error code and message for query timeout.
    I am using Oracle 9i and could not find any relevant error code/message
    for query timeout in Oracle Error Messages.
    If anyone has encountered such error messages, please let me know the
    Oracle Code or Error message.
    Thanks & Regards,
    Kanjana

    Fly is correct in that Oracle will normally let a query run forever in the absense of a user profile or dbms_resource setting that limits a users (query) resouce usage.
    The errors returned for these condition would probably vary but errors ORA-02092 "exceeded session limit on CPU usage, you are being logged off" and ORA-02093 "exceeded call limit on CPU usage" might be of interest.
    But for distributed queries Oracle does impose a time limit. See Oracle error ORA-02049 "timeout: distributed transaction waiting for lock"
    HTH -- Mark D Powell --

  • HT1277 Mail has gone crazy. Header's and messages are mixed up. New Mac Book Pro. Migrated files from Time machine running snow leopard. Reinstall or new computer needed?

    Mail has gone crazy. Header's and messages are mixed up. New Mac Book Pro. Migrated files from Time machine running snow leopard. Reinstall or new computer needed?

    Ok; I'm not sure what you're doing.    36 hours is rather long.  Seems like a new migration.  Not what I intended.
    Here's what I intended: from the newly-migrated and apparently-corrupt environment, create a new user, not related to any existing user, nor any migration-created user, or any other user for that matter.  That is, use  > System Preferences > Users and Groups, authenticate yourself by clicking on the padlock, and then click the + and create a wholly new user.  Then log in under that user and establish the mail access.
    36 hours?  I'm wondering if there's an error or an exceedingly slow network here?  Or a really, really slow disk?  Or a sick backup?  (WiFi isn't the path I'd usually choose, either.)
    Failing the attempted second migration, I'd try a different tactic.  Does your existing (old) system work?   If so, I'd bypass the backup and connect an external (scratch) USB disk drive to the (old) sstem and then boot and use Disk Utility booted from the installer DVD disk or boot and use Disk Utility from the recovery partition or booted from a recovery partition created on some other external storage (details here vary by the OS X version and what hardware you have), and perform a full-disk backup of your original internal disk to (scratch) external storage.  (Make sure you get the source and target disks chosen correctly here; copying the wrong way — from the scratch disk to your existing disk — will clobber your data!)  In esssence, this will clone your existing boot disk.  Then dismount the (formerly-scratch) external disk, transfer it over to the new system, and use it as the source of the migration, by performing a fresh OS X installation on the new system.
    Target Disk Mode is also sometimes an option for accessing the disk for a migration, but that requires the right cable, and requires systems that have the same external connection; newer MacBook Pro systems use Thunderbolt for this, and older systems tend to use FireWire.  And I'm guessing you don't have compatible hardware.
    The details here can and do vary by your OS X versions and your particular Mac systems — if you'll identify the specific models and hardware, somebody might be able to better tailor the above (fairly generic) sequence to your particular configuration.

  • HTTP error (return code 400, message "ICM_HTTP_CONNECTION_FAILED")

    Hello All,
    I am trying to create a proxy class from a webservice through a URL.
    I get the error:
    HTTP error (return code 400, message "ICM_HTTP_CONNECTION_FAILED")
    What could be the reason for this. Please help.
    Thanks,
    Smita

    Hi Smita
    Pls refer the links for this error ICM_HTTP_CONNECTION_FAILED
    The specified item was not found.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/changing%252bhttp%252bport%252bof%252bdecentralized%252badapter%252bengine
    Http* Errors in XI
    Configuring & Publishing Enterprise Services from SAP Business Suite system into NWCE (Netweaver Composition Environment) Services Registry
    Publishing ABAP WebServices to an External UDDI Server
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/bd5950ff-0701-0010-a5bc-86d45fd52283
    Regards
    Abhishek

  • 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 do I set iPlanet Web Server 4.1 HTTP Response Header to use expires so that the browser will cache content longer

    I want to add in all html files returned the "expires" value.
    Based in HTTP 1.1, I think it is possible by adding the META tag between the <HEAD> and </HEAD>:
    <META> HTTP_EQUIV:"expires" CONTENT="Sun, 21 Jun 2002 15:05:00 GMT" </META>
    I include this in my html file (but "expires" doesn�t work :(( ). Which options are necessary to modify in the WS?
    How does the internet options of the browser influence?
    PD:(This is a question posted last 5/28, but is has no response yet.)

    The above reply does not take into account that I am trying to use GROUP POLICY EDITOR to make it the default browser.

  • PO invoice through IDOC --Need Standard Process code and Message Type

    Hi All,
    could any one send me SAP Standard Message type and SAP Standard process code for posting Vendor PO invoice.
    Thanks
    Raghu

    Hello,
    Standard Message type: INVOIC, Process Code: INVL, IDOC type INVOIC02.
    Thanks,
    Venu

  • Trouble installing AOL software-error code and message during instal

    I had the earliest version of AOL software installed initially with the intro of Mac OS 10. Upgrading to the latest version of AOL's software for OS 10, now using OS 10.4.4, interupts during the installation process with the message 'Error creating folder' and the code 1008:9,-5000.
    I have deleted all files referencing any other version of AOL on the computer including all items in System 9 (I also used this opportunity to delete all vestiges of System 9 from the computer). Everything is up to date on the computer. Both AOL online and telephone support were worthless. Any help would be appreciated.

    problem was solved much later by installing the program onto a blank CD-R and then moving it onto the hard drive in the applications folder. Never figured out what the error message meant

  • Can we capture HTTP response for async message without BPM?

    We are in the process of migrating an XI 2.0 scenario to XI 3.0.
    The scenario is as follows in XI 2.0 - SAP sends an IDoc to XI which is mapped to an HTTP request and sent to an endpoint.  The HTTP response is captured and shown in SXMB_MONI.
    When we migrate this scenario to XI 3.0, we do not see the HTTP response in MONI.  It looks like since the incoming message (IDoc) is triggering an asynchronous message flow, the HTTP receiver is ignoring the HTTP response payload if it sees a 200 OK status code.  Ideally, we would like for the HTTP response to be captured in MONI just as in XI 2.0.
    Is there a way to capture the HTTP response without using a BPM to make the HTTP synchronous call?  It appears that there is nothing in the HTTP receiver communication channel that we can change (to change it from asynchronous to synchronous).
    Thanks for your help,
    Jay Malla
    SAP XI Consultant
    Licensed To Code

    It looks like the problem I am having might be due to a bug in SP15.  It looks like i should see the HTTP response in MONI by default.  Some other people had this problem with SP 15.  Here is the posting:
    Re: SXMB_MONI does not show payload after upgrade to SP15
    Regards,
    Jay

  • Reset the HTTP response code in OSB for proxy service

    Hi,
    I created a HTTP proxy service in ALSB with any XML message option. There are some business scnearios for which i need to send a custom error message in the HTTP body. I am replacing the $body variable with the error message and sending reply with success.As i am using reply with success it sends a HTTP response status code as 200 Ok.
    However based on different error conditions i want to send appropraite http response code. How can this be achieved?

    I would like to share the solution so that it would be useful to all the users of the forum.
    There is a http:http-response-code element in the $inbound variable which is optional element. You need to insert this element to the $inbound using the insert action. Here is the extract of the code:
    Insert [<http:http-response-code>401</http:http-response-code>] [ as last child of ] [./con:transport/con:response] in [inbound]
    Please note namespace con belongs to "http://www.bea.com/wli/sb/context".
    Edited by: [email protected] on Aug 12, 2009 10:47 PM

  • How to find all ORA error code and the message in Oracle10g?

    Does anyone knows how to list all ORA error code and message in SQL Plus or find a full list of ORA error code in documentation?

    If you want ALL Oracle ORA error codes in single page or even downloadable (html or pdf format) then check following post.
    http://www.oratraining.com/blog/2010/08/complete-list-of-all-oracle-ora-errors/
    Regards,
    Tushar
    Edited by: oratraining on Aug 18, 2010 12:20 AM

Maybe you are looking for