09-13-2006 12:54 PM
Hello.
I am trying to get a file that is in a web server using HTTP protocol. The server is IIS and needs authentication, also, the url i give will redirect me to the url of the file i need to download.
How can this be done?
Thank you
Nuno Silva
09-13-2006 12:59 PM
hi nuno,
chk this
CL_HTTP_CLIENT
or u can use these function module - > HTTP_GET_FILE
rgds
anver
mark points if hlped
Message was edited by: Anversha s
09-13-2006 12:59 PM
hi nuno,
chk this
CL_HTTP_CLIENT
or u can use these function module - > HTTP_GET_FILE
rgds
anver
mark points if hlped
Message was edited by: Anversha s
09-13-2006 1:09 PM
I'm trying the following code:
url = 'http://192.168.0.1/image.bmp'.
CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
EXPORTING
URL = url
IMPORTING
CLIENT = http_client
EXCEPTIONS
ARGUMENT_NOT_FOUND = 1
PLUGIN_NOT_ACTIVE = 2
INTERNAL_ERROR = 3
others = 4.
IF SY-SUBRC = 0.
http_client->send( ).
http_client->receive( ).
content = http_client->response->get_cdata( ).
http_client->close( ).
ENDIF.
When i try this i get a popup asking me for the username and password. I put the correct password and it wont work. After the third try it will just fail.
Any idea why does this fail?
Thank you
Nuno Silva
09-13-2006 1:12 PM
can you have a close look at the pop up and tell us what user id pwd it is asking? is it proxy authentication or user id pwd of 'http://192.168.0.1?
Regards
Raja
09-13-2006 1:14 PM
also since this is a image dont use
content = http_client->response->get_cdata( ).
use
data: content type xstring.
content = http_client->response->get_data( ).
Regards
Raja
09-14-2006 12:50 PM
Its requesting the user and password from the iis server. It's a local address and i'm not using a proxy.
Thank you
Nuno Silva
09-16-2006 5:24 AM
ok,add the following code to pass user id /pwd
call method cl_http_client=>create
exporting
host = 'www.xxx.com'
service = '80'
scheme = '1'
importing
client = http_client.
http_client->propertytype_logon_popup = http_client->co_disabled.
wf_user = user .
wf_password = password .
call method http_client->authenticate
exporting
username = wf_user
password = wf_password.
Regards
Raja
09-19-2006 10:50 AM
Hello.
I tried creating and testing an RFC HTTP connection thru SM59. It reacts the same way (asks for user and password and fails at the third time). Whan it fails it return error 401 and says the server is not prepared to receive the authorization headers i am sending.
I believe this is because the server is configures for NTLM authentication.
How can i do this?
Thank you
Nuno Silva
12-29-2008 11:18 AM
Hello,
in case IIS is configured not to accept basic authentication HTTP_Client->authenticate will not work.
SAP WAS is not able to provide NTLM autentication when acting as HTTP-Client (at least for version 6.20/6.40).
However, we had the same requirement some month ago and we have implemented NTLM authentication.
If you´re still interested in this I can provide you this code.
Best regards,
Stefan
04-25-2012 10:41 AM
Hello Stefan,
can you please provide us your NTLM authentication (solution) since we have the same problems here.
Thank you in advance,
Erhard
04-23-2013 9:09 AM
Hello Stefan
Can you please provide us your NTLM authentication code?
Thanks,
Regards,
Anthony.
07-04-2014 7:35 AM
Hi Stefan,
Would be great if you can share your approach. I am facing currently into same problems that I want to interface sharepoint and they only accept NTLMv2 protocol.
Regards
Helmut
03-12-2015 8:31 PM
Hello Stefan,
can you please post the NTLM authentication code ?
Had anyone here received an answer ?
Thank you in advance
Roman