HTTP RECEIVER Stopping on CALL ADAPTER

Hi All,
I'm having a problem with HTTP Receiver adapter, It's an IDOC that need to send to a HTTP Listener. Everything works until send the XML to the http listener, I have made a single listener in java to verify how this XML is coming from adapter.
I got the follow information:
POST /?msgguid=45ECD392770B0046020000000AA00D4B&service=MYSERVICE&namespace=urn%3amynamespace%3atest%3aintegration&interface=MI_ED_MYIDOC_IB&qos=EO HTTP/1.0
content-type: text/xml
content-length: 1550
connection: close
accept: */*
user-agent: SAP Web Application Server (1.0;640)
host: 10.10.10.10:5556
accept-encoding: gzip
<?xml version="1.0" encoding="UTF-8"?>
It stops on first line of XML <b><?xml version="1.0" encoding="UTF-8"?></b> and stay stoped until I break the connection.
The server is SAP XI 3.0 SP15.

Hi Renjith, yes it's a custom java program and I'm trying to write on the console the stream on the console.
What I need to do is certify if SAP XI is delivering the message to the legacy system. So, I know that all configuration on scenario for integration between this legacy system and SAP R/3 is correct. And I'm almost sure that error is on the legacy system side that I don't have credentials to verify.
Look at the source code below:
import java.io.*;
import java.net.*;
class SocketServer {
   ServerSocket server = null;
   Socket client = null;
   BufferedReader in = null;
   PrintWriter out = null;
   String line;
   SocketServer(){ //Begin Constructor
     this.listenSocket();
   } //End Constructor
  public void listenSocket(){
    try{
      server = new ServerSocket(5556);
    } catch (IOException e) {
      System.out.println("Could not listen on port 5556");
      System.exit(-1);
    try{
      client = server.accept();
    } catch (IOException e) {
      System.out.println("Accept failed: 5556");
      System.exit(-1);
    try{
      in = new BufferedReader(new InputStreamReader(client.getInputStream()));
      out = new PrintWriter(client.getOutputStream(), true);
    } catch (IOException e) {
      System.out.println("Accept failed: 5556");
      System.exit(-1);
    try{
      int i = 0;
      while((line = in.readLine()) != null){
        line = in.readLine();
     System.out.println(i+":"+line);     
        i++;
      //this.finalize();
    } catch (IOException e) {
      System.out.println("Read failed");
      System.exit(-1);
  protected void finalize(){
//Clean up
     try{
        in.close();
        out.close();
        server.close();
    } catch (IOException e) {
        System.out.println("Could not close.");
        System.exit(-1);
  public static void main(String[] args){
        SocketServer frame = new SocketServer();
Thanks,
Daniel

Similar Messages

  • How to Call HTTP Sender Adapter of Other Scenar from HTTP Receiver Adapter?

    Hi,
    I have a requirement to call HTTP Sender Adapter of Other Scenario from HTTP Receiver Adapter?
    or
    call SOAP Sender Adapter of Other Scenario from SOAP Receiver Adapter?
    i.e
    SOME SENDER - > PI - > HTTP Receiver - > calling -> HTTP Sender -> PI -> SOME RECEIVER
    SOME SENDER - > PI - > SOAP Receiver - > calling -> SOAP Sender -> PI -> SOME RECEIVER
    if any one can provide me the screen shot for those SOAP / HTTP Sender or Receiver ADAPTER.
    or Point me to Some article with Screenshots .
    That would be appreciated with Point.
    Regards
    PS.

    Solved .  .

  • HTTP Receiver Adapter

    Hi,
    I am working on a scenario, where I am posting xml message on https url, for which I am using HTTP receiver adapter.
    I have created RFC destination of type 'G' in sm59 to make an https call, where I have provided following details:
    In Technical Settings:
    Target Host - <Hostname>
    Service No. - 443
    Path Prefix - <url path>
    Logon Security:
    SSL - Active
    SSL Client Certificate - Default SSL Client (Standard)
    UserName - <Username>
    Password - <Password>
    I have used this RFC destination in 'HTTP Destination' of HTTP receiver adapter.
    When I test this interface, I am getting this error.
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_CLIENT</SAP:Code>
      <SAP:P1>110</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP client. Code 110 reason</SAP:Stack>
      <SAP:Retry>A</SAP:Retry>
      </SAP:Error>
    Can you please help me resolve this issue. Please let me know, if I am following the right steps.
    Thanks in advance
    Regards,
    Amit

    Hi -
    Since you're using the http destination option in the channel, you just specify the user/pwd in the destination.
    Regarding the issue, first, for the Logon/Security option in the destination, unless you'll be using a client certificate to authenticate, you should choose option ANONYM SSL Client (Anonymous) - you still provide the user/pwd in the Logon section.  Make sure you have imported the root cert of the CA verifying the server's identity into the client certificate list within STRUST (node SSL Client (Anonymous)).
    Also, for some hints on the issue, look at the ICM trace - tcode SMICM->Goto->Trace File...     you may need to increase the trace level - SMICM->Goto->Trace Level...    After resolving the issue, make sure to set the trace level back to default.
    Regards,
    Jin

  • How to set HTTP header field "cookie" with http receiver adapter?

    Hi,
    I am using http receiver adapter (not axis) in a scenario. I could not set a parameter with key cookie in http header. Is there some kind of restriction to set it? I am able to set others like connection and create custom fields using ASMA and dynamic key configuration via UDF on mapping.
    Could you please comment on, is cookie http parameter special or noneditable by PI's http adapter? I am looking for a solution without editing any abap code...
    Regards,

    I believe it is possible since axis adapter provides very same functionality. Let me summarize my scenario may be it helps:
    I am trying to call series of webservice lets say in a BPM. First service (login service) will provide me with a session id (in http header with key Set-Cookie) then I will call another service which has that session id in its http header with key cookie then I am going to logout. So I am testing the second part now, but it doest let me send cookie http header parameter.
    I hope I clarified a bit more my problem.
    Regards,

  • HTTP Receiver Adapter - HTTP client code 110 reason error when sending

    Hi,
    I am getting the following error when using the HTTP adapter as a receiver to perform an HTTP Post in a destination system :
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_CLIENT</SAP:Code>
      <SAP:P1>110</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP client code 110 reason</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    Does anyone know what causes this error and more importantly how to trace it ?
    Cheers
    Colin.

    hi Colin,
    Check in SMICM if your HTTP service is running.  Also in RFC destination one of the parameter (SSL client Certificate) might be wrong which could also cause this problem.
    Also check this thread:-
    XI Error when upgraded to SP14 (Error Code 110) CLIENT_RECEIVE_FAILED
    Have a look into this SAP Note - 897583
    Regards.
    Praveen

  • XI - Call Adapter Error - HTTP client. Code 402 reason ICM_HTTP_TIMEOUT

    I am using HTTP adapter to post XML PO to vendor's site. We are having this problem with one of our vendor when PO's has more than 15 line items. XI server is getting error-"Call Adapter Error - HTTP client. Code 402 reason ICM_HTTP_TIMEOUT". Actually PO is posted good for the first time on vendor's site but XI is getting above error message and it keeps posting it again. Is there anyway to stop it otherthan manually stopping the XI message? Is there anyway to increase the wait time of the XI server to get the message.
    Thanks in advance.
    Mrudula Patel

    I'm getting the same issue "500 TIMEOUT error" in runtime work bench-->IE--->Test Message. When i manually trigger the file.
    The issue is basically from 01-01-2015 02:00 pm to 02-01-2015 01:am , File is picked from source ftp folder and places in archive but xml messages are not reflecting in SXMB_MONI.
    Today suddenly after 01:00 am messages are successfully processing.
    Please help on this issue. Many Thanks.

  • HTTP Sender and HTTP Receiver adapter. Pls advice urgent

    Hi All,
    There is one Third Party that wants to send XML data and receive XML data with XI.
    Please let me know can I use HTTP for that.
    How to use HTTP Sender part?
    How to use HTTP Receiver Adapter?
    Pls send blogs/doc for that
    Thanks and Regards

    hi.,
    Check this thread for the code for a HTTP Client,
    /message/266750#266750 [original link is broken]
    Also, check these blogs. They use HTTP adapters for their configuration,
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    http://help.sap.com/saphelp_nw04/helpdata/en/44/79973cc73af456e10000000a114084/content.htm
    Check these links for the configuration part.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/64db4daf9f30b4e10000000a11466f/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/44/79973cc73af456e10000000a114084/content.htm
    Weblog :
    /people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi - although this weblog is
    aimed at explaining the sync-async bridge.. Sriram has taken http-to-file scenario as the example
    note:reward points if solution found helpfull.....
    regards
    chandrakanth.k

  • Http receiver adapter error : ICM_HTTP_CONNECTION_FAILED

    Hi all.
    I have set up a receiver http adapter and for the life of me can't get it to work. In sxmb_moni I get the following error in the Call adapter step of the pipeline:
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_CLIENT</SAP:Code>
      <SAP:P1>400</SAP:P1>
      <SAP:P2>ICM_HTTP_CONNECTION_FAILED</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP client. Code 400 reason ICM_HTTP_CONNECTION_FAILED</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
    It does not matter where I try and post to, it comes back with this. I am using "Url address" for Addressing type.
    Help appreciated.

    You should check whether the HTTP service is working on your system.
    transaction smicm -> goto ->  services.  check the entry for  HTTP. If necessary, a restart of the J2EE server might help.
    Also check the http adapter is active.
    transaction sicf -> default_host->sap->xi->adapter_plain
    Cheers
    Manish

  • HTTP receiver adapter: dynamic configuration

    I was told that if I have a URL and some parameters, I can use a sync HTTP receiver adapter to call a site.
    I know this can be done using some kind of dynamic configuration, but I am not familiar with this adapter.
    The most important question here is that I need to know if this can be done throw PI, so my question is:
    Is there a parameter limit in the HTTP adapter? If so, what is the quantity of parameters that I can give to the adapter?

    for the ASMA parameters you can use for the HTTP receiver adapter check
    Configuring the Receiver Plain HTTP Adapter - http://help.sap.com/saphelp_nw04/helpdata/en/43/64dbb0af9f30b4e10000000a11466f/frameset.htm

  • HTTP Receiver Adapter : Dynamic URL

    Hi,
    I have a scenario where I wish to build a dynamic URL for the HTTP Receiver Adapter. The URL will contain a customer number which is present in the mapping.
    The help seems to suggest that this is possible :
    <i>If you want to use an HTTP destination or URL set by the mapping, set the URL or HTTP Destination indicator. (The indicator displayed depends on the Addressing Type you selected above). If you set the indicator, the URL or HTTP destination set dynamically is called by HTTP.
    If the message header does not contain the URL or the HTTP destination, and you have set the Fail If Adapter-Specific Message Attributes Missing indicator, the XI message is set to status System Error. If you do not set the indicator, the URL or HTTP destination defined statically in the communication channel is used.</i>
    However, it is not very clear where the URL needs to be set dynamically.
    Does anyone know how to achieve this ?
    Cheers
    Colin.

    hello to all,
    We have a unique issue with one of our customers that is limited to 100 character URL.  The current url is http://mycompany.com/sap/xi/adapter_plain?namespace=urn%3Agoodyear%2Ecom%3AAIT%3AInventoryCheck&interface=AITInventoryCheck_Abs&service=HTTP_AIT_InvChk&QOS=BE&sap-client=010&sap-language=EN
    Is there a way to have a URL like
    http://mycompany.com/sap/xi/adapter_plain?namespace=urn%3Agoodyear%2Ecom%3AAIT%3AInventoryCheck
    and then somewhere in the process add... &interface=AITInventoryCheck_Abs&service=HTTP_AIT_InvChk&QOS=BE&sap-client=010&sap-language=EN
    So the data comes to an F5 through the DMZ to the SAP webdispatcher then to the SAP XI system.
    Any ideas if this is possible or how you could start with a shorter URL?
    Thanks,
    Dede

  • ICM_HTTP_TIMEOUT error in HTTP Receiver adapter

    Hi
    I am doing HTTP Receiver adapter and File Sender adapter for my scenario.
    I am getting the following error in SXMB_MONI.
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_CLIENT</SAP:Code>
      <SAP:P1>402</SAP:P1>
      <SAP:P2>ICM_HTTP_TIMEOUT</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP client. Code 402 reason ICM_HTTP_TIMEOUT</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error
    Help needed,

    Hi Ganesh,
    Check this weblog...
    /people/michal.krawczyk2/blog/2006/06/08/xi-timeouts-timeouts-timeouts
    Check this thread with similar issue...
    ICM_HTTP_TIMEOUT
    Regards,
    Sridhar

  • Service Number/Port Number in HTTP receiver adapter

    Dear Experts,
    I have a scenario where I am to do HTTP Post to a 3rd party web application via a url in the following format:
    https://x.y.info/abc/sap/customer.cgi
    The HTTP Post data is submitted to the CGI script which is then processed further by the web application. The URL works ok via IE or even PI soap receiver adapter is able to post XML message to the URL but using SOAP.
    But I have to do only HTTP Post and now my problem is that the URL dont have a so called port number that I can fill in the "Service Number" field in HTTP receiver channel or in SM59.
    Does SAP always need a service number or how to deal with this case where server doesnot expose the port.
    Thanks in advance.
    Br
    Suman

    Hello,
    The HTTP Post data is submitted to the CGI script which is then processed further by the web application. The URL works ok via IE or even PI soap receiver adapter is able to post XML message to the URL but using SOAP.
    By definition, the SOAP Adapter is also using HTTP POST as its HTTP method the only difference is that there is a SOAP Envelope that is being sent.
    But I have to do only HTTP Post and now my problem is that the URL dont have a so called port number that I can fill in the "Service Number" field in HTTP receiver channel or in SM59.
    Service number is the port number of the URL that you will be connecting to, if it is not shown, it is assumed that it is 80 for http and 443 for https (as Gzegorz mentioned). Since you are using HTTPs, you should use HTTP Destination that points to an SM59 configuration.
    Hope this helps,
    Mark

  • Code 110 Reason Error in HTTP Receiver adapter

    Hello
    I am having proxy to HTTP Receiver scenario in which i am calling the target application URL through HTTP Receiver Adapter. This interface is async interface and hence i am not expecting any response from the target system.
    When i execute my interface the target system receives data from XI but in SXMB_MONI it sets the status of the message as "<b>Automatic Restart</b>" with the error description as "<b>HTTP client. Code 110 reason</b>"  in HTML Code area <b><SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_CLIENT</SAP:Code></b>
    This is causing multiple messages stuck in the queue and presently i am manually clearing all the messages.
    i checked the quality of service of the incoming message which is correctly setted as <b>Exactly Once</b>.
    Is there any configuration missing?
    Thanks in advance.
    Regards
    Rajeev

    Hi Rajeev,
    1.)Check in SMICM if your HTTP service is running or not.
    2.)If its running fine then you can check whether your SSL certificate is configured properly or not.
    Also follow the below mentioned links :
    HTTP 110
    HTTP Receiver Adapter -> HTTP client code 110 reason error when sending
    *Pls reward with points if helpful*
    Regards,
    Shibani

  • What to provide in HTTP Receiver Adapter ?

    Hi,
    I am using HTTP Receiver adapter for HTTPS connection to 3rd Party.
    3rd Party system has provided URL / HOST / PORT details.
    However i am not sure what i can provide as part of Target Host / Service Number / Path Prefix?
    Regards,
    Rakesh
    Edited by: Rakesh Bhagat on Mar 11, 2009 10:03 AM

    Hi Rakesh,
    However i am not sure what i can provide as part of Target Host / Service Number / Path Prefix?
    e.g http://www.sdn.sap.com:443/irj/scn/thread
    Target Host: sdn.sap.com
    Service Number: 443
    Path Prefix: /irj/scn/thread
    You can only enable SSL by:
    1. creating an RFC Destination using TCODE SM59
    2. install the certificates using TCODE STRUST, then restart ICM afterwards
    3. call your RFC Destination in SM59 using HTTP Destination (instead of URL Address) option in HTTP Receiver Adapter
    Hope this helps,
    Edited by: Mark Dihiansan on Mar 11, 2009 3:14 PM

  • When i send a test message throw the RWB for Http receiver adapter it is giving the error "Error in processing caused by: com.sap.aii.adapter.http.api.HttpAdapterException: ERROR_SOCKET_TIMEOUT, Read timed out"

    when i send a test message throw the RWB for Http receiver adapter it is giving the error "Error in processing caused by: com.sap.aii.adapter.http.api.HttpAdapterException: ERROR_SOCKET_TIMEOUT, Read timed out"

    Hi, Michal
    I have read your Weblog. It makes sense to me. Thanks a lot for your help! However, I still have some questions and listed them as following. Could you please help to answer them?
    <b>Q1:</b> I am new to SAP-XI. So I have no idea about TCODE-SXMB_ADM. Could you introduce more details about it?
    <b>Q2:</b> The XI system I am using is running on SAP-ICC's machine. The tools I can use are:
    <b>1.</b>Builder for Integration Repository
    <b>2.</b>Builder for Integration Configuration
    <b>3.</b>System Landscape Directory
    <b>4.</b>Runtime Workbench
    <b>5.</b>Administration System (for Repository, Directory, Runtime)
    Please note that I do not have a complete control on this SAP-XI. Do you think whether or not I can set the timeout parameter by following the instructions provided in your Weblog?
    For more details about my SAP-XI, please access the following Web page:
    http://iccxi.sap.com:58000/rep/support/admin/index.html
    <b>Q3:</b> The following messages are extracted from the SAP-XI. Wish they are hepful to solving my problem.
    2006-06-19 05:12:16 Success The message was successfully received by the messaging system. Profile: XI URL: http://iccxi.sap.com:58000/MessagingSystem/receive/AFW/XI
    2006-06-19 05:12:16 Success Using connection AFW. Trying to put the message into the request queue.
    2006-06-19 05:12:16 Success Message successfully put into the queue.
    2006-06-19 05:12:16 Success The message was successfully retrieved from the request queue.
    2006-06-19 05:12:16 Success The message status set to DLNG.
    2006-06-19 05:12:16 Success Delivering to channel: ValidationRequestHandlerServiceChannel
    2006-06-19 05:12:16 Success SOAP: request message entering the adapter
    2006-06-19 05:12:37 Success SOAP: call failed
    2006-06-19 05:12:37 Error SOAP: error occured: java.net.ConnectException: Connection timed out: connect
    2006-06-19 05:12:37 Error Exception caught by adapter framework: Connection timed out: connect
    Thanks
    Menghua Li

Maybe you are looking for