Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

No 'Access-Control-Allow-Origin'

$
0
0

hi people

i was trying to connect with a SOAP service of PI server, and show that message,

anyone passed for  this kind of problem?

 

i test in Chrome and InternetExplorer

 

Chrome             -  Show that message

InternetExplorer  -  Work's

 

 

code bellow

 

<!DOCTYPE HTML><html>  <head>  <meta http-equiv="X-UA-Compatible" content="IE=edge">  <script src="resources/sap-ui-core.js"  id="sap-ui-bootstrap"  data-sap-ui-libs="sap.m"  data-sap-ui-theme="sap_bluecrystal">  </script>  <!-- only load the mobile lib "sap.m" and the "sap_mvi" theme --><script type="text/javascript">     function CallService()    {           var soapMessage = '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"></soap:Envelope>';    $.ajax({    url: "http://server:port/",    type: "POST",    dataType: "xml",    data: soapMessage,    username: "usernamePI",  // Most SAP web services require credentials    password: "passwordPI",    contentType: "text/xml; charset=utf-8",        success: function(results) {  alert(results.xml);    },    error: function(){    alert("Erro");    }    });           return false;    }</script><body><form method="post" action="">    <div>        <input type="button" value="Call Web Service" onclick="CallService(); return false;" />    </div></form></body></html>

Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>