HELP: Delay HTTP Response

Hi,
I'm trying to use a simple HTTP Servlet to provide a synchronous interface to an inheritantly asynchronous systems.
For example
1. Client does HTTP POST
2. Servlet receives request (via doPost)
3. Servlet generates an internal asynchronous request
4. Servlet receives an internal asynchronous response
5. Servlet returns the HTTP response
6. Client receives the HTTP response
How can I get my servlet to delay sending the HTTP response once I've exited the doPost() method (or is there a more clever way to do this?
Thanks.
Chris

You can't. But you could control when you leave doPost() by sleeping for the requisite amount of time.
Of course you can't control what the network of processes between your servlet and the client does or how long it takes, but I suppose you have taken care of that in some way.

Similar Messages

  • Help: Received HTTP response code 404 : Not Found

    Transmitting the message to endpoint http://chmsxd42:52200/sap/xi/engine?type=entry using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 404 : Not Found.
    Our senario is a simple file transfer one, no object has been created in IR.
    While we run the wizard, we just put the dummy interface name and namespace in the interface and namespace blanks.
    After we activate the objects, the source files were picked up and deleted but there is no file created in the target directory, and we got the error message listed at the top.
    Does anyone has some clue about this? Please help.
    Thanks a lot.
    Aditya Babu

    Hi,
    The port of Integration Engine is 80XX, and so 8001.
    In the SLD you must to select the Business System of XI and there you can just set the corret Pipeline URL.
    It means you AE is unable to communicate with IE.
    t-code SMICM..check the HTTP port No:
    open the SMICM code...just right click anywhere in the window...then click on the Services..it will show u the HTTP and HTTPs port no.
    THen from SLD --Business Landscape --your Business System..chek the Pipeline URL http://<host>:<port>/sap/xi/engine?type=entry
    the HTTP port that u will see in the SMICM should be same in the pipeline URL
    Have you checked this one,...
    /people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
    Go through this link which as the information of all HTTP errors in XI
    /people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
    Thanks
    Vikranth

  • How can a http response be delayed?

    Hi,
    I have a "simple" problem to solve but I am new to J2EE so I hope to find someone who has already faced with this problem.
    I know a servlet can receive an http request from a client and prepare the response. The response will be sent as soon as the servlet returns. The same servlet serves the requests of many users, so if there are 100 users requesting for a servlet I guess the requests are queued and there will be a response outcoming the web-server for each request in the same order.
    Please correct me if I say wrong things.
    Now I would like to write a java code that receives the request but waits for a trigger event to send the response, without blocking other users.
    I mean, a user sends a request, a servlet should forward the request to a thread (what else?) and exit without sending any response. The thread (I thought about a thread for each user) will wait for a trigger event and ONLY if the event happens the response will be sent to the requesting client.
    In the meantime other users can send their requests and receive their response when their trigger events has happened.
    1. Can J2EE technology allow me to do that?
    2. How can I let the thread send the response to the right client?
    3. Http packets do not contain the info about the client, how can I trigger the sending of the response?
    I had a look to pushlet and comet but the problem I have seems to me different from let the server start a communication with a client. In my case the paradigm request-response is kept but the response is delayed. Of course the time-out should be increased (I have read that time out is settable in the client).
    To be more clear I'm adding two examples:
    1. one client (an applet) sends its request, the server receives the http packet and it will start a timer of 5 sec. Only when the timer expires the response will be sent. In the meantime other clients perform their requests and they all will be answered after 5 secs from their request (because there is a timer for each request).
    2. the trigger is the number of requests received: if the server receives 10 requests from 10 clients then all the 10 clients will receive the response. If the server receives less of 10 requests in the time out period there will be issued a time-out error.
    Please could you help me?
    Thanks in advance.

    maxqua72 wrote:
    Hi,
    I have a "simple" problem to solve but I am new to J2EE so I hope to find someone who has already faced with this problem.
    I know a servlet can receive an http request from a client and prepare the response. The response will be sent as soon as the servlet returns. Not exactly. The request is sent with the contents of the output stream are flushed to the client. This may be right away, or it may not be. This usually does happen before the 'servlet returns' but you have control of when that happens.
    The same servlet serves the requests of many users, so if there are 100 users requesting for a servlet I guess the requests are queued and there will be a response outcoming the web-server for each request in the same order.Again, not really true. requests are handled in the order in which they are received, but that does not mean that the first in is the first out. It just means the first in will begin before the second in. The second in could very well finish before the first one.
    Please correct me if I say wrong things.
    Now I would like to write a java code that receives the request but waits for a trigger event to send the response, without blocking other users.
    I mean, a user sends a request, a servlet should forward the request to a thread (what else?) and exit without sending any response. The thread (I thought about a thread for each user) will wait for a trigger event and ONLY if the event happens the response will be sent to the requesting client.
    In the meantime other users can send their requests and receive their response when their trigger events has happened.Each request will have its own thread. There is no need to make your own. You could delay the response as long as you like without making your own thread.
    This assumes you do not implement the 'SingleThreadModel' deprecated interface on your servlet.
    >
    1. Can J2EE technology allow me to do that?
    2. How can I let the thread send the response to the right client?
    3. Http packets do not contain the info about the client, how can I trigger the sending of the response?Yes, JEE can do that. Because each request has its own thread, you can do your delay right in the servlet's service method (doXXX). You would then have the same access to the request/response as always. Alternatively, you could pass the request/response to whatever method/object that will do your work.
    Note that using a new thread for this will actually be a detriment, since that will allow the thread the servlet is called in to return, which will end the request cycle and destroy the response object. So you should do it in the same thread that your request is made in.
    >
    I had a look to pushlet and comet but the problem I have seems to me different from let the server start a communication with a client. In my case the paradigm request-response is kept but the response is delayed.This is actually the same thing as what pushlets do. Pushlets require the user to make an initial request, then the Pushlets hold on to the initial request's thread by never closing the response stream or returning from the service method. It lets Pushlets then continuously send data to the client. Your system would be simpler, you would receive the request, open the response stream, maybe send initial data to client, then delay. When the delay finishes send the rest of the content and close the response stream and let the request die.
    Of course the time-out should be increased (I have read that time out is settable in the client).That is true, but is a nightmare if you expect your client base to be more than a few people whom you know. A better option would be to regularly send small bits of 'keep alive' packets so the client knows the page is still active (which may also help prevent the client from navigating away from your site because it would appear frozen). What you could do is send small bits of javascript that update a specific portion of the page (like a count of current request, or a countdown until activation... whatever seems appropriate). Or just send nonsense javascript that doesn't affect the client at all (but which doesn't break your page either).
    To be more clear I'm adding two examples:
    1. one client (an applet) sends its request, the server receives the http packet and it will start a timer of 5 sec. Only when the timer expires the response will be sent. In the meantime other clients perform their requests and they all will be answered after 5 secs from their request (because there is a timer for each request).No problem. Adding a Thread.sleep(5000) will do this nicely.
    >
    2. the trigger is the number of requests received: if the server receives 10 requests from 10 clients then all the 10 clients will receive the response. If the server receives less of 10 requests in the time out period there will be issued a time-out error.Again, possible, but you would need to device a means of locking and unlocking threads based on client count. Two quickie methods would be to keep a member variable count of current request. Each request would use synchronized blocks to first increment the count, then in a loop, check the count, wait if it is < 10, or end the synchronized block if it is >= 10.
        public void doGet(...) {
            int localCount = 0;
            //Count this request, then recall how many total requests are already made
            synchronized (countLock) {
                this.count++;
                localCount = this.count;
            //Loop until this thread knows there are 10 requests
            while (localCount <10) {
                //wait for a while, and let other threads work
                try { Thread.sleep(100); } catch (InterruptedException ie) { /* don't care */ }
                //get an updated count of requests
                synchronized (countLock) {
                    localcount = this.count;
            } //end while
            //do the rest of the work
            //Remove this request from the count
            synchronized(countLock) {
                this.count--;
        }A second, better approach would use a 'request registrar' which each request adds itself to. The registrar blocks each request on the condition that 10 requests come in, then releases them all. This would use the tools available in java.util.concurrent to work (java 5+). Untested example:
    public class RequestRegistrar {
        private final ReentrantLock requestLock = new ReentrantLock();
        private final Condition requestCountMet = requestLock.newCondition();
        private int count;
        private static final int TARGET_COUNT  = 10;
        private static final RequestRegistrar instance = new RequestRegistrar();
        public static RequestRegistrar getInstance() { return instance; }
        private RequestRegistrar() { }
        public void registerRequest() {
            this.requestLock.lock();
            try {
                this.count++;
                if (this.count < TARGET_COUNT) {
                    while (this.count < TARGET_COUNT) {
                        try {
                            this.requestCountMet.await();
                        } catch (InterruptedException ie) {
                            /* don't care, will just loop back and await again */
                    } //end loop of waiting
                } else { //the target count has been met or exceeded
                    this.count = 0; //reset count
                    this.requestCountMet.signalAll();
            } finally {
                this.requestLock.unlock();
    //Then your requests would all do:
        public void doGet(...) {
            RequestRegistrar.getInstance().registerRequest(); //waits for 10 requests to be registered
            //The rest of your work
        }Undoubtedly there is a lot of work to fix this up, but if you understand Locks and conditions it won't be hard (and if you don't perhaps now is a good time to learn...)
    >
    Please could you help me?
    Thanks in advance.

  • Help needed to resolve Received HTTP response code 401 : Unauthorized

    2011-04-08 11:37:48 Error Transmitting the message to endpoint http:---/sap/xi/engine?type=entry using connection AFW failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 401 : Unauthorized
    while i was executing file to file scenario. the error occoured.
    Edited by: subbuk76 on Apr 8, 2011 8:12 AM

    As the error indicates, the username/PWD you are using in file adapter to write the file (FTP) at target location is incorrect and hence the error. Please check and let us know.
    3) Error: HTTP_RESP_STATUS_CODE_NOT_OK 401 Unauthorized
    Description: The request requires user authentication
    Possible Tips:
    u2022 Check XIAPPLUSER is having this Role -SAP_XI_APPL_SERV_USER
    u2022 If the error is in Adapter Engine
    u2013then have a look into SAP note- 821026, Delete the Adapter Engine cache in transaction SXI_CACHE Goto --> Cache.
    u2022 May be wrong password for user XIISUSER
    u2022 May be wrong password for user XIAFUSER
    u2013 for this Check the Exchange Profile and transaction SU01, try to reset the password -Restart the J2EE Engine to activate changes in the Exchange Profile After doing this, you can restart the message
    Also, for HTTP errors in future do refer this blog:
    /people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
    It will help you

  • NetBeans with Tomcat Help - Server returned HTTP response code: 503

    Hi all, I wasn't sure where to post this.. but anyhow, my problem is as follows:
    Earlier in the day, I was able to successfully deploy my application to the Tomcat server by simply running the application from NetBeans. A couple of hours away from my computer and I returned to find this error when I ran my application:
    In-place deployment at C:\xxx
    Server returned HTTP response code: 503 for URL: http://localhost:8081/manager/deploy?config=file:/C:/xxx
    C:\xxx\nbproject\build-impl.xml:634: Deployment error:
    The module has not been deployed.
    See the server log for details.
    BUILD FAILED (total time: 36 seconds)
    Any ideas on how to solve this? I've tried reinstalling NetBeans, Tomcat, reconfiguring NetBeans but to no avail. I should also mention that I am able to successfully deploy the application sometimes when I select a different server to deploy to. >_<
    Gurus out there, please help..

    Solved my own solution.. It had to do with one of my Hibernate named queries. =x Found that out when I switched to SUN Application Server for awhile. ^_^

  • Server returned HTTP response code: 500.. i need help

    i have this applet that communicates with a servlet.. when the applet connects to the servlet, i get the Server returned HTTP response code: 500 error.. when i am testing in my own pc, everything is fine.. when i tried deploying it in a server, the error occurs.. i do not have any idea what is wrong.. please help

    sir, what do you mean by trace?
    here is what i got from the java console..
    java.io.IOException: Server returned HTTP response code: 500 for URL: http://mental_boi.s46.eatj.com/myServlet/loadMap?action=load&fileName=http://mental_boi.s46.eatj.com/CityNavigator/mapSpain.svg
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at edu.citynavigator.map.editor.MapEditor.loadMap(MapEditor.java:685)
         at edu.citynavigator.map.editor.MapEditor.init(MapEditor.java:130)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
         at java.io.StringReader.<init>(Unknown Source)
         at edu.citynavigator.map.editor.MapEditor.stringToSVG(MapEditor.java:703)
         at edu.citynavigator.map.editor.MapEditor.init(MapEditor.java:131)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    and does the applet have to be signed?
    Message was edited by:
    hardcoder

  • Unable to deserialize HTTP response content - SharePoint Designer Call Web Service Workflow Activity

    I am creating a workflow using SharePoint Designer 2013 and I'm using the call HTTP web service action.
    The web service call works (it is for a text messaging service, and I get the text message to my phone) however the workflow stops at this point with internal status "suspended" and gives the error message below when clicking on the "i"
    icon.
    I have tried setting the Accept and Content-Type request headers to "application/json; odata=verbose" (minus the quote marks) as other posts suggested but this doesn't make a difference (e.g. here: https://social.msdn.microsoft.com/Forums/windowsapps/en-US/f0b18411-87d1-466b-aab0-1a0093605ed4/workflow-cannot-read-json-after-latest-sp15-patches?forum=sharepointdevelopment).
    I tried adding in the Content-Length header too but that made no difference.
    I tested calling another web service (https://sharepointurl/_api/contextinfo) and this works fine.
    Is there any way to get the workflow to accept this XML as the response? I don't actually really need anything out of the response content, but I do need the workflow to carry on after this step and carry out other activities after this call.
    Error message:
    Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.IO.InvalidDataException:
    Unable to deserialize HTTP response content. Expected ContentType : 'application/json', 'text/plain' or 'text/html', Received ContentType : 'text/xml'. Content (truncated) : '<?xml version="1.0" ?><outbound-message-delivery messageId="35d60bd2-a829-4382-8189-7a74de2d1cca"
    isError="false"><recipient msisdn="6427xxxxxxx" isError="false"></recipient></outbound-message-delivery>'. ResponseStatusCode : 'OK' Request Uri : 'https://www.txtserviceurl.co.nz/api/3/sms/out?to=6427xxxxxxx&body=test+from+workflow'
    at Microsoft.Activities.Messaging.SendHttpRequest.OnReceiveResponse(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value)
    at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) Exception from activity SendHttpRequest HttpPost Switch<String> Sequence Microsoft.SharePoint.WorkflowServices.Activities.CallHTTPWebService
    Stage 1 Sequence Flowchart Sequence Testing 

    Hi,
    Thank you for your post.
    I'm trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact 
    [email protected]
    Lisa Chen
    TechNet Community Support

  • HTTP response contains status code 503

    Hi All,
    Im working on File to JDBC scenario using MsAccess.My file is been picked by XI from the sender folder (im using NFS at the sender side), but it is not inserting the data in the table which i have created on the server.
    When i do SXI_MONI , i'm getting a error in call adapter "HTTP response contains status code 503 with the description Service Unavailable Error while sending by HTTP (error code: 503, error text: Service Unavailable)".
    Plz do help me to solve it.
    Thanks,
    Suma

    Hi,
    503 Service unavailable
    this is because of the server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.
    Note: The existence of the 503 status code does not imply that a server must use it when becoming overloaded. Some servers may wish to simply refuse the connection.
    you can go for the possible solution as mentioned below:
    Because of J2EE application com.sap.aii.af.ms.app not active
    1. Try to (re)start the application using the Visual Administrator Choose Server --> Services --> Deploy --> View on Application or restart the J2EE engine.
    2. The problem is that not all J2EE services can be started by the J2EE. i.e Start the Visual Administrator and select Server->Services->Deploy in the tree on the left. On the right-hand side, choose the Runtime tab page. You see a tree in the right window with all applications if you select the APPLICATION radio button. Check if they are running, otherwise choose Start. Usually the J2EE engine starts all services automatically.
    3. Refer SAP Note 803145,807000,791655
    4. In Visual Admin, check if all the required services are running and start them, else restart the Java Stack in the XI server.
    /people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi /people/vinoth.murugaiyan/blog/2007/08/06/how-to-the-change-the-application-stopped-message
    http://help.sap.com/saphelp_nw04/helpdata/en/64/351941edd5ef23e10000000a155106/frameset.htm
    thanq
    krishna

  • Deploying simple HTML page to WLS 10.3.6 fails with HTTP response code: 502

    - I created a simple HTML page and want to test deployment to WLS 10.3.6 on Linux. I created WAR file and when using JDev 11.1.1.4.0 to deploy to WebLogic Server, it fails to deploy. Full errors/messages are:
    [04:40:56 PM] ---- Deployment started. ----
    [04:40:56 PM] Target platform is (Weblogic 10.3).
    [04:40:59 PM] Retrieving existing application information
    [04:40:59 PM] Running dependency analysis...
    [04:40:59 PM] Building...
    [04:40:59 PM] Deploying profile...
    [04:40:59 PM] Wrote Web Application Module to C:\JDeveloper\mywork\Simpe_HTML\Project1\deploy\SimpleHTML.war
    [04:41:01 PM] Deploying Application...
    [04:41:01 PM] Weblogic Server Exception: weblogic.deploy.api.internal.utils.DeployerHelperException: The source 'C:\DOCUME~1\NGOLDR~1.LAT\LOCALS~1\Temp\SimpleHTML.war' for the application 'SimpleHTML' could not be loaded to the server 'http://dupe:7031/bea_wls_deployment_internal/DeploymentService'.
    Server returned HTTP response code: 502 for URL: http://dupe:7031/bea_wls_deployment_internal/DeploymentService
    [04:41:01 PM] See server logs or server console for more details.
    [04:41:01 PM] weblogic.deploy.api.spi.exceptions.ServerConnectionException: [J2EE Deployment SPI:260041]Unable to upload 'C:\JDeveloper\mywork\Simpe_HTML\Project1\deploy\SimpleHTML.war' to 't3://dupe:7031'
    [04:41:01 PM] #### Deployment incomplete. ####
    [04:41:01 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
    - The Application Server connection is accessible within JDev. 'dupe' is my server name and it's running RH 5.4
    - Any help or suggestions appreciated, although I've already asked Mr. Google without success.
    Thanks in advance,
    Neville

    HTTP response code 502 means temporarily overloaded.
    I would say that we have to check the deployment error on the weblogic server logs located at <Domain_Home>\servers\dupe\logs\dupe.log
    Check for any errors like OutOfMemory etc OR any deployment failures.
    If possible, try accessing the console at http://dupe:7031/console
    Check if you are able to successfully deploy your application using the console.
    From the error it looks like the "dupe" server might not be healthy. So, the log file would really help here to get clues into the root cause.
    Arun

  • HTTP response does not contain a valid XML root tag

    I am running into an error in my trace portion of my XML when executing my application. The error is  "HTTP response does not contain a valid XML root tag". The HTTP request is successful with message 200 so it seems to be accepted by the Integration Engine. I looked for other posts on this error and only found one and it didn't show the resolution. Any help would be appreciated.

    Hello
    Check these notes (do you use a split mapping?):
    1) 1515230     XI mapping: "Root tag missing" in split mapping
    2)  1640553     XI mapping: Split mapping: error Missing_Interface
    Regards
    Mark

  • 2013 Exchange, Can't connect to Exchange Management Shell. It cannot determine the content type of the HTTP response from the destination computer.

    The following error occurs.
             Welcome to the Exchange Management Shell!
    Full list of cmdlets: Get-Command
    Only Exchange cmdlets: Get-ExCommand
    Cmdlets that match a specific string: Help *<string>*
    Get general help: Help
    Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
    Show quick reference guide: QuickRef
    Exchange team blog: Get-ExBlog
    Show full output for a command: <command> | Format-List
    Tip of the day #0:
    Did you know that the Identity parameter is a "positional parameter"? That means you can use:
     Get-Mailbox "user" instead of: Get-Mailbox -Identity "user"
    It's a neat usability shortcut!
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Exception calling "GetComputerSite" with "0" argument(s): "The Specified directory object cannot be found."
    At C:\Program Files\Microsoft\Exchange Server\V15\bin\ConnectFunctions.ps1:164 char:2
    +     $localSite=[System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetC ...
    +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ActiveDirectoryObjectNotFoundException
    Failed to connect to an Exchange server in the current site.
    Enter the server FQDN where you want to connect.: mail1.dorothy.local
    VERBOSE: Connecting to mail1.dorothy.local.
    New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
    message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
    the destination computer. The content type is absent or invalid. For more information, see the
    about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
       gTransportException
        + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
    Randy Cheek

    Good Morning,
    Log into the server with an account that has appropriate Exchange rights, not a local account.  
    Note: By default - Domain Admins don't have Exchange rights.
    Dame Luthas, ITILv3, MCSE Messaging 2013, MCSA, MCITP
    My Technical Blog: http://thelifestrategist.wordpress.com
    Discipline is the Difference between Goals and Accomplishments
    If this post is useful, please hit the green arrow on the left & if this is the answer hit "mark as answer"

  • How to change the HTTP Response as XML (Content Type "text\xml") ?

    Hi Friends ,
                     I have created one RFC Destination TYPE H . When i am trying to post some XML Message to that particular HTTP Service using POST method . It succesfully accepted the XML File but , it is returning the String as  " OK" . In the connection test trace i have seen the Content Type as "text/html" but *  I need to get as "text\xml" .* 
                     I need to get response back as XML not plain text . 
            1  Any Configuration setting  do we need to do on Service (SICF )  ?
             2. Or any other place we need to modify to get the HTTP Response as XML not plain text
                  Can you please help to solve the problem . Any clue ?
    Thanks & Regards.,
    V.Rangarajan
    Edited by: ranga rajan on Jan 2, 2008 2:07 PM

    Dear users,
    we have requirement sending SMS to the customers mobiles. I am successfully sending the messages to the customers mobiles by using the above method. Facing issues with response message. The response messages is in plain text fromat in single line like...Sent
    Using HTTP_AAE Receiver adapter.
    The response message was failed while excution of the message mapping with the error
    Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_SMS_CUST_RES_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.
    please share the comments how to pass the Status of the message to SAP ECC from SAP HTTP adapter
    Regards,
    Sudir.

  • How to change the HTTP Response as XML (Content Type "text\xml")  When Post

    Hi Friends ,
    I have created one RFC Destination TYPE H . When i am trying to post some XML Message to that particular HTTP Service using POST method . It succesfully accepted the XML File but , it is returning the String as " OK" . In the connection test trace i have seen the Content Type as "text/html" but * I need to get as XML format no Srting    ( Type "text\xml" . ) *
    I need to get response back as XML not plain text .
    1 Any Configuration setting do we need to do on Service (SICF ) ?
    2. Or any other place we need to modify to get the HTTP Response as XML not plain text
    Can you please help to solve the problem . Any clue ?
    Thanks & Regards.,
    V.Rangarajan

    Dear users,
    we have requirement sending SMS to the customers mobiles. I am successfully sending the messages to the customers mobiles by using the above method. Facing issues with response message. The response messages is in plain text fromat in single line like...Sent
    Using HTTP_AAE Receiver adapter.
    The response message was failed while excution of the message mapping with the error
    Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_SMS_CUST_RES_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.
    please share the comments how to pass the Status of the message to SAP ECC from SAP HTTP adapter
    Regards,
    Sudir.

  • Received HTTP response code 500 : Internal Server Error

    Hi All,
    In my scenario EANCOM to IDOC, I am getting an error in the sender communication channel (FILE Adapter). It is being picked up from the ‘sender’ directory successfully but not reaching the XI box (no messages seen in SXMB_MONI).
    The error in the runtime Workbench says the following:
    “Transmitting the message to endpoint http://gdrsap.nestle.com:50000/XIAxisAdapter/MessageServlet? using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Received HTTP response code 500 : Internal Server Error.”
    Regards,
    Manohar

    Hi Murli
    error code 500 stands for Internal Server Error
    This code is the default for an error condition when none of the other 5xx codes apply.
    for more details on error code follow the link
    http://www.web-cache.com/Writings/http-status-codes.html
    you have to restart J2EE engine
    steps to restart J2EE engine
    1) run transaction SMICM
    2) then in the tab administration => J2EE instance(local) =>send soft shutdown with restart
    by this java engine will restart and will be up in 5-10 minutes and your problem will be solved
    Thanks
    sandeep sharma
    PS ; if helpful kindly reward points

  • Received HTTP response code 500 : Internal Server Error using connection Fi

    Hi everybody,
    I have configured a file-webservice-file without BPM scenario...as explained by Bhavesh in the following thread:
    File - RFC - File without a BPM - Possible from SP 19.
    I have used a soap adapter (for webservice) instead of rfc .My input file sends the date as request message and gets the sales order details from the webservice and then creates a file at my sender side.
    I monitored the channels in the Runtime work bench and the error is in the sender ftp channel.The other 2 channel status is "not used" in RWB.
    1 sender ftp channel
    1 receiver soap channel
    1 receiver ftp channel.
    2009-12-16 15:02:00 Information Send binary file "b.xml" from ftp server "10.58.201.122:/", size 194 bytes with QoS EO
    2009-12-16 15:02:00 Information MP: entering1
    2009-12-16 15:02:00 Information MP: processing local module localejbs/AF_Modules/RequestResponseBean
    2009-12-16 15:02:00 Information RRB: entering RequestResponseBean
    2009-12-16 15:02:00 Information RRB: suspending the transaction
    2009-12-16 15:02:00 Information RRB: passing through ...
    2009-12-16 15:02:00 Information RRB: leaving RequestResponseBean
    2009-12-16 15:02:00 Information MP: processing local module localejbs/CallSapAdapter
    2009-12-16 15:02:00 Information The application tries to send an XI message synchronously using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:02:00 Information Trying to put the message into the call queue.
    2009-12-16 15:02:00 Information Message successfully put into the queue.
    2009-12-16 15:02:00 Information The message was successfully retrieved from the call queue.
    2009-12-16 15:02:00 Information The message status was set to DLNG.
    2009-12-16 15:02:02 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Internal Server Error using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:02:02 Error The message status was set to FAIL.
    Please help.
    thanks a lot
    Ramya

    Hi Suraj,
    You are right.The webservice is not invoked.I see the same error in the sender channel and the receiver soap channel status is "never used".
    2009-12-16 15:52:25 Information Send binary file  "b.xml" from ftp server "10.58.201.122:/", size 194 bytes with QoS BE
    2009-12-16 15:52:25 Information MP: entering1
    2009-12-16 15:52:25 Information MP: processing local module localejbs/CallSapAdapter
    2009-12-16 15:52:25 Information The application tries to send an XI message synchronously using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:52:25 Information Trying to put the message into the call queue.
    2009-12-16 15:52:25 Information Message successfully put into the queue.
    2009-12-16 15:52:25 Information The message was successfully retrieved from the call queue.
    2009-12-16 15:52:25 Information The message status was set to DLNG.
    2009-12-16 15:52:27 Error The message was successfully transmitted to endpoint com.sap.engine.interfaces.messaging.api.exception.MessagingException: Received HTTP response code 500 : Internal Server Error using connection File_http://sap.com/xi/XI/System.
    2009-12-16 15:52:27 Error The message status was set to FAIL.
    what can I do about this?
    thanks,
    Ramya

Maybe you are looking for

  • Dictionary doesn't work

    Dashboard dicitonary in Mountain Lion does not work.  I have tried trashing the Dashboard prefs and restarting but it still doesn't work. GH

  • Making folders in playlist and having those folders transfer to ipod

    I listen to alot of live shows and for that I have made folders for each bands live shows to make it easier to scroll through my ipod. When I sync my ipod with my itunes the ipod doesn't show up with the folders like I have it in itunes. With not bei

  • How to edit XML parsed data and save on iPhone app

    Hi, How to edit and XML retrieved data that is displayed on an iPhone app and save again in the same XML file using iPhone SDK. In other words I want to change the XML file data or edit and save. Thnx in advance. Regards Amit

  • Screen sequence can not be assignes

    Hello gurus I´ve created a new screen-sequence(into t-code: BUS6) as a copy of standard one (BUP001 general Data), but when I try to assign it to a new BP role, system send the follow message: "Entry BUPA  ZBUP01 does not exist in TBZ3N", but it is n

  • How do I retrieve music from old iPhone?

    I have an old iPhone that has a bunch of music, pictures, etc. on it that I want to pull off it and put onto my new Macbook Pro. My old Macbook Pro had all of it on it, but got stolen and I had NO backup! UGH! So, I tried syncing the old iphone to th