How to resolve the issue:- java.lang.IllegalArgumentException: Invalid uri 'https://****.****.****.*****.***:9060/***/**/****/***/ReferenceError: "name" is not defined. (<refname>': escaped absolute path not valid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2016 05:00 AM
Hello All,
I have configured REST GET Method, its working fine when I'm Testing from REST Message GET method, but the same method when I called from workflow activity it giving me this error.
java.lang.IllegalArgumentException: Invalid uri 'https://***.****.****.*****.***:9060/**/***/**/**/ReferenceError: "name" is not defined. (<refname>': escaped absolute path not valid
Please guide to resolve the issue.
Thanks & Regards,
Swapnil Agrawal
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 12:50 AM
I was not referring to the username, but to the path to the file on the server. Does that path includes spaces?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 03:33 AM
No URL has non spaces.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 03:36 AM
That's the only case I've seen so far. Maybe open an incident with ServiceNow support as that way you get a faster response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 03:43 AM
Thanks Sergiu,
Could you please help me with the line of code which is used to Display the response of GET message with the help of gs.addInfoMessage function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 05:00 AM
Hi Swapnil,
Following is the script using which you can print the response of GET method in REST.
var restCall = new RESTMessage('RestMessage1', 'get'); //RestMessage1 is name of the REST Message
restCall.setStringParameter('xyz','xyz'); // xyz is the parameter
restCall.setStringParameter('abc','abc'); // abc is the parameter
var response = restCall.execute();
responseBody=response.getBody();
gs.print(responseBody);
gs.addInfoMessage(responseBody);
Mark Correct if this solves your issue or hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader