Can the Integration Platform receive CORS standard web service requests? Follow
Can the Integration Platform receive CORS standard web service requests?
Yes, it can. Some considerations are:
1.- To make an AJAX request using CORS, the server needs to be configured to accept cross-origin requests. You can read more about enabling that here if it's not already available on your server: http://enable-cors.org/
2.- You'll also need to enable CORS on the Ajax class for the request. Although we do not have a particular example on how this is done, there are several resources on the web on how to achieve this.
3.- As the syntax to be used we recommend making use of BarTender XML-Script (BTXML) Script. You can find a reference on BarTender XML Script Automation here:
For a full reference you would start BarTender on your PC, press the F1 key to open BarTender's Help and then visit the "Automating BarTender > Automation with BarTender XML Script" topic.
4.- Furthermore, inside the Integration Platform, under the "Integration > Response" node, you need to create a "Response Header" where you write "Access-Control-Allow-Origin" in the name portion, and "*" in the Value portion (you could also replace "*" with whatever domains the customer is wanting to allow).
CORS explained: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS