10-07-2016 12:21 PM
Hello ,
I'm using cl_http_client , and when i execute my program ,i don't get a respinse : p_content = http_client->response->get_cdata( )
I get an error : Application server error.
It seems a problem in service activation , but i don't know how to fix it.
Thank you
10-07-2016 12:25 PM
10-07-2016 1:13 PM
Hi Kaushik,
This is the code i'm trying to execute :
REPORT ZPW_WEBSERVICE.
*&---------------------------------------------------------------------*
*& Selection Screen
*&---------------------------------------------------------------------*
PARAMETERS : p_cnt TYPE t005t-landx .
*&---------------------------------------------------------------------*
*& Types and Data
*&---------------------------------------------------------------------*
DATA: http_client TYPE REF TO if_http_client ,
http_url TYPE string ,
p_content TYPE string .
*&---------------------------------------------------------------------*
*& Start of Selection
*&---------------------------------------------------------------------*
START-OF-SELECTION .
* Build the url string based on input
CONCATENATE 'http://www.webservicex.net/globalweather.asmx'
'/GetCitiesByCountry?CountryName='
p_cnt
INTO http_url .
* Creation of new IF_HTTP_Client object
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = http_url
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
http_client->request->set_header_field( name = '~request_method'
value = 'GET' ).
* Send the request
http_client->send( ).
* Reterive the result
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4.
p_content = http_client->response->get_cdata( ).
In the debugger, i'm trying to display p_content :
10-07-2016 1:22 PM
Check whether your ICM services if required, restart once the ICM service. Also check for the program with your Developer if its required to activate the Program/Table, generally in ECC system can be achieved via SE11. I guess, as The current SCN is moving now to the new SCN Site http://people.sap.com, you have to wait until Monday & then maybe required to re-post this matter after that.
Thanks,
Kaushik