Can the Integration Platform receive CORS standard web service requests? Follow

Avatar
Domingo Rodriguez

Question

Can the Integration Platform receive CORS standard web service requests?

Answer

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:
http://help.seagullscientific.com/2016/en/Subsystems/BTXML/Content/Overview.htm

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).

 

More Information

CORS header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin

CORS explained: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

 

Was this article helpful?

0 out of 0 found this helpful

Please sign in to leave a comment.