2011 Jul 28 7:59 AM
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.
2011 Jul 28 8:29 PM
I found the problem. I needed to indicate the name from the server with its domain and not the IP.
Thanks.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |