<?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: dmp in  cl_http_client in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dmp-in-cl-http-client/m-p/1659155#M292308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the following call returns the instantiated http_client you should use it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call method cl_http_client=&amp;gt;create_by_destination
exporting destination = destination
importing client = &amp;lt;b&amp;gt;http_client&amp;lt;/b&amp;gt;
exceptions
destination_not_found = 01
internal_error = 02
argument_not_found = 03
destination_no_authority = 04
plugin_not_active = 05
others = 06.

so instead of 
call method&amp;lt;b&amp;gt; client&amp;lt;/b&amp;gt;-&amp;gt;request-&amp;gt;set_header_field
exporting
name = '~request_method'
value = 'POST'.

you should use
call method&amp;lt;b&amp;gt; http_client&amp;lt;/b&amp;gt;-&amp;gt;request-&amp;gt;set_header_field
exporting
name = '~request_method'
value = 'POST'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Nov 2006 07:55:44 GMT</pubDate>
    <dc:creator>athavanraja</dc:creator>
    <dc:date>2006-11-20T07:55:44Z</dc:date>
    <item>
      <title>dmp in  cl_http_client</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dmp-in-cl-http-client/m-p/1659152#M292305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea how to solve my dump ??  Im working with  4.6C version...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the follow code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;destination = 'HTTP EXTERNO'. '' a RFC configuration&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;call method cl_http_client=&amp;gt;create_by_destination&lt;/P&gt;&lt;P&gt;exporting destination = destination&lt;/P&gt;&lt;P&gt;importing client = http_client&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;destination_not_found = 01&lt;/P&gt;&lt;P&gt;internal_error = 02&lt;/P&gt;&lt;P&gt;argument_not_found = 03&lt;/P&gt;&lt;P&gt;destination_no_authority = 04&lt;/P&gt;&lt;P&gt;plugin_not_active = 05&lt;/P&gt;&lt;P&gt;others = 06.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method client-&amp;gt;request-&amp;gt;set_header_field&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;name = '~request_method'&lt;/P&gt;&lt;P&gt;value = 'POST'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method client-&amp;gt;request-&amp;gt;set_header_field&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;name = '~server_protocol'&lt;/P&gt;&lt;P&gt;value = 'HTTP/1.0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method client-&amp;gt;request-&amp;gt;set_header_field&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;name = 'content-type'&lt;/P&gt;&lt;P&gt;value = 'text/xml'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD http_client-&amp;gt;request-&amp;gt;set_cdata&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    data   = wf_string "variable holding the xml string&lt;/P&gt;&lt;P&gt;    offset = 0&lt;/P&gt;&lt;P&gt;    length = rlength.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD http_client-&amp;gt;send&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;  http_communication_failure = 1&lt;/P&gt;&lt;P&gt;  http_invalid_state         = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD http_client-&amp;gt;receive&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt; http_communication_failure = 1&lt;/P&gt;&lt;P&gt; http_invalid_state         = 2&lt;/P&gt;&lt;P&gt; http_processing_failed     = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CLEAR wf_string1 .&lt;/P&gt;&lt;P&gt; wf_string1 = http_client-&amp;gt;response-&amp;gt;get_cdata( ).&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run my program I get the follow dump :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Attempt to access a component using 'NULL' object reference (points     &lt;/P&gt;&lt;P&gt;to nothing).                                                            &lt;/P&gt;&lt;P&gt;An object reference must point to an object (an instance of a class)    &lt;/P&gt;&lt;P&gt;before you can use it to access components (variable: " ").             &lt;/P&gt;&lt;P&gt;Either the reference has not yet been set, or it has been reset to      &lt;/P&gt;&lt;P&gt;'NULL' by a CLEAR statement."                                            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did a debug and the error occurs when Im executing the&lt;/P&gt;&lt;P&gt; "call method client-&amp;gt;request-&amp;gt;set_header_field"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 17:50:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dmp-in-cl-http-client/m-p/1659152#M292305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T17:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: dmp in  cl_http_client</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dmp-in-cl-http-client/m-p/1659153#M292306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cristina,&lt;/P&gt;&lt;P&gt;In "call method client-&amp;gt;request-&amp;gt;set_header_field" which class "client" refers to and have you created reference to the class and created object. In this case it appears like you are using object called client without instantiating it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 20:12:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dmp-in-cl-http-client/m-p/1659153#M292306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T20:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: dmp in  cl_http_client</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dmp-in-cl-http-client/m-p/1659154#M292307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank u very much for ur help.&lt;/P&gt;&lt;P&gt;I dont know methods, class very well. &lt;/P&gt;&lt;P&gt;I did declared the "client" as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: client  TYPE REF TO if_http_client.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually this code I copied from examples in SDN and others ABAP forums.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I still get the error. &lt;/P&gt;&lt;P&gt;Any idea will be more than welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br.&lt;/P&gt;&lt;P&gt;Cristina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 20:37:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dmp-in-cl-http-client/m-p/1659154#M292307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T20:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: dmp in  cl_http_client</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dmp-in-cl-http-client/m-p/1659155#M292308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the following call returns the instantiated http_client you should use it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call method cl_http_client=&amp;gt;create_by_destination
exporting destination = destination
importing client = &amp;lt;b&amp;gt;http_client&amp;lt;/b&amp;gt;
exceptions
destination_not_found = 01
internal_error = 02
argument_not_found = 03
destination_no_authority = 04
plugin_not_active = 05
others = 06.

so instead of 
call method&amp;lt;b&amp;gt; client&amp;lt;/b&amp;gt;-&amp;gt;request-&amp;gt;set_header_field
exporting
name = '~request_method'
value = 'POST'.

you should use
call method&amp;lt;b&amp;gt; http_client&amp;lt;/b&amp;gt;-&amp;gt;request-&amp;gt;set_header_field
exporting
name = '~request_method'
value = 'POST'.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 07:55:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dmp-in-cl-http-client/m-p/1659155#M292308</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-11-20T07:55:44Z</dc:date>
    </item>
  </channel>
</rss>

