title: How call soap service using jQuery
body: <p>I have a problem with calling soap service from php page. I was implemented two page,first page was created in php, and second page was created in asp.net. In asp.net application I have SOAP service, which methods should be called from php.</p>
  
  <p>Method on my SOAP service,  look like this:</p>
  
  <pre><code>[WebMethod]
  
  [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
  
  public bool UpdateVotes(string vote) {
             //Code 
   }
  </code></pre>
  
  <p>On PHP application I call UpdateVotes method on the next way:</p>
  
  <pre><code>$.ajax({
                  type: "POST",
                  url: "http://localhost:5690/VoteServices.asmx/UpdateVotes",
                  data: "{'vote': '" + vote + "'}",
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  success: function (msg) {                   
                  },
                  error: function (xhr, status, error) {                  
                  }
              });
  </code></pre>
  
  <p>First I run asp.net application with SOAP service, and than I start php aplication.</p>
  
  <p>When i click on button for calling web method on service i browser console i got this error:</p>
  
  <pre><code>Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://localhost:5690/VoteServices.asmx/UpdateVotes
  XMLHttpRequest cannot load http://localhost:5690/VoteServices.asmx/UpdateVotes. Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.
  </code></pre>