2014 Jan 11 10:21 PM
Hi Experts,
While am trying to consume the external system web service,system always prompting the Authentication Pop up for User name and Password,
even am setting the password using the method authentication.
As the third party system instructions, user name and password should be encoded into base64(UTF8) format and need to set the value as header 'Authorization'.
The same is working,while using from c#,but in the sap abap even passing the converted user and password for the header 'Authorization'
still Authentication Pop up is raising at the time of calling receive method.
Please give me the suggestions to suppress the dialog popup.
Code Snippet used for authentication:
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = lv_url
ssl_id = 'ABCDE'
IMPORTING
client = lr_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
CONCATENATE 'agc' ':' 'XXXXXXXXXXXX' INTO logon.
logon_b64 = l_utility->encode_base64( logon ).
CONCATENATE 'Basic' logon_b64 INTO logon_b64 "#EC NOTEXT
SEPARATED BY space.
CALL METHOD lr_client->request->set_header_field
EXPORTING
name = 'Authorization' "#EC NOTEXT
value = logon_b64.
CALL METHOD lr_client->request->set_method( 'GET' ).
"Calling the Webservice
CALL METHOD lr_client->send
EXPORTING
timeout = 200
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4.
"Receive the Responce from the Web Service
CALL METHOD lr_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
"Read HTTP RETURN CODE
CALL METHOD lr_client->response->get_status
IMPORTING
code = lv_http_status
reason = lv_status_text.
Thanks and Regards.
Y. Ravi Kumar.
2014 Sep 07 11:17 AM
Set propertytype_logon_popup to disabled,
DATA: lo_client TYPE REF TO if_http_client.
cl_http_client=>create_by_url(
EXPORTING
url = 'http://securesite'
IMPORTING
client = lo_client ).
lo_client->propertytype_logon_popup = if_http_client=>co_disabled.