<?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 Re: How call HTTPS URI and receive the response in ABAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-call-https-uri-and-receive-the-response-in-abap/m-p/6548008#M1429116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, first thing to do is of course an abap proxy client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be created in SE80 under enterprice service. You need the WSDL of the service and the &lt;/P&gt;&lt;P&gt;abap proxy (with input and output structures) is automatically generated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have the abap proxy, you can use it any other abap class. &lt;/P&gt;&lt;P&gt;In will write a zreport program with ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lo_proxy     TYPE REF TO &lt;EM&gt;PROXY,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;            lf_output    TYPE  &lt;EM&gt;proxy_output_structure&lt;/EM&gt;,&lt;/P&gt;&lt;P&gt;            lf_input     TYPE &lt;EM&gt;proxy_input_structure.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create  Proxy instance&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; CREATE OBJECT lo_proxy.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Method Call &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TRY.&lt;/P&gt;&lt;P&gt;     CALL METHOD lo_proxy-&amp;gt;&lt;EM&gt;method_name&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;         INPUT  = lf_input&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;         OUTPUT = lf_output.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      CATCH cx_ai_system_fault.&lt;/P&gt;&lt;P&gt;        sy-subrc = 1.&lt;/P&gt;&lt;P&gt;      CATCH yfiqcx_fault_message .&lt;/P&gt;&lt;P&gt;        sy-subrc = 2.&lt;/P&gt;&lt;P&gt;      CATCH cx_ai_application_fault.&lt;/P&gt;&lt;P&gt;        sy-subrc = 3.&lt;/P&gt;&lt;P&gt;    ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it can help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Feb 2010 16:04:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-22T16:04:55Z</dc:date>
    <item>
      <title>How call HTTPS URI and receive the response in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-call-https-uri-and-receive-the-response-in-abap/m-p/6548007#M1429115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have requirment where i am trying to call an https URl from ABAP and pass an XML string and receive the response. However i am not sure how can i acheive this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the bleow code in java acheives the same thing but i want to do something similar in ABAP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* Send data to OnDemand
		 */
		urlConnection = (HttpsURLConnection) (new URL(ONDEMAND_URI)).openConnection();
		urlConnection.setDoInput(true);
		urlConnection.setDoOutput(true);
		
		urlConnection.setRequestMethod("POST");
		urlConnection.setRequestProperty("Authorization", authHeader);
		urlConnection.setRequestProperty("Content-length", "" + dataBytes.length);
		urlConnection.setRequestProperty("Content-Type", "text/xml");
		
		urlConnection.getOutputStream().write(dataBytes);
		
		/*
		 * Ensure succesful data upload by ensuring HTTP Status Code 200.
		 */
 		if(urlConnection.getResponseCode() != 201) {
			throw new Exception("Failed dataSet upload.\n" 
					+ "HTTP " + urlConnection.getResponseCode() 
					+ ": " + urlConnection.getResponseMessage());
		}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be really helpful if you could give some detail explanation or links where such information is available. Thanks a lot in advacne.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Naveen M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jan 2010 03:58:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-call-https-uri-and-receive-the-response-in-abap/m-p/6548007#M1429115</guid>
      <dc:creator>MNaveen</dc:creator>
      <dc:date>2010-01-29T03:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: How call HTTPS URI and receive the response in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-call-https-uri-and-receive-the-response-in-abap/m-p/6548008#M1429116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, first thing to do is of course an abap proxy client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be created in SE80 under enterprice service. You need the WSDL of the service and the &lt;/P&gt;&lt;P&gt;abap proxy (with input and output structures) is automatically generated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have the abap proxy, you can use it any other abap class. &lt;/P&gt;&lt;P&gt;In will write a zreport program with ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lo_proxy     TYPE REF TO &lt;EM&gt;PROXY,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;            lf_output    TYPE  &lt;EM&gt;proxy_output_structure&lt;/EM&gt;,&lt;/P&gt;&lt;P&gt;            lf_input     TYPE &lt;EM&gt;proxy_input_structure.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create  Proxy instance&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; CREATE OBJECT lo_proxy.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Method Call &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TRY.&lt;/P&gt;&lt;P&gt;     CALL METHOD lo_proxy-&amp;gt;&lt;EM&gt;method_name&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;         INPUT  = lf_input&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;         OUTPUT = lf_output.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      CATCH cx_ai_system_fault.&lt;/P&gt;&lt;P&gt;        sy-subrc = 1.&lt;/P&gt;&lt;P&gt;      CATCH yfiqcx_fault_message .&lt;/P&gt;&lt;P&gt;        sy-subrc = 2.&lt;/P&gt;&lt;P&gt;      CATCH cx_ai_application_fault.&lt;/P&gt;&lt;P&gt;        sy-subrc = 3.&lt;/P&gt;&lt;P&gt;    ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it can help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 16:04:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-call-https-uri-and-receive-the-response-in-abap/m-p/6548008#M1429116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-22T16:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: How call HTTPS URI and receive the response in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-call-https-uri-and-receive-the-response-in-abap/m-p/6548009#M1429117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will find more information in [SAP library - Example Program: Executing an HTTP Request|http://help.sap.com/SAPHELP_NW04S/helpdata/EN/1f/93163f9959a808e10000000a114084/frameset.htm]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 22:38:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-call-https-uri-and-receive-the-response-in-abap/m-p/6548009#M1429117</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-02-22T22:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: How call HTTPS URI and receive the response in ABAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-call-https-uri-and-receive-the-response-in-abap/m-p/6548010#M1429118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using CL_HTTP_CLIENT class and it worked fine for my requirment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 03:11:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-call-https-uri-and-receive-the-response-in-abap/m-p/6548010#M1429118</guid>
      <dc:creator>MNaveen</dc:creator>
      <dc:date>2010-02-23T03:11:30Z</dc:date>
    </item>
  </channel>
</rss>

