The CreatorCon Call for Content is officially open! Get started here.

Outbound REST Message returns 500

charliesdev
Giga Expert

I have a hosted REST endpoint that can be successfully hit from:

web:   https://webopstest.osmose.com/MgmtToolsApi/api/Authorization/AuthorizationTokenAsJSON/17/serv_utilii...

fiddle: https://jsfiddle.net/48o0xgxq/2/  

and Postman, iPhone, etc

But testing it using a REST Message object always fails with 500.

I see in my server log (on webopstest) that the endpoint is being hit from servicenow and returns 200.

it's a simple 'get' with no authentication.   should just return a string wrapped in a JSON object.

I'm on Istanbul, build 6 I believe.   Oh, also I'm a n00b, so don't assume that I haven't missed something simple.

1 ACCEPTED SOLUTION

mohamadcharafed
ServiceNow Employee
ServiceNow Employee

Hi Charlie,



It looks like your certificate is using SNI which is not supported until Jakarta


If you have a Jakarta instance set 'glide.outbound.tls_sni.enabled' property to true and test your endpoint and it will work. (this property wont work on instances before jakarta)



Cheers


Mohamad


View solution in original post

29 REPLIES 29

Hi Charlie,



Can you check the authentication details shared you have correctly applied in ServiceNow.


Can you share the screenshot as well. How you have configured the rest message and how you are consuming it via script.



Regards


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

restmessage.JPG


  • No Authentication
  • No additional Headers or Query Parameters
  • There is no script yet, I'm only testing it from the Related Link "Test".
  • When I use that link, the server (webopstest.osmose.com) logs success in its web service log, but ServiceNow shows 500:

restmessageresult.JPG


Hi charlie,



i tried from my instance and it gives socket error, Strange


humphreys.png



But working fine from postman


Thanks


Neeraj


Hi Charlie,



Can you set the Authentication type as None and test it once.


Http error 500 means internal server error nothing to do with ServiceNow.



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I changed the Authentication from Inherit to No Authentication, but it gives 500.


Added Headers for Content-Type and Accept, but it made no difference.



I appreciate you all looking into this with me, thank you!