Skip to Content
author's profile photo Former Member
Former Member

REST WEB SERVICE - I only get a little part of the response data.

Hi

Iu2019m trying to consume a REST Web services ([http://en.wikipedia.org/wiki/REST] ) with abap and using the class cl_http_client.

I am able to connect and read information from the Web Service but I only get a little part of the data.

I get the data by using the method get_data (class: cl_http_response) and the data is written in the local variable lv_response_hex.

Data lv_response_hex type string.
Data mo_http_client type ref to cl_http_client.

  call method mo_http_client->response->get_data
    receiving
      data               = lv_response_hex.

However, there are circa 400-600 characters in lv_response_hex. Sometimes I get ca 6800 characters but the whole data is about 10000(or even more) characters.

The web service definitely works correctly because I tried to get the whole data with another program and I got it.

Thank you very much!

Best regards

Stefan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 08, 2009 at 09:15 PM

    The string needs to be defined as xstring.

    Data lv_response_hex type xstring.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2009 at 10:07 PM

    Hello Rich

    Thank you for your prompt reply.

    I replaced string with xstring but the data is still uncompleted.

    Best regards

    Stefan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.