cancel
Showing results for 
Search instead for 
Did you mean: 

getting error 404 while consuming external REST web service

Former Member
0 Kudos

Hi Experts,

I have written a program where i have to send Json format to external REST web service using HTTP-POST method. But i am getting error http_communication_fail and response code is 404 with reason = 'hostname is unknown'. i am not using any proxy method and RFC.

Is there any thing needs to be done before consuming an external REST web service through link.

sample code and advice is highly appriciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

BJarkowski
Active Contributor
0 Kudos

Looks like you have a communication error. The hostname to which you are trying to connect is not known.

There might be a various reasons why that's the case. The best choice would be to contact one of your system administrators as they are in a position to help you.

Former Member
0 Kudos

Thanks for your response. Is there any configuration we have to do before calling External REST web service in SAP.

BJarkowski
Active Contributor
0 Kudos

I would check if I can connect to the external service firstly. It might be that your SAP system is disconnected from the internet...

Former Member
0 Kudos

Hi Bartosz,

I need to know one thing at the time of receive- > i am getting connection failed error that host name is unknown. Do I need to do setup port and host name in SMICM tcode in sap. There is something related to configuration in sap due to this connection is failing to receive request from internet . Please help me out in this.

Thanks .