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

CL_HTTP_CLIENT implementation does not run for my own URL

Former Member
0 Likes
383

Hi.

I need to call a URL located in a server.

If I call it by function WS_EXECUTE or CALL_BROWER or directly typing it in my internet explorer , run ok but i need to call it each time a event is created in R3 so..i can´t use those functions.

I have tried it implementing cl_http_client but a the receveir shows to me that URL is not able.

I copy my code:

concatenate 'http://ipserver:8000/dcn/DCNServlet?cmd=wf&security=admin&domain=default&username=supAdmin&password=s3pAdmin&dcn_request'

'={"op":":upsert","id":"MyServer2","to":"supAdmin","subject":"6666","from":"777","body":"ejem",'

'"read":false,"priority":true}' INTO url.

CALL METHOD cl_http_client=>create_by_url

EXPORTING

url = url

IMPORTING

client = http_client.

CALL METHOD http_client->send

EXCEPTIONS

http_communication_failure = 1

http_invalid_state = 2.

¿ where is the problem? It runs with function WS_EXECUTE or CALL_BROWER but not with CL_HTTP_CLIENT

Thanks very much.

Hi.

I need to call a URL located in a server.

If I call it by function WS_EXECUTE or CALL_BROWER or directly typing it in my internet explorer , run ok but i need to call it each time a event is created in R3 so..i can´t use those functions.

I have tried it implementing cl_http_client but a the receveir shows to me that URL is not able.

I copy my code:

concatenate 'http://ipserver:8000/dcn/DCNServlet?cmd=wf&security=admin&domain=default&username=supAdmin&password=s3pAdmin&dcn_request'

'={"op":":upsert","id":"MyServer2","to":"supAdmin","subject":"6666","from":"777","body":"ejem",'

'"read":false,"priority":true}' INTO url.

CALL METHOD cl_http_client=>create_by_url

EXPORTING

url = url

IMPORTING

client = http_client.

CALL METHOD http_client->send

EXCEPTIONS

http_communication_failure = 1

http_invalid_state = 2.

¿ where is the problem? It runs with function WS_EXECUTE or CALL_BROWER but not with CL_HTTP_CLIENT

Thanks very much.

1 REPLY 1
Read only

Former Member
0 Likes
301

I found the problem. I needed to indicate the name from the server with its domain and not the IP.

Thanks.