<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Manual HTTPS POST from ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/manual-https-post-from-abap/m-p/6245322#M1382704</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use a web service implementation that doesn't come with a WSDL file - so, no generated proxy for me to use. It also needs me to send an XML file via an HTTP POST - not in a SOAP envelope. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know of a way of manually posting something via HTTP in ABAP? I'm sure there must be some function module or class that exposes that functionality - I just can't find it! Any ideas anyone?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have noticed a similar kind of post on SDN, the only difference in this case is the URL is HTTPS one. The vendor webservice works in two steps;&lt;/P&gt;&lt;P&gt;1. Login to the HTTPS service via login url(https://.../login.aspx), using uid and pwd.&lt;/P&gt;&lt;P&gt;2. Call the actual url(https://.../webservice/webser1.aspx) using which the xml data needs to be transmitted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a sample code(C#), which works this way. Not sure how do we get this done in ABAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Oct 2009 20:58:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-08T20:58:25Z</dc:date>
    <item>
      <title>Manual HTTPS POST from ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/manual-https-post-from-abap/m-p/6245322#M1382704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to use a web service implementation that doesn't come with a WSDL file - so, no generated proxy for me to use. It also needs me to send an XML file via an HTTP POST - not in a SOAP envelope. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know of a way of manually posting something via HTTP in ABAP? I'm sure there must be some function module or class that exposes that functionality - I just can't find it! Any ideas anyone?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have noticed a similar kind of post on SDN, the only difference in this case is the URL is HTTPS one. The vendor webservice works in two steps;&lt;/P&gt;&lt;P&gt;1. Login to the HTTPS service via login url(https://.../login.aspx), using uid and pwd.&lt;/P&gt;&lt;P&gt;2. Call the actual url(https://.../webservice/webser1.aspx) using which the xml data needs to be transmitted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a sample code(C#), which works this way. Not sure how do we get this done in ABAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Oct 2009 20:58:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/manual-https-post-from-abap/m-p/6245322#M1382704</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-08T20:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Manual HTTPS POST from ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/manual-https-post-from-abap/m-p/6245323#M1382705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code is ABAP for a direct HTTP Post (not tested) I think.  Also try looking at function module HTTP2_POST and programs that use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; REPORT Z_HTTP_POST .

parameters : p_uri(100) lower case.

data:  g_status_code(5),
       g_status_text(300),
       g_len type i.

data:  gt_request_header  type table of sbcheader with header line,
       gt_request_body    type table of sbcbody with header line,
       gt_response_header type table of sbcheader with header line,
       gt_response_body   type table of sbcbody with header line .

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  post_it
*&amp;amp;---------------------------------------------------------------------*
form post_it.

  call function 'HTTP_POST'
    exporting
      absolute_uri                      = p_uri
      request_entity_body_length        = 300
*   RFC_DESTINATION                   =
*   PROXY                             =
*   PROXY_USER                        =
*   PROXY_PASSWORD                    =
*   USER                              =
*   PASSWORD                          =
      blankstocrlf                      = 'X'
   importing
      status_code                       = g_status_code
      status_text                       = g_status_text
      response_entity_body_length       = g_len
    tables
      request_entity_body               = gt_request_body
      response_entity_body              = gt_response_body
      response_headers                  = gt_response_header
      request_headers                   = gt_request_header
   exceptions
      connect_failed                    = 1
      timeout                           = 2
      internal_error                    = 3
      tcpip_error                       = 4
      system_failure                    = 5
      communication_failure             = 6
      others                            = 7.

  write: / 'the header data :'.
  loop at gt_response_header.
    write: / gt_response_header.
  endloop.

  skip.
  write:/ 'the body data :' .
  loop at gt_response_body.
    write: / gt_response_body.
  endloop.

endform.                    "post_it&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2009 02:42:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/manual-https-post-from-abap/m-p/6245323#M1382705</guid>
      <dc:creator>former_member579851</dc:creator>
      <dc:date>2009-10-09T02:42:23Z</dc:date>
    </item>
  </channel>
</rss>

