10-13-2006 6:42 AM
Hi All,
I am trying to understand how to set authentication type
for "cl_http_client=>create_by_url".
It is currently defaulting to client certificate.
ICM log: "auth_type=3 (USE_CLIENT_CERT)) "
I need to set to no authentication as server requires password/user as url parms.
If I use an RFC dest I can set to "No logon" but then I cannot append user/pass to the url.
Any help appeciated
Thanks in advance
Allan
10-13-2006 6:39 PM
Try setting the background user...and providing the username and password there itself
10-13-2006 6:39 PM
Try setting the background user...and providing the username and password there itself
10-15-2006 9:42 AM
you can just use the following code sample.
concatenate
'http://<siteaddress>/<loginpage>?<useridparameternameincalledsystem>='
'useridtobepassedtocalledsystem' '&<passwordfilenameincalledsystem>=<password>' into wf_String .
call method cl_http_client=>create_by_url
exporting
url = wf_string
importing
client = http_client
exceptions
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
others = 4.
where did you find that its using SSL?
in case if the called url required ssl certificate, then you can to download the certificate from that system and load it in ABAP system and use the sslid to pass it to create_by_url method.
Regards
Raja
10-18-2006 2:59 AM
Hi All,
Looks like I was a bit confused about what was actually happening.
After further testing, it seems that if I call
cl_http_client=>create_by_destination (via rfc connection)
then the certificate is used.
But if I call
cl_http_client=>create_by_url( EXPORTING url = url
then it can't seem to find the certificate.
I have setup the certs for both "SSL client standard" and
"SSL client anonymous".
I get the feeling I am missing something obvious
10-18-2006 6:49 AM
thanks Raja,
I wasn't passing the SSL_ID, as it isn't required for
create_by_destination I assumed I wouldn't need to specify
that.
10-18-2006 6:59 AM
yes you are right, while using create_by_destination you dont need that as that would be sepecified in the RFC destination itself.
Regards
Raja