Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HTTPS Client

Former Member
0 Likes
1,286

Hi, I´m trying to call a URL that uses a querystring to perform some actions in the server side. I create already a http client to process pdf´s and I want to reuse it for this purpose, this is my code :

DATA:
    http_client TYPE REF TO if_http_client.

  CALL METHOD cl_http_client=>create_by_url
    EXPORTING
      url                = absolute_uri
    IMPORTING
      client             = http_client
    EXCEPTIONS
      argument_not_found = 1
      plugin_not_active  = 2
      internal_error     = 3
      OTHERS             = 4.

  CALL METHOD http_client->send
    EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2
      OTHERS                     = 3.

  CALL METHOD http_client->receive
    EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2
      OTHERS                     = 3.

I don´t have problems with the smartforms URL but in this time I need to use some query http string like :

https://receive, and if I test this same URL via chrome this is the result :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CENTEROFPAYMENTS>
    <reference>error</reference>
    <response>error</response>
    <foliocpagos></foliocpagos>
    <auth></auth>
    <cd_response></cd_response>
    <cd_error>02</cd_error>
    <nb_error>XML document structures must start and end within the same entity.</nb_error>
    <voucher></voucher>
</CENTEROFPAYMENTS>

I expected at least see this string in my body response, any clue about this connection issue !? I debug and the call is via https so I don´t think this could be the reason.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
914

- Close XML root tag

- Configure server cetificate on STRUST (Basis Required)

- You need to inform SSL_ID in create_by_url method, passing value ANONYM or DFAULT according to STRUST setup.

1 REPLY 1
Read only

Former Member
0 Likes
915

- Close XML root tag

- Configure server cetificate on STRUST (Basis Required)

- You need to inform SSL_ID in create_by_url method, passing value ANONYM or DFAULT according to STRUST setup.