I'm getting the following error when I submit my form. I have the submit action set to "submit to REST endpoint" and "enable POST request" checked with the path to the servlet.
30.10.2024 15:25:41.668 *ERROR* [[0:0:0:0:0:0:0:1] [1730316341654] POST /content/forms/af/poster-api-registration/jcr:content/guideContainer.af.submit.jsp HTTP/1.1] com.adobe.aemds.guide.service.impl.RESTSubmitActionService Failed to make REST call
org.apache.http.client.ClientProtocolException: null
...
Caused by: org.apache.http.ProtocolException: Target host is not specified
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @wizard04wsu
Can you please confirm if your REST endpoint is hosted internally in the AEM server or on external server?
Can you try directly hitting that REST endpoint through postman with complete url and see if you are getting any response?
The error is pointing to "Target host not specified" which means the URL provided is not complete.
Thanks,
Rahul Pandey
Views
Replies
Total Likes
It is hosted internally. I tried with postman this morning. It is getting a response with this error instead:
31.10.2024 10:05:35.030 *ERROR* [[0:0:0:0:0:0:0:1] [1730383535026] POST /bin/poster-api-auth0 HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Unable to create resource named poster-api-auth0 in /bin
31.10.2024 10:05:35.031 *ERROR* [[0:0:0:0:0:0:0:1] [1730383535026] POST /bin/poster-api-auth0 HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception during response processing.
org.apache.sling.api.resource.PersistenceException: Unable to create node at /bin/poster-api-auth0
...
Caused by: javax.jcr.nodetype.ConstraintViolationException: No default node type available for /bin/poster-api-auth0
Views
Replies
Total Likes
You can provide a path of the resource itself instead of the complete URL, to post data to an internal server.
Did you exclude the path "/bin/poster-api-auth0" from the authentication requirement under the "Sling authentication service" under http://host:port/system/console/configMgr
Views
Replies
Total Likes
It is now working, but unfortunately I don't know what change actually resolved the problem.
Views
Replies
Total Likes