CL_HTTP_CLIENT, Typo3/Mittwald server

We are using CL_HTTP_CLIENT to access a service on the web (another part of the same project). In other words, the SAP-system acts as a client.
The "other side" is using Typo3/Mittwald technology (German).
If I understand correctly, Typo3 is a PHP-based CMS, running on the Mittwald HTTPD. In our case, it is hosted at the Typo3/Mittwald corporation
Does anybody have experience with a similar situation?

The small success I reported in my posting of the 6th of March has made me think.
It’s probably a matter of 2 requests.
In “normal” interactive use (a human user and a web browser) I think the following happens:
Request 1 is a simple GET.
The response to request 1 has:
a status 403
a body containing an HTML with a log-in form
a cookie
The user executes the HTML, fills in the form and submits. This sets off request 2.
Request 2 is a POST. It has:
user-ID and password in form fields “name” and “pass”
a Referer (because it comes from a web page)
a cookie (the cookie received in the response to request 1)
      The response to request 2 has:
a status 200 (we hope)
a body containing the XML
In my calls from SAP (CL_HTTP_CLIENT) so far we only have one exchange:
Request 1 is a POST. It has:
user-ID and password in form fields “name” and “pass”
a Referer (because I fake it)
NO cookie
      The response to request 1 has:
a status 200 (yeah!)
a body containing an HTML with a log-in form and the “Welcome to Drupal” stuff
My guess is that the system gets confused (possibly because the request does NOT contain a cookie). Authentication succeeds, but we get the wrong content.

Similar Messages

  • CL_HTTP_CLIENT, authentication, alternatives

    We are using CL_HTTP_CLIENT to access a service on the web (another part of the same project). In other words, the SAP-system acts as a client.
    We intended to use "basic authentication" (as in Internet RFC 2617), but that may be a problem for the "other side".
    Which other authentication mechanisms are available (for use in this context - SAP-system as a client, using CL_HTTP_CLIENT)?
    I am looking for something simple.
    "WWW-authenticate Negotiate" would imply, if I am not mistaken, Kerberos.
    The "other side" is using Typo3/Mittwald technology (German).
    If I understand correctly, Typo3 is a PHP-based CMS, running on the Mittwald HTTPD. In our case, it is hosted at the Typo3/Mittwald corporation
    I get the impression that this system uses its own authentication. I suppose it works fine when accessed by human users and their browsers, but in this context it's being accessed by an SAP-system (ABAP stack) - something different.
    Edited by: Peter Van Avermaet on Feb 28, 2008 1:48 PM

    Hi,
    >Which other authentication mechanisms are available (for use in this context - SAP-system >as a client, using CL_HTTP_CLIENT)?
    >I am looking for something simple.
    It's possible to use a X.509 client certificate for authentication from the SAP abap system.
    Maybe simple enough for you ?
    Regards,
    Olivier

  • Content Server error TEST: CL_HTTP_CLIENT= CREATE failed

    Hi,
    I have installed Content managment server successfully. but
    I m facing this error when I am trying to create a content repositry in OAC0
    can any one help..???
    Content Managment - windows 2008 r2
    SAP - Solaris sparc10
    Edited by: letzfriend on Jan 23, 2012 9:52 PM

    Hello,
    Can you check syntax on the line ? I think, it should be like
    call method cl_http_client=>create_by_destination
    Also, check the Authorization of the user, refer to below link
    http://help.sap.com/saphelp_nwpi711/helpdata/en/48/c7c53bda5e31ebe10000000a42189b/content.htm
    Thanks,
    Arjun

  • Where is the binary data of this icon stored and retrieved from Application server?

    Hello guys,
    Today I observed one phenomenon and could not explain it per my knowledge.
    I have one url which points to an icon in application server:
    https://<host name>:44301/sap/public/bc/ur/nw5/themes/sap_corbu/common/libs/Icon/SuccessMessage.gif
    I could successfully open it via chrome:
    and after that I could see an entry in ICM server cache. Everything works perfectly.
    Then I tried to check this icon in mime browser in SE80. To my surprise, the folder /sap/public/bc/ur/nw5/themes is empty.
    However, the ICM cache shows that there is a subfolder called "sap_corbu" under "themes" folder. But why I cannot find it in mime browser?
    Then I write a report to retrieve the binary data of icon via CL_HTTP_CLIENT, and clear the ICM buffer via tcode SMICM.
    I expect this time some database table will be queried to load the content of the icon, since now the buffer is not available.
    To my surprise again, in SAT no database table is involved.
    So now I am confused: since I have already cleared the ICM server cache, where does the icon binary data come from when I run the report to access the icon?
    Best regards,
    Jerry

    Hello guys,
    one colleague today told me that there is a zip file "ur_mimes_nw7.zip" in MIME repository /PUBLIC/BC/UR/ur_mines_nw7.zip. I download it locally and unzip it and indeed find many theme folders including sap_corbu folder and its resource files. So I guess there must be some logic done in web application server which will unzip this archive file and put each theme folder to the corresponding folders in application server. I would assume those logic are done outside ABAP stack side, this is the reason I cannot find any hint of them in ABAP backend via tcode SAT even I clear both client and server side cache.
    Best regards,
    Jerry

  • Send a mail with the class CL_HTTP_CLIENT

    hi,
    i use this program and i would send a mail with a attachment file PDF. I try to use the function module SO_NEW_DOCUMENT_ATT_SEND_API1 but i dont know to translate the data XSTRING to internal table.
    Thank you.
    *& Report  ZYTEST_TRANSFER_URL2                                        *
    REPORT  zytest_transfer_url2                    .
    *- begin of internal data
    TYPE-POOLS: swfxc, icon.
    DATA: l_http_client TYPE REF TO if_http_client.
    DATA: l_url TYPE string.
    DATA: l_code TYPE sy-subrc.
    DATA: l_code_string TYPE string.
    DATA: l_message_string TYPE string.
    DATA: lt_http_fields TYPE tihttpnvp.
    DATA: l_http_field_wa TYPE ihttpnvp.
    DATA: l_char_header(40) TYPE c.
    DATA: l_body_string TYPE string.
    DATA : line TYPE string.
    DATA: result_tab TYPE TABLE OF string,
    result_str TYPE string.
    *- end of internal data
    DATA: lv_contents TYPE string.
    DATA: lv_location TYPE string.
    *- begin of parameters
    PARAMETERS: url TYPE swc_value.
    PARAMETERS : receiver TYPE somlreci1-receiver LOWER CASE.
    *- end of parameters
    START-OF-SELECTION.
      PERFORM main.
    *& Form main
    text
    FORM main.
    PERFORM get_contents USING lv_contents.
    *- Create the HTTP-Client
      l_url = url.
    l_proxy_host =
    l_proxy_service =
      CALL METHOD cl_http_client=>create_by_url
      EXPORTING
      url = l_url
    proxy_host = l_proxy_host
    proxy_service = l_proxy_service
      IMPORTING
      client = l_http_client
      EXCEPTIONS
      argument_not_found = 1
      plugin_not_active = 2
      internal_error = 3
      OTHERS = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *- send the http post
      CALL METHOD l_http_client->send
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2.
      IF sy-subrc <> 0.
        WRITE: / icon_red_light AS ICON.
        CALL METHOD l_http_client->get_last_error
          IMPORTING
            code    = l_code
            MESSAGE = l_message_string.
        CALL METHOD l_http_client->close.
        l_code_string = l_code.
        CONCATENATE 'HTTP-Send: RC=' l_code_string              "#EC NOTEXT
        INTO l_code_string .
        CONCATENATE l_code_string l_message_string
        INTO l_message_string SEPARATED BY space.
        PERFORM print_string USING l_message_string.
        EXIT.
      ENDIF.
    *- receive the result of http post
      CALL METHOD l_http_client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2.
      IF sy-subrc <> 0.
        WRITE: / icon_red_light AS ICON.
        CALL METHOD l_http_client->get_last_error
          IMPORTING
            code    = l_code
            MESSAGE = l_message_string.
        CALL METHOD l_http_client->close.
        l_code_string = l_code.
        CONCATENATE 'HTTP-Receive: RC=' l_code_string           "#EC NOTEXT
        INTO l_code_string .
        CONCATENATE l_code_string l_message_string
        INTO l_message_string SEPARATED BY space.
        PERFORM print_string USING l_message_string.
        EXIT.
      ENDIF.
    *- print the results
      CALL METHOD l_http_client->response->get_status
        IMPORTING
          code = l_code.
      IF l_code < 300.
    HTTP-codes: 100 - 199 = informations
    HTTP-codes: 200 - 299 = client-request successful (200 = OK)
        WRITE: / icon_green_light AS ICON.
      ELSE.
    HTTP-codes: 300 - 399 = redirected; further actions required
    HTTP-codes: 400 - 499 = client-request incomplete
    HTTP-codes: 500 - 599 = server errors
        WRITE: / icon_red_light AS ICON.
      ENDIF.
    *-- get the http header fields
      CALL METHOD l_http_client->response->get_header_fields
        CHANGING
          fields = lt_http_fields.
      LOOP AT lt_http_fields INTO l_http_field_wa.
        l_char_header = l_http_field_wa-name.
        WRITE: / l_char_header.
        l_char_header = l_http_field_wa-value.
        WRITE: l_char_header.
      ENDLOOP.
      WRITE: / sy-uline.
    *- get the body
      DATA: lv_bin_contents TYPE xstring.
      lv_bin_contents = l_http_client->response->get_data( ).
      PERFORM save_file USING lv_bin_contents.
    ENDFORM. "main
    *& Form print_string
    FORM print_string USING p_string TYPE string.
      REFRESH result_tab.
      SPLIT p_string AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab.
      LOOP AT result_tab INTO result_str.
        WRITE:/ result_str.
      ENDLOOP.
    ENDFORM. " print_string
    *& Form save_file
    text
    FORM save_file USING lv_bin_contents.
      DATA: save_file(1000) TYPE c VALUE '/tmp/test3.pdf'.
      DATA: lv_file TYPE localfile.
      DATA : g_file(80).
      g_file = url.
      DO.
        SHIFT g_file LEFT UP TO '/'.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
        SHIFT g_file LEFT.
      ENDDO.
      SHIFT g_file RIGHT UP TO '.'.
      SHIFT g_file RIGHT.
      lv_file = save_file.
      OPEN DATASET lv_file FOR OUTPUT IN BINARY MODE.
      IF sy-subrc NE 0.
        WRITE:'SY-SUBRC :',sy-subrc.
    MESSAGE i000 WITH text-014. "'File Directory not found'.
        EXIT.
      ENDIF.
      TRANSFER lv_bin_contents TO lv_file.
      CLOSE DATASET lv_file.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      IF sy-subrc EQ 0.
    MESSAGE i000 WITH text-012."'Successfully downloaded to Application
    server'.
        EXIT.
      ENDIF.
    ENDFORM. "save_file

    hi,
    i use this program and i would send a mail with a attachment file PDF. I try to use the function module SO_NEW_DOCUMENT_ATT_SEND_API1 but i dont know to translate the data XSTRING to internal table.
    Thank you.
    *& Report  ZYTEST_TRANSFER_URL2                                        *
    REPORT  zytest_transfer_url2                    .
    *- begin of internal data
    TYPE-POOLS: swfxc, icon.
    DATA: l_http_client TYPE REF TO if_http_client.
    DATA: l_url TYPE string.
    DATA: l_code TYPE sy-subrc.
    DATA: l_code_string TYPE string.
    DATA: l_message_string TYPE string.
    DATA: lt_http_fields TYPE tihttpnvp.
    DATA: l_http_field_wa TYPE ihttpnvp.
    DATA: l_char_header(40) TYPE c.
    DATA: l_body_string TYPE string.
    DATA : line TYPE string.
    DATA: result_tab TYPE TABLE OF string,
    result_str TYPE string.
    *- end of internal data
    DATA: lv_contents TYPE string.
    DATA: lv_location TYPE string.
    *- begin of parameters
    PARAMETERS: url TYPE swc_value.
    PARAMETERS : receiver TYPE somlreci1-receiver LOWER CASE.
    *- end of parameters
    START-OF-SELECTION.
      PERFORM main.
    *& Form main
    text
    FORM main.
    PERFORM get_contents USING lv_contents.
    *- Create the HTTP-Client
      l_url = url.
    l_proxy_host =
    l_proxy_service =
      CALL METHOD cl_http_client=>create_by_url
      EXPORTING
      url = l_url
    proxy_host = l_proxy_host
    proxy_service = l_proxy_service
      IMPORTING
      client = l_http_client
      EXCEPTIONS
      argument_not_found = 1
      plugin_not_active = 2
      internal_error = 3
      OTHERS = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *- send the http post
      CALL METHOD l_http_client->send
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2.
      IF sy-subrc <> 0.
        WRITE: / icon_red_light AS ICON.
        CALL METHOD l_http_client->get_last_error
          IMPORTING
            code    = l_code
            MESSAGE = l_message_string.
        CALL METHOD l_http_client->close.
        l_code_string = l_code.
        CONCATENATE 'HTTP-Send: RC=' l_code_string              "#EC NOTEXT
        INTO l_code_string .
        CONCATENATE l_code_string l_message_string
        INTO l_message_string SEPARATED BY space.
        PERFORM print_string USING l_message_string.
        EXIT.
      ENDIF.
    *- receive the result of http post
      CALL METHOD l_http_client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2.
      IF sy-subrc <> 0.
        WRITE: / icon_red_light AS ICON.
        CALL METHOD l_http_client->get_last_error
          IMPORTING
            code    = l_code
            MESSAGE = l_message_string.
        CALL METHOD l_http_client->close.
        l_code_string = l_code.
        CONCATENATE 'HTTP-Receive: RC=' l_code_string           "#EC NOTEXT
        INTO l_code_string .
        CONCATENATE l_code_string l_message_string
        INTO l_message_string SEPARATED BY space.
        PERFORM print_string USING l_message_string.
        EXIT.
      ENDIF.
    *- print the results
      CALL METHOD l_http_client->response->get_status
        IMPORTING
          code = l_code.
      IF l_code < 300.
    HTTP-codes: 100 - 199 = informations
    HTTP-codes: 200 - 299 = client-request successful (200 = OK)
        WRITE: / icon_green_light AS ICON.
      ELSE.
    HTTP-codes: 300 - 399 = redirected; further actions required
    HTTP-codes: 400 - 499 = client-request incomplete
    HTTP-codes: 500 - 599 = server errors
        WRITE: / icon_red_light AS ICON.
      ENDIF.
    *-- get the http header fields
      CALL METHOD l_http_client->response->get_header_fields
        CHANGING
          fields = lt_http_fields.
      LOOP AT lt_http_fields INTO l_http_field_wa.
        l_char_header = l_http_field_wa-name.
        WRITE: / l_char_header.
        l_char_header = l_http_field_wa-value.
        WRITE: l_char_header.
      ENDLOOP.
      WRITE: / sy-uline.
    *- get the body
      DATA: lv_bin_contents TYPE xstring.
      lv_bin_contents = l_http_client->response->get_data( ).
      PERFORM save_file USING lv_bin_contents.
    ENDFORM. "main
    *& Form print_string
    FORM print_string USING p_string TYPE string.
      REFRESH result_tab.
      SPLIT p_string AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab.
      LOOP AT result_tab INTO result_str.
        WRITE:/ result_str.
      ENDLOOP.
    ENDFORM. " print_string
    *& Form save_file
    text
    FORM save_file USING lv_bin_contents.
      DATA: save_file(1000) TYPE c VALUE '/tmp/test3.pdf'.
      DATA: lv_file TYPE localfile.
      DATA : g_file(80).
      g_file = url.
      DO.
        SHIFT g_file LEFT UP TO '/'.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
        SHIFT g_file LEFT.
      ENDDO.
      SHIFT g_file RIGHT UP TO '.'.
      SHIFT g_file RIGHT.
      lv_file = save_file.
      OPEN DATASET lv_file FOR OUTPUT IN BINARY MODE.
      IF sy-subrc NE 0.
        WRITE:'SY-SUBRC :',sy-subrc.
    MESSAGE i000 WITH text-014. "'File Directory not found'.
        EXIT.
      ENDIF.
      TRANSFER lv_bin_contents TO lv_file.
      CLOSE DATASET lv_file.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      IF sy-subrc EQ 0.
    MESSAGE i000 WITH text-012."'Successfully downloaded to Application
    server'.
        EXIT.
      ENDIF.
    ENDFORM. "save_file

  • Not able to send SMS  " Application server error"

    Hi Experts,
    I am trying to send sms using one URL . but it is giving application server error. if i seperately copy this url on internet explor it is working fine .
    I am getting error in below methos
    call method client->receive
    exceptions
    http_communication_failure = 1
    http_invalid_state = 2
    http_processing_failed = 3
    others = 4.
    returning 1  and error message
    <html><head><title>Application Server Error</title>##<style type="text/css">##body { font-family: arial, sans-serif;}##</style>##</head>##<BODY text="#172972" link="#808080" vlink="#808080"##alink="#8e236b" bgcolor=white  leftmargin="0" topmargin="0"##mar
    below is the code
    call function 'SCP_CODEPAGE_FOR_LANGUAGE'
    exporting
    language = 'L'
    importing
    codepage = i_codepage
    exceptions
    no_codepage = 1
    others = 2.
    data : I_msg type string.
    ***Repalcing the starnge characters
    call function 'SCP_REPLACE_STRANGE_CHARS'
    exporting
    intext = I_message
    in_cp = i_codepage
    importing
    outtext = I_msg
    exceptions invalid_codepage = 1
    codepage_mismatch = 2
    internal_error = 3
    cannot_convert = 4
    fields_not_type_c = 5
    others = 6.
    endif.
    gv_sms_number = I_SMS_number.
    ****Check the recipient Number
    replace all occurrences of '+' in gv_sms_number with ' '.
    condense gv_sms_number no-gaps.
    data: client type ref to if_http_client,
          url type string.
    ****Build the  URL
    url created
    ****Create the HTTP client
    call method cl_http_client=>create_by_url
    exporting url = url
    importing client = client
    exceptions others = 1.
    *****Set the Request type to GET******
    ***Sets the value of the specified header field
    client->request->set_header_field( name = '~request_method' value = 'GET' ).
    CALL METHOD client->send
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2.
    **client->request->set_header_field( name = '~request_method' value = 'GET' ).
    "#EC *
    ****Make the call client->send( ).
    ****Receive the Response Object
    call method client->receive
    exceptions
    http_communication_failure = 1
    http_invalid_state = 2
    http_processing_failed = 3
    others = 4.
    if sy-subrc <> 0.
      call method client->get_last_error
        importing
         code    = gv_subrc
         message = gv_errortext.
    endif.

    Hi,
    Pls see this link... Re: Sending SMS frm SAP

  • Use of CL_HTTP_CLIENT to send pdf source

    We are on Portal running xRPM.
    My WDA populates an InteractiveForm UI element with data. As a result - I have pdfSource xstring which I need to save in Cfolder (this is Collaboration folder within xRPM).
    I use function CALL FUNCTION 'CFX_API_URL_COL' to get URL: I submit collaboration ID and the function gives me URL.
    Cfolders are in Web Application server.
    WebDynpro is in browser.
    I am trying to use CL_HTTP_CLIENT to submit xstring.
    But I have a little idea how to do that.
    I successfully created http client by Url:
      CALL METHOD cl_http_client=>create_by_url
        EXPORTING
          url                = l_url
         PROXY_HOST         = l_proxy_host
         PROXY_SERVICE      = l_proxy_service
        IMPORTING
          client             = l_http_client
        EXCEPTIONS
          argument_not_found = 1
          plugin_not_active  = 2
          internal_error     = 3
          OTHERS             = 4
    What is next?
    Any help is greatly appreciated .
    Tatyana

    Abhi,
    <You can simply read the xstring and call your function module which will be executed at server side.>
    I don't quite understand what you are saying.
    I don't have to read the string - the string is already in context of my Webdynpro.
    The Webdynpro has to put that string on URL.
    The whole purpose of it is to allow a Portal user to see PDF file every time when he open a  page with that URL.
    Do you know how I could send a string to URL?
    Thanks,
    Tatyana

  • Export values for CL_HTTP_CLIENT= CREATE

    Hi All,
    I am trying to use methos create of Class CL_HTTP_CLIENT
    CALL METHOD CL_HTTP_CLIENT=>CREATE
       EXPORTING
         HOST               = host  "e.g. www.google.co.uk
         SERVICE            = port
         PROXY_HOST         = proxy_host
         PROXY_SERVICE      = proxy_port
         SCHEME             = scheme
      IMPORTING
         CLIENT             = client
       EXCEPTIONS
         ARGUMENT_NOT_FOUND = 1
         PLUGIN_NOT_ACTIVE  = 2
         INTERNAL_ERROR     = 3
         others             = 4.
    My concern is how do we get 'PORT' value.
    Also what value will go to proxy_host and proxy_port.
    Is it value that is configured to internet connection for explorer ? How to get it?
    Kindly site one example if possible. I have searched a lot on SDN bt m still not clear about the values and how to get them.
    Regards,
    Sangvir Singh

    Hello friend,
    please refer to this example
    data https_client type REF TO IF_HTTP_CLIENT.
    data error_code type sysubrc.
    data res_error type string.
    DATA: res_data TYPE XSTRING,
          filename type string,
          path type string,
          fullPath type string.
    DATA: WF_USER TYPE STRING .
    data long_string type string.
    DATA: WF_PASSWORD TYPE STRING .
    TYPES line_x(512) TYPE x.
    DATA lt_xstring TYPE TABLE OF line_x.
      DATA l_length TYPE i.
    CALL METHOD CL_HTTP_CLIENT=>CREATE
      EXPORTING
        HOST          = 'www.paypal.com'
        SERVICE       = '443'
        SCHEME        = '2'
       PROXY_HOST    = '10.56.192.26'
       PROXY_SERVICE = '8080'
      IMPORTING
        CLIENT        = HTTPs_CLIENT.
    check https_client is not initial.
    *HTTPs_CLIENT->PROPERTYTYPE_LOGON_POPUP = HTTPs_CLIENT->CO_DISABLED.
    * proxy server authentication
    *CALL METHOD HTTPs_CLIENT->AUTHENTICATE
    *  EXPORTING
    *    PROXY_AUTHENTICATION = 'X'
    *    USERNAME             = WF_USER
    *    PASSWORD             = WF_PASSWORD.
    CALL METHOD HTTPs_CLIENT->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = '~request_method'
        VALUE = 'POST'.
    CALL METHOD HTTPs_CLIENT->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = '~request_uri'
        VALUE = '/cn/cgi-bin/webscr?dispatch=5885d80a13c0db1ffc45dc241d84e953d0e88f8d71535079b246201019c8adab'.
    CALL METHOD HTTPs_CLIENT->SEND
      EXCEPTIONS
        HTTP_COMMUNICATION_FAILURE = 1
        HTTP_INVALID_STATE         = 2.
    if sy-subrc <> 0.
      CALL METHOD https_client->get_last_error
        IMPORTING
          code = error_code.
      case error_code.
        when 1.
          write 'The communication is failed'.
        when 2.
          write 'invalid state of http'.
      endcase.
    endif.
    CALL METHOD HTTPs_CLIENT->RECEIVE
      EXCEPTIONS
        HTTP_COMMUNICATION_FAILURE = 1
        HTTP_INVALID_STATE         = 2
        HTTP_PROCESSING_FAILED     = 3.

  • Image provided in server cache does not appear in Excel download

    Hello WD Experts!
    I have a Web Dynpo (ABAP) ALV table with material master data. One column contains the image of the product or a "sorry, no picture" image, if no specific material image exists.
    The images are not available as MIME objects, hence I load the images from an external source and push them into the server cache using the method cl_http_server=>server_cache_upload( ... ). The lifetime for the cache is defined with 600. The "sorry, no picture" -image is a MIME object.
    All works fine... except for the download to Excel. Only the "sorry, no picture" -image appears. The others gets replaced by a placeholder icon which looks similar to those frequently seen in emails or slow web pages.
    Why don't the cached images get downloaded to Excel???
    Best Regards
    Bodo

    I would imagine this is a limitation of the Excel converter functionality within the ALV. It is probably designed to only download images that come directly from the MIME repository.  The logic between the two approaches would be very different.  Images in the MIME repository can be read from the database using the MIME APIs. To read the images from the Server Cache, the ABAP program would have to make an HTTP request to the cache (using CL_HTTP_CLIENT).  I'm guessing the convert logic simply doesn't do this.
    The other option is - is your lifetime high enough? 600 seconds seems like it would be long enough - at least for a test - there is no guarentee that in a real application the user might not display the data for more than 10 minutes before downloading. Probably not your problem, but something you might still consider if you get this working.
    My only suggestion is that you would have to create your own excel conversion instead of using the ALV one.

  • ABAP calling HTTPS URL using CL_HTTP_CLIENT

    Hello,
    I have a requirement where I will have to call a URL inside an ABAP or BSP passing some query parameters  program and then the response will be a big string with all the data I need.
    I found I can use CL_HTTP_CLIENT thanks to Brian weblog.
    The URL is HTTPS, the technical contact told me that I would need to encrypt the data in SSL and after pass to the URL as a query parameter.
    Also the response will be encrypted so I will need to convert from SSL before being able to interpret it.
    He also said that I need to install a certificate on my webas server, and use this certificate.
    So my doubts are:
    Do the class CL_HTTP_CLIENT automatic convert the data to SSL?
    How do I install and use such certificate?
    Regards,
    Mauricio

    check out this weblog (under subheading <b>Release 620</b>) to understand how you can load the certificate and use the same with cl_http_client call
    /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
    Regards
    Raja

  • CL_HTTP_CLIENT gives 401-response from WebServer

    Hi out there,
    i have generatet a SOAP-ABAP-Proxy on NW2004s. The Webservice need Basic-Authentication. But wether i send the credentials ore not i get Error 401. I tried to connect via IE and it worked fine. I tried to connect via programm RSHTTP20 and got the following response:
    HTTP GET Test
    401 Unauthorized
    HTTP/1.1 401 Unauthorized
    Content-Length: 1539
    Content-Type: text/html
    Server: Microsoft-IIS/6.0
    WWW-Authenticate: Basic realm="creddb"
    X-Powered-By: ASP.NET
    Date: Tue, 03 Apr 2007 08:42:03 GMT
    Connection: close
    Any Idea's how i can get it work ? The connection without authorization works fine...
    Thanks.
    Best regards
    André

    Hi Raja,
    you are right, i do not need cl_http_client in case of the proxy, but for this thread i used it cause i thougt that there the underlying problem comes from. I tried the code snippets - but why do i configure the securityprofile in the logical port ?
    And i still get the Popup to authenticate when i test the webservice call.
    After Authenticating i get the error:Unallowed RFC-XML Tag (SOAP_EINVALDOC)
    Do you have any further ideas ?
    Thanks.
    best regards
    André

  • Why directories including "file" (like /fileadmin in TYPO3) are not working with Adobe Edge Inspect?

    TYPO3 uses a directory named fileadmin where all the user data (e.g. templates) is stored. But as far as i tested yet the word "file" in a folder name is a problem for Edge Inspect. The connected devices didn't react if i choose this folder at my iMac or MacBook. I've got this problem locally (using MAMP 2) and on a standard web server too.
    At the moment i have to use a symbolic link (e.g. fadmin -> fileadmin) to use Edge Inspect in my TYPO3 templating workflow.
    Thanks
    Michael

    Hi Mark,
    thanks for the quick answer. So i know it was not my fault.
    After finding this bug the solution with a symlink is easy to use, so it's not a critical bug anymore if you can use a workaround like this. But it took me some time to figure this out.
    I'm glad to help you guys with this really awesome tool.
    Thanks
    Michael

  • Authentication type for  cl_http_client= create_by_url

    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

    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

  • Authentication error when using CL_HTTP_CLIENT

    Hi all,
    I'm using an instruction from the blog of Thomas Jung to get an image from the content server into the cache of the ICM framework. See this [blog Thomas Jung|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID0623211050DB12910368107152505592End?blog=/pub/wlg/1012].
    See also this thread: [Approach content repository other way then URL approach|https://forums.sdn.sap.com/Approach content repository other way then URL approach]
    At the point where I want to receive the response I currently get a popup where I'm asked to logon. Probably logon to the contentserver. I get this logon when the authentication on the content server is swithed on. Evwerything works fine when this authentication is switched off.
    I want to know how I can set this authentication in my instance of CL_HTTP_CLIENT in order to make the receive of the image working fine.
    Has anybody ever faced the same issue?
    Regards,
    Joost

    You have two choices.
    1.  You can feed the authentication into the CL_HTTP_CLIENT instance using the authenticate method:
    call method cl_http_client=>create
        exporting
          host               = me->ls_login_info-url
          service            = me->c_http_service_port
          scheme             = cl_http_client=>schemetype_http
        importing
          client             = me->http_client
        exceptions
          argument_not_found = 1
          plugin_not_active  = 2
          internal_error     = 3
          others             = 4.
       me->http_client->propertytype_logon_popup = me->http_client->co_disabled.
        data l_username type string.
        data l_password type string.
        l_username = 'MyUser'
        l_password = 'MyPassword'.
        call method me->http_client->authenticate
          exporting
            username             = l_username
            password             = l_password.
    2.  Second option is to use HTTP destinations from SM59.  This is a bit more managable since the password is maintained in the SM59 configuration and encrypted for you.
    cl_http_client=>create_by_destination(
        exporting
          destination              = c_destination    " Logical destination (specified in function call)
        importing
          client                   = r_api->http_client  " HTTP Client Abstraction
        exceptions
          argument_not_found       = 1
          destination_not_found    = 2
          destination_no_authority = 3
          plugin_not_active        = 4
          internal_error           = 5
          others                   = 6 ).

  • [ Progress report ] Typo3 meets SAP

    Hello PHP Scripter’s,
    [ Progress report ] Mambo meets SAP with SAP.
    The concept is like Andi's. We authenticate against SAP SU05 Users using the Function Module BAPI_PAR_EMPLOYEE_CHECKPASSWOR. The User Information is written into the standard Typo3 Front end User database table. From a former ITS (SAP Internet Transaction Server) based application we have inherited a home grown authorization system which we use to map to Typo3 Front end User Groups. These groups are used to define what Pages are displayed for a authenticated user.
    To connect to R/3 we use Web Services because of the better Unicode support and security mechanisms which can be implemented. We wrap the standard BAPI's and RFC Functionality by our own RFC.
    We will allow Users with "Administration" rights to create new contact persons in the Company and change contact person data like first name, last name, E-Mail, Phone, Fax. The other functionalities are sales order status, price and availability check, quotations, ...
    Best regards
    Gregor

    Hello Blag,
    what's about installing the SAP NetWeaver 04s ABAP Edition avaliable at <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/cfc19866-0401-0010-35b2-dc8158247fb6">sap NetWeaver Sneak Preview and Trial</a>? There you have the full Web Service enviroment.
    Regards
    Gregor

Maybe you are looking for

  • How to manage HTML DB end users in Oracle Database 10g Express Edition?

    I successfully installed Oracle XE on my Windows/XP PC. I followed 'Getting Started Guide' and created a new application using the hr.employees table. I could run this application by logging in as hr/hr. How can I create other HTML DB end users to ru

  • Splitting a list (loop and insert)

    I have a text file with about 65000 records to be looped and inserted into a database. I am using cfhttp to read the list and turn it into a query. I am then using that query to loop and insert the records into a database. However, its too large and

  • Disabling Sound Devices (Playback and Recording) via Group Policy?

    Good day, I am using an HT-Omega Claro II soundcard which has multiple playback and recording options once installed. For this specific configuration, I want to be able to disable all the unwanted options (including things like the standard PC speake

  • BT Landline Activation Accountability

    I feel that the BT customer service lacks a sense of accountability. I was supposed to be having my BT landline activated by an engineer between 8am and 1pm today and as I had been given around four weeks notice I was able to book the morning off wor

  • Insert "Mobile Device Setup Disk" or Itunes not regonizeing Itouch/phone

    How to fix itouch that said install mobile device setup disk or it was not recognized by itunes. So here this can help you fix that. *> = go to.* First: Make sure you have the latest itunes installed. Second: Open up device manager.To get there, Star