Yep, what you're seeing is a result of the browser's 'Same Origin' policy, which prevents against cross-site scripting (XSS) attacks. The Same Origin policy prevents a page hosted at one site from making XMLHttpRequests to another site, since this is a method often employed by hackers to compromise user data, by convincing your browser to load phony scripts and content without your knowledge.
There are two potential solutions to your problem using PI Web Services:
-- Host your visualization service on the same server and port on which PI Web Services is installed
-- "Wrap" the data access functionality available in PI Web Services within your visualization service, such that the AJAX client is actually calling the visualization service
The long-term best answer here will be to use the PI Web API, which is now approaching its first official release. The Web API features support for CORS (Cross-Origin Resource Sharing) out of the box, which is a technology that adds a security layer for cross-site requests.
Brad, thank you for your help!
Host your visualization service on the same server and port on which PI Web Services is installed
Unfortunately, we're using SharePoint as foundation for our visualisation, so we cannot install PI Web Services on the same servere on the same port; and when ports are differ, this issue appears. So we've only one way - make wrap-up service. Or maybe we can simply write redirection page? Can this be a solution?
Sure, you could also write a redirect. From a network-layer perspective, this would essentially be the same as wrapping the service.