Application Development 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: 

SMS ERROR : HTTP_COMMUNICATION_FAILURE = 1

former_member630092
Participant
0 Kudos
1,867

We are facing an issue while posting the sms in abap report.

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.

CALL METHOD HTTP_CLIENT->SEND
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2.

CALL METHOD HTTP_CLIENT->RECEIVE
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3.
RC_VALUE = SY-SUBRC.
CLEAR RESULT .
RESULT = HTTP_CLIENT->RESPONSE->GET_CDATA( ).
REFRESH RESULT_TAB .

HTTP_COMMUNICATION_FAILURE = 1

sy-subrc = 1

<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

RESULT_TAB contains: <html><head><title>Application Server Error</title>

Where this Application Server Error can be rectified.

Thanks

14 REPLIES 14

Abhishek_10
Participant
0 Kudos
1,669

Seems to me the http is not open for your sap system. Try sending the data using rfc destination

Sandra_Rossi
Active Contributor
0 Kudos
1,669

In fact you didn't post the full answer from RESULT (truncated after ##mar). I hope you defined it as STRING type to receive all characters.

former_member630092
Participant
1,669

sir, i am attaching the complete error log.

and does the sms triggering required SSL certificate also...

Thank you.error-log-copy.txt

turkaj
Active Participant
1,669

Hi Ravi,
the Error is:



If you establish an HTTP connection, then it is an SSL connection and this leads to the error, because the certificate is not trusted. See transaction SMICM in the logs for more details. You have to import the certificate from your SMS application (URL you are referring to) into the SAP system. You can do this in transaction STRUST.

  1. Download the certificate from your website/URL.
  2. open the transaction STRUST
  3. import your certificate into the certificate folder.
  4. invalidate server cache

After you have imported the certificate, the error should no longer be thrown.

Regards
Jim

Sandra_Rossi
Active Contributor
1,669

Concerning the step 3

  • 3. import your certificate into the certificate folder.

I guess the OP doesn't know STRUST, so will be in trouble with that step, hopefully there are lots of answers to provide more details, like How to replace productive SSL PSE in AS ABAP - Basis Corner - Support Wiki (sap.com)

Also, it's important to say that CREATE_BY_URL was called without SSL_ID, consequently it's the SSL Client (Anonymous) PSE which is concerned.

NB: it's "HTTP connection" with "https://..." passed to CREATE_BY_URL.

0 Kudos
1,669

As we asked the sms service provider about the SSL certificate. But they donot provide any SSL certificate for sms.

turkaj
Active Participant
0 Kudos
1,669

When called in your code, some certificate is checked. Hence the error message. This error message can be seen in more detail in the SMICM log. Here you can see exactly what is called and where it fails.


If the URL in the code

URL = WF_STRING 

called with HTTPS?

Sandra_Rossi
Active Contributor
0 Kudos
1,669

ravi.kumar109 This is the public key of the certificate, so usually you can go to the browser, type the URL and you can get the certificate

e.g. to get https://answers.sap.com public key with Edge:

Etc.

More information by searching:

then you have 3 certificates, which you must download and install in STRUST.

Sandra_Rossi
Active Contributor
0 Kudos
1,669

ravi.kumar109 By the way, it's admin stuff.

0 Kudos
1,669

Thank you sir, While testing came to know that when executing the report, it is showing error SSSLERR_PEER_CERT_UNTRUSTED,

It means need to add SSL certificate in TCODE STRUST. (which certificate , where can i get it)

But when, testing the same program with addition of function module CALL FUNCTION 'HR_URL_CALL_BROWSER'

EXPORTING
URL = wa_string
EXCEPTIONS
BROWSER_START_FAILED = 1
NO_BATCH = 2
URL_IS_EMPTY = 3
OTHERS = 4
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.

Them SMS is triggering and browser is opening. It is not giving error SSSLERR_PEER_CERT_UNTRUSTED.
This is not checking TCODE- STRUST.

But when i am triggering the program in background with function 'HR_URL_CALL_BROWSER' , it not working because web browser is not opening.


Sandra_Rossi
Active Contributor
0 Kudos
1,669

ravi.kumar109 It's normal that it works when you are using the browser on your frontend, which works differently. With ABAP server, you must register/authorize centrally what you want to access.

0 Kudos
1,669

Thank you sandra.rossi & Thank you Shkelqim Turkaj. I got the point, programatically we can shoot the sms using web browser,

But if u want to shoot it without browser or in background then u need to authorize the settings. But main point is I am working as abaper the object is assigned to me. What content need to define in STRUST and in other T-codes setting. (like. URL need to pass in HTTP sm59 etc) .

Thank you.

Sandra_Rossi
Active Contributor
0 Kudos
1,669

ravi.kumar109 As an ABAPer, it's not your role to setup STRUST.

Anyway, if people are willing you to do it, we already answered to you (see the external link to the wiki). What issue do you have with setting up STRUST? Why do you want to setup SM59? (of course, it's the recommended way to use SM59, but why starting with SM59, although your priority is STRUST, and SM59 is currently not needed to make it work).

Sandra_Rossi
Active Contributor
0 Kudos
1,669

Thanks, better paste the text directly (well, it's the classic SSSLERR_PEER_CERT_UNTRUSTED, answered many times in the forum):

500 Native SSL error

Error:	-14
Version:	7210
Component:	ICM
Date/Time:	Fri Jul 28 09:43:36 2023#
Module:	icxxconn_mt.c
Line:	1989
Server:	xyz_pps_00
Error Tag:	{00000c47}
Detail:	IcmConnInitClientSSL: SapSSLSessionStart failed (-102): SSSLERR_PEER_CERT_UNTRUSTED