Hello everyone,
I have an api using Sling Resource Type that return the response in XML format.
I can call the API with the author IP and return the response in XML format:
For example url :
- {{ author IP }}/content/projectName/en/pageName/optionalSubPageName.selector.xml?param=abc
It returned the response in XML format
==> CORRECT as expected.
However, when I call the api with the PUBLISH IP OR PUBLISH DOMAIN such as:
- {{ publish IP }}/content/projectName/en/pageName/optionalSubPageName.selector.xml?param=abc
- {{ publish domain }}/pageName/optionalSubPageName.selector.xml?param=abc
It will automatically direct to the PAGE at the path "pageName" or "optionalSubPageName" instead of the response XML format.
Note: the {{ publish IP }} will automatically rewritten to {{ publish domain }} when it was called.
==> NOT CORRECT as expected.
My expectation: I can call the api and return the response in XML format with the request url as:
- {{ publish domain }}/pageName/optionalSubPageName.selector.xml?param=abc
Do you have any suggestion or is there any solution for this one ?
I don't have much experience with this situation.
P/s: the project is running by AEM CLOUD Service and on Adobe server. So it seems I cannot visit /system/console page.
Thank you in advance.
Views
Replies
Total Likes
On the publish server, GoTo publishserver:4503/system/console/configMgr and search for "Apache Sling GET Servlet" configuration. Open the configuration and check the "Enable XML" checkbox and save the configuration.
Try this option and see if it works for you.
Hi @Sudheer_Sundalam,
Thanks for your response,
Sorry I've forgot to mention that my project is running by AEM CLOUD Service and on Adobe server. So it seems I cannot visit /system/console page.
Btw I'll try to enable that configuration via code deploying.
FYI
Hello @thong0605 ,
When you paste the publisher URL into the Configuration Test text box in this screen, what does it show?
thanks,
Preetpal Singh
Hi @Preetpal_Bindra,
Thanks for your response,
Sorry I've forgot to mention that my project is running by AEM CLOUD Service and on Adobe server. So it seems I cannot visit /system/console page.
If you have been working on AEM CLOUD service, do you have any suggestion ?
FYI
You can download all the configuration from Cloud-Manager that are visible in system/console and can check the relevant information.
Go to the CloudManager and then to the developer console. From developer console download the configuration. If you dnt have access, some one from your team should be having.
Create a new configuration for Apache Sling Servlet using the pID and set the XML checkbox to true.
Once done, deploy your code and check if that helps.
Thanks!
@thong0605 Do you find the suggestions from users useful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies